Metamath Proof Explorer


Theorem stirlingr

Description: Stirling's approximation formula for n factorial: here convergence is expressed with respect to the standard topology on the reals. The main theorem stirling is proven for convergence in the topology of complex numbers. The variable R is used to denote convergence with respect to the standard topology on the reals. (Contributed by Glauco Siliprandi, 29-Jun-2017)

Ref Expression
Hypotheses stirlingr.1 S = n 0 2 π n n e n
stirlingr.2 R = t topGen ran .
Assertion stirlingr n n ! S n R 1

Proof

Step Hyp Ref Expression
1 stirlingr.1 S = n 0 2 π n n e n
2 stirlingr.2 R = t topGen ran .
3 1 stirling n n ! S n 1
4 nnuz = 1
5 1zzd 1
6 eqid n n ! S n = n n ! S n
7 nnnn0 n n 0
8 faccl n 0 n !
9 nnre n ! n !
10 7 8 9 3syl n n !
11 2re 2
12 11 a1i n 2
13 pire π
14 13 a1i n π
15 12 14 remulcld n 2 π
16 nnre n n
17 15 16 remulcld n 2 π n
18 0re 0
19 18 a1i n 0
20 2pos 0 < 2
21 20 a1i n 0 < 2
22 19 12 21 ltled n 0 2
23 pipos 0 < π
24 18 13 23 ltleii 0 π
25 24 a1i n 0 π
26 12 14 22 25 mulge0d n 0 2 π
27 7 nn0ge0d n 0 n
28 15 16 26 27 mulge0d n 0 2 π n
29 17 28 resqrtcld n 2 π n
30 ere e
31 30 a1i n e
32 epos 0 < e
33 18 32 gtneii e 0
34 33 a1i n e 0
35 16 31 34 redivcld n n e
36 35 7 reexpcld n n e n
37 29 36 remulcld n 2 π n n e n
38 1 fvmpt2 n 0 2 π n n e n S n = 2 π n n e n
39 7 37 38 syl2anc n S n = 2 π n n e n
40 2rp 2 +
41 40 a1i n 2 +
42 pirp π +
43 42 a1i n π +
44 41 43 rpmulcld n 2 π +
45 nnrp n n +
46 44 45 rpmulcld n 2 π n +
47 46 rpsqrtcld n 2 π n +
48 epr e +
49 48 a1i n e +
50 45 49 rpdivcld n n e +
51 nnz n n
52 50 51 rpexpcld n n e n +
53 47 52 rpmulcld n 2 π n n e n +
54 39 53 eqeltrd n S n +
55 10 54 rerpdivcld n n ! S n
56 6 55 fmpti n n ! S n :
57 56 a1i n n ! S n :
58 2 4 5 57 climreeq n n ! S n R 1 n n ! S n 1
59 58 mptru n n ! S n R 1 n n ! S n 1
60 3 59 mpbir n n ! S n R 1