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=n02πnnen
stirlingr.2 R=ttopGenran.
Assertion stirlingr nn!SnR1

Proof

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