Metamath Proof Explorer


Theorem stirlinglem1

Description: A simple limit of fractions is computed. (Contributed by Glauco Siliprandi, 30-Jun-2017)

Ref Expression
Hypotheses stirlinglem1.1 H = n n 2 n 2 n + 1
stirlinglem1.2 F = n 1 1 2 n + 1
stirlinglem1.3 G = n 1 2 n + 1
stirlinglem1.4 L = n 1 n
Assertion stirlinglem1 H 1 2

Proof

Step Hyp Ref Expression
1 stirlinglem1.1 H = n n 2 n 2 n + 1
2 stirlinglem1.2 F = n 1 1 2 n + 1
3 stirlinglem1.3 G = n 1 2 n + 1
4 stirlinglem1.4 L = n 1 n
5 nnuz = 1
6 1zzd 1
7 ax-1cn 1
8 divcnv 1 n 1 n 0
9 7 8 ax-mp n 1 n 0
10 4 9 eqbrtri L 0
11 10 a1i L 0
12 nnex V
13 12 mptex n 1 2 n + 1 V
14 3 13 eqeltri G V
15 14 a1i G V
16 4 a1i k L = n 1 n
17 simpr k n = k n = k
18 17 oveq2d k n = k 1 n = 1 k
19 id k k
20 nnrp k k +
21 20 rpreccld k 1 k +
22 16 18 19 21 fvmptd k L k = 1 k
23 nnrecre k 1 k
24 22 23 eqeltrd k L k
25 24 adantl k L k
26 3 a1i k G = n 1 2 n + 1
27 17 oveq2d k n = k 2 n = 2 k
28 27 oveq1d k n = k 2 n + 1 = 2 k + 1
29 28 oveq2d k n = k 1 2 n + 1 = 1 2 k + 1
30 2re 2
31 30 a1i k 2
32 nnre k k
33 31 32 remulcld k 2 k
34 0le2 0 2
35 34 a1i k 0 2
36 20 rpge0d k 0 k
37 31 32 35 36 mulge0d k 0 2 k
38 33 37 ge0p1rpd k 2 k + 1 +
39 38 rpreccld k 1 2 k + 1 +
40 26 29 19 39 fvmptd k G k = 1 2 k + 1
41 39 rpred k 1 2 k + 1
42 40 41 eqeltrd k G k
43 42 adantl k G k
44 1red k 1
45 0le1 0 1
46 45 a1i k 0 1
47 33 44 readdcld k 2 k + 1
48 nncn k k
49 48 mulid2d k 1 k = k
50 1lt2 1 < 2
51 50 a1i k 1 < 2
52 44 31 20 51 ltmul1dd k 1 k < 2 k
53 49 52 eqbrtrrd k k < 2 k
54 33 ltp1d k 2 k < 2 k + 1
55 32 33 47 53 54 lttrd k k < 2 k + 1
56 32 47 55 ltled k k 2 k + 1
57 20 38 44 46 56 lediv2ad k 1 2 k + 1 1 k
58 57 40 22 3brtr4d k G k L k
59 58 adantl k G k L k
60 39 rpge0d k 0 1 2 k + 1
61 60 40 breqtrrd k 0 G k
62 61 adantl k 0 G k
63 5 6 11 15 25 43 59 62 climsqz2 G 0
64 1cnd 1
65 12 mptex n 1 1 2 n + 1 V
66 2 65 eqeltri F V
67 66 a1i F V
68 43 recnd k G k
69 2 a1i k F = n 1 1 2 n + 1
70 29 oveq2d k n = k 1 1 2 n + 1 = 1 1 2 k + 1
71 1cnd k 1
72 2cnd k 2
73 72 48 mulcld k 2 k
74 73 71 addcld k 2 k + 1
75 38 rpne0d k 2 k + 1 0
76 74 75 reccld k 1 2 k + 1
77 71 76 subcld k 1 1 2 k + 1
78 69 70 19 77 fvmptd k F k = 1 1 2 k + 1
79 40 eqcomd k 1 2 k + 1 = G k
80 79 oveq2d k 1 1 2 k + 1 = 1 G k
81 78 80 eqtrd k F k = 1 G k
82 81 adantl k F k = 1 G k
83 5 6 63 64 67 68 82 climsubc2 F 1 0
84 1m0e1 1 0 = 1
85 83 84 breqtrdi F 1
86 64 halfcld 1 2
87 12 mptex n n 2 n 2 n + 1 V
88 1 87 eqeltri H V
89 88 a1i H V
90 78 77 eqeltrd k F k
91 90 adantl k F k
92 nncn n n
93 92 sqcld n n 2
94 93 mulid2d n 1 n 2 = n 2
95 94 eqcomd n n 2 = 1 n 2
96 2cnd n 2
97 96 92 mulcld n 2 n
98 1cnd n 1
99 92 97 98 adddid n n 2 n + 1 = n 2 n + n 1
100 92 96 92 mul12d n n 2 n = 2 n n
101 92 sqvald n n 2 = n n
102 101 eqcomd n n n = n 2
103 102 oveq2d n 2 n n = 2 n 2
104 100 103 eqtrd n n 2 n = 2 n 2
105 92 mulid1d n n 1 = n
106 104 105 oveq12d n n 2 n + n 1 = 2 n 2 + n
107 2ne0 2 0
108 107 a1i n 2 0
109 92 96 108 divcan2d n 2 n 2 = n
110 109 eqcomd n n = 2 n 2
111 110 oveq2d n 2 n 2 + n = 2 n 2 + 2 n 2
112 92 halfcld n n 2
113 96 93 112 adddid n 2 n 2 + n 2 = 2 n 2 + 2 n 2
114 111 113 eqtr4d n 2 n 2 + n = 2 n 2 + n 2
115 99 106 114 3eqtrd n n 2 n + 1 = 2 n 2 + n 2
116 95 115 oveq12d n n 2 n 2 n + 1 = 1 n 2 2 n 2 + n 2
117 93 112 addcld n n 2 + n 2
118 nnrp n n +
119 2z 2
120 119 a1i n 2
121 118 120 rpexpcld n n 2 +
122 118 rphalfcld n n 2 +
123 121 122 rpaddcld n n 2 + n 2 +
124 123 rpne0d n n 2 + n 2 0
125 98 96 93 117 108 124 divmuldivd n 1 2 n 2 n 2 + n 2 = 1 n 2 2 n 2 + n 2
126 93 112 pncand n n 2 + n 2 - n 2 = n 2
127 126 eqcomd n n 2 = n 2 + n 2 - n 2
128 127 oveq1d n n 2 n 2 + n 2 = n 2 + n 2 - n 2 n 2 + n 2
129 117 112 117 124 divsubdird n n 2 + n 2 - n 2 n 2 + n 2 = n 2 + n 2 n 2 + n 2 n 2 n 2 + n 2
130 117 124 dividd n n 2 + n 2 n 2 + n 2 = 1
131 130 oveq1d n n 2 + n 2 n 2 + n 2 n 2 n 2 + n 2 = 1 n 2 n 2 + n 2
132 128 129 131 3eqtrd n n 2 n 2 + n 2 = 1 n 2 n 2 + n 2
133 nnne0 n n 0
134 96 92 133 divcld n 2 n
135 96 92 108 133 divne0d n 2 n 0
136 112 117 134 124 135 divcan5rd n n 2 2 n n 2 + n 2 2 n = n 2 n 2 + n 2
137 92 96 133 108 divcan6d n n 2 2 n = 1
138 93 112 134 adddird n n 2 + n 2 2 n = n 2 2 n + n 2 2 n
139 93 96 92 133 div12d n n 2 2 n = 2 n 2 n
140 1e2m1 1 = 2 1
141 140 oveq2i n 1 = n 2 1
142 92 exp1d n n 1 = n
143 92 133 120 expm1d n n 2 1 = n 2 n
144 141 142 143 3eqtr3a n n = n 2 n
145 144 eqcomd n n 2 n = n
146 145 oveq2d n 2 n 2 n = 2 n
147 139 146 eqtrd n n 2 2 n = 2 n
148 147 137 oveq12d n n 2 2 n + n 2 2 n = 2 n + 1
149 138 148 eqtrd n n 2 + n 2 2 n = 2 n + 1
150 137 149 oveq12d n n 2 2 n n 2 + n 2 2 n = 1 2 n + 1
151 136 150 eqtr3d n n 2 n 2 + n 2 = 1 2 n + 1
152 151 oveq2d n 1 n 2 n 2 + n 2 = 1 1 2 n + 1
153 132 152 eqtrd n n 2 n 2 + n 2 = 1 1 2 n + 1
154 153 oveq2d n 1 2 n 2 n 2 + n 2 = 1 2 1 1 2 n + 1
155 116 125 154 3eqtr2d n n 2 n 2 n + 1 = 1 2 1 1 2 n + 1
156 155 mpteq2ia n n 2 n 2 n + 1 = n 1 2 1 1 2 n + 1
157 1 156 eqtri H = n 1 2 1 1 2 n + 1
158 157 a1i k H = n 1 2 1 1 2 n + 1
159 70 oveq2d k n = k 1 2 1 1 2 n + 1 = 1 2 1 1 2 k + 1
160 71 halfcld k 1 2
161 160 77 mulcld k 1 2 1 1 2 k + 1
162 158 159 19 161 fvmptd k H k = 1 2 1 1 2 k + 1
163 78 oveq2d k 1 2 F k = 1 2 1 1 2 k + 1
164 162 163 eqtr4d k H k = 1 2 F k
165 164 adantl k H k = 1 2 F k
166 5 6 85 86 89 91 165 climmulc2 H 1 2 1
167 166 mptru H 1 2 1
168 halfcn 1 2
169 168 mulid1i 1 2 1 = 1 2
170 167 169 breqtri H 1 2