Metamath Proof Explorer


Theorem stirlinglem13

Description: B is decreasing and has a lower bound, then it converges. Since B is log A , in another theorem it is proven that A converges as well. (Contributed by Glauco Siliprandi, 29-Jun-2017)

Ref Expression
Hypotheses stirlinglem13.1 A = n n ! 2 n n e n
stirlinglem13.2 B = n log A n
Assertion stirlinglem13 d B d

Proof

Step Hyp Ref Expression
1 stirlinglem13.1 A = n n ! 2 n n e n
2 stirlinglem13.2 B = n log A n
3 vex y V
4 2 elrnmpt y V y ran B n y = log A n
5 3 4 ax-mp y ran B n y = log A n
6 simpr n y = log A n y = log A n
7 1 stirlinglem2 n A n +
8 7 relogcld n log A n
9 8 adantr n y = log A n log A n
10 6 9 eqeltrd n y = log A n y
11 10 rexlimiva n y = log A n y
12 5 11 sylbi y ran B y
13 12 ssriv ran B
14 1nn 1
15 1 stirlinglem2 1 A 1 +
16 relogcl A 1 + log A 1
17 14 15 16 mp2b log A 1
18 nfcv _ n 1
19 nfcv _ n log
20 nfmpt1 _ n n n ! 2 n n e n
21 1 20 nfcxfr _ n A
22 21 18 nffv _ n A 1
23 19 22 nffv _ n log A 1
24 2fveq3 n = 1 log A n = log A 1
25 18 23 24 2 fvmptf 1 log A 1 B 1 = log A 1
26 14 17 25 mp2an B 1 = log A 1
27 2fveq3 j = 1 log A j = log A 1
28 27 rspceeqv 1 B 1 = log A 1 j B 1 = log A j
29 14 26 28 mp2an j B 1 = log A j
30 26 17 eqeltri B 1
31 nfcv _ j log A n
32 nfcv _ n j
33 21 32 nffv _ n A j
34 19 33 nffv _ n log A j
35 2fveq3 n = j log A n = log A j
36 31 34 35 cbvmpt n log A n = j log A j
37 2 36 eqtri B = j log A j
38 37 elrnmpt B 1 B 1 ran B j B 1 = log A j
39 30 38 ax-mp B 1 ran B j B 1 = log A j
40 29 39 mpbir B 1 ran B
41 40 ne0ii ran B
42 4re 4
43 4ne0 4 0
44 42 43 rereccli 1 4
45 30 44 resubcli B 1 1 4
46 eqid n 1 n n + 1 = n 1 n n + 1
47 1 2 46 stirlinglem12 j B 1 1 4 B j
48 47 rgen j B 1 1 4 B j
49 breq1 x = B 1 1 4 x B j B 1 1 4 B j
50 49 ralbidv x = B 1 1 4 j x B j j B 1 1 4 B j
51 50 rspcev B 1 1 4 j B 1 1 4 B j x j x B j
52 45 48 51 mp2an x j x B j
53 simpr j x B j y ran B y ran B
54 8 rgen n log A n
55 2 fnmpt n log A n B Fn
56 fvelrnb B Fn y ran B j B j = y
57 54 55 56 mp2b y ran B j B j = y
58 53 57 sylib j x B j y ran B j B j = y
59 nfra1 j j x B j
60 nfv j y ran B
61 59 60 nfan j j x B j y ran B
62 nfv j x y
63 simp1l j x B j y ran B j B j = y j x B j
64 simp2 j x B j y ran B j B j = y j
65 rsp j x B j j x B j
66 63 64 65 sylc j x B j y ran B j B j = y x B j
67 simp3 j x B j y ran B j B j = y B j = y
68 66 67 breqtrd j x B j y ran B j B j = y x y
69 68 3exp j x B j y ran B j B j = y x y
70 61 62 69 rexlimd j x B j y ran B j B j = y x y
71 58 70 mpd j x B j y ran B x y
72 71 ralrimiva j x B j y ran B x y
73 72 reximi x j x B j x y ran B x y
74 52 73 ax-mp x y ran B x y
75 infrecl ran B ran B x y ran B x y sup ran B <
76 13 41 74 75 mp3an sup ran B <
77 nnuz = 1
78 1zzd 1
79 2 8 fmpti B :
80 79 a1i B :
81 peano2nn j j + 1
82 1 a1i j A = n n ! 2 n n e n
83 simpr j n = j + 1 n = j + 1
84 83 fveq2d j n = j + 1 n ! = j + 1 !
85 83 oveq2d j n = j + 1 2 n = 2 j + 1
86 85 fveq2d j n = j + 1 2 n = 2 j + 1
87 83 oveq1d j n = j + 1 n e = j + 1 e
88 87 83 oveq12d j n = j + 1 n e n = j + 1 e j + 1
89 86 88 oveq12d j n = j + 1 2 n n e n = 2 j + 1 j + 1 e j + 1
90 84 89 oveq12d j n = j + 1 n ! 2 n n e n = j + 1 ! 2 j + 1 j + 1 e j + 1
91 81 nnnn0d j j + 1 0
92 faccl j + 1 0 j + 1 !
93 nncn j + 1 ! j + 1 !
94 91 92 93 3syl j j + 1 !
95 2cnd j 2
96 nncn j j
97 1cnd j 1
98 96 97 addcld j j + 1
99 95 98 mulcld j 2 j + 1
100 99 sqrtcld j 2 j + 1
101 ere e
102 101 recni e
103 102 a1i j e
104 0re 0
105 epos 0 < e
106 104 105 gtneii e 0
107 106 a1i j e 0
108 98 103 107 divcld j j + 1 e
109 108 91 expcld j j + 1 e j + 1
110 100 109 mulcld j 2 j + 1 j + 1 e j + 1
111 2rp 2 +
112 111 a1i j 2 +
113 nnre j j
114 104 a1i j 0
115 1red j 1
116 0le1 0 1
117 116 a1i j 0 1
118 nnge1 j 1 j
119 114 115 113 117 118 letrd j 0 j
120 113 119 ge0p1rpd j j + 1 +
121 112 120 rpmulcld j 2 j + 1 +
122 121 sqrtgt0d j 0 < 2 j + 1
123 122 gt0ne0d j 2 j + 1 0
124 81 nnne0d j j + 1 0
125 98 103 124 107 divne0d j j + 1 e 0
126 nnz j j
127 126 peano2zd j j + 1
128 108 125 127 expne0d j j + 1 e j + 1 0
129 100 109 123 128 mulne0d j 2 j + 1 j + 1 e j + 1 0
130 94 110 129 divcld j j + 1 ! 2 j + 1 j + 1 e j + 1
131 82 90 81 130 fvmptd j A j + 1 = j + 1 ! 2 j + 1 j + 1 e j + 1
132 nnrp j + 1 ! j + 1 ! +
133 91 92 132 3syl j j + 1 ! +
134 121 rpsqrtcld j 2 j + 1 +
135 epr e +
136 135 a1i j e +
137 120 136 rpdivcld j j + 1 e +
138 137 127 rpexpcld j j + 1 e j + 1 +
139 134 138 rpmulcld j 2 j + 1 j + 1 e j + 1 +
140 133 139 rpdivcld j j + 1 ! 2 j + 1 j + 1 e j + 1 +
141 131 140 eqeltrd j A j + 1 +
142 141 relogcld j log A j + 1
143 nfcv _ n j + 1
144 21 143 nffv _ n A j + 1
145 19 144 nffv _ n log A j + 1
146 2fveq3 n = j + 1 log A n = log A j + 1
147 143 145 146 2 fvmptf j + 1 log A j + 1 B j + 1 = log A j + 1
148 81 142 147 syl2anc j B j + 1 = log A j + 1
149 148 142 eqeltrd j B j + 1
150 79 ffvelrni j B j
151 eqid z 1 2 z + 1 1 2 j + 1 2 z = z 1 2 z + 1 1 2 j + 1 2 z
152 1 2 151 stirlinglem11 j B j + 1 < B j
153 149 150 152 ltled j B j + 1 B j
154 153 adantl j B j + 1 B j
155 52 a1i x j x B j
156 77 78 80 154 155 climinf B sup ran B <
157 156 mptru B sup ran B <
158 breq2 d = sup ran B < B d B sup ran B <
159 158 rspcev sup ran B < B sup ran B < d B d
160 76 157 159 mp2an d B d