Users' Mathboxes Mathbox for Glauco Siliprandi < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  stirling Structured version   Visualization version   GIF version

Theorem stirling 45945
Description: Stirling's approximation formula for 𝑛 factorial. The proof follows two major steps: first it is proven that 𝑆 and 𝑛 factorial are asymptotically equivalent, up to an unknown constant. Then, using Wallis' formula for π it is proven that the unknown constant is the square root of π and then the exact Stirling's formula is established. This is Metamath 100 proof #90. (Contributed by Glauco Siliprandi, 29-Jun-2017.)
Hypothesis
Ref Expression
stirling.1 𝑆 = (𝑛 ∈ ℕ0 ↦ ((√‘((2 · π) · 𝑛)) · ((𝑛 / e)↑𝑛)))
Assertion
Ref Expression
stirling (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1

Proof of Theorem stirling
Dummy variable 𝑐 is distinct from all other variables.
StepHypRef Expression
1 eqid 2734 . . 3 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) = (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
2 eqid 2734 . . 3 (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛))) = (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)))
31, 2stirlinglem14 45943 . 2 𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
4 nfv 1913 . . . . 5 𝑛 𝑐 ∈ ℝ+
5 nfmpt1 5277 . . . . . 6 𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
6 nfcv 2904 . . . . . 6 𝑛
7 nfcv 2904 . . . . . 6 𝑛𝑐
85, 6, 7nfbr 5216 . . . . 5 𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
94, 8nfan 1898 . . . 4 𝑛(𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐)
10 stirling.1 . . . 4 𝑆 = (𝑛 ∈ ℕ0 ↦ ((√‘((2 · π) · 𝑛)) · ((𝑛 / e)↑𝑛)))
11 eqid 2734 . . . 4 (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛))) = (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))
12 eqid 2734 . . . 4 (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))) = (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))
13 eqid 2734 . . . 4 (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1))) = (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1)))
14 eqid 2734 . . . 4 (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2))) = (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2)))
15 eqid 2734 . . . 4 (𝑛 ∈ ℕ ↦ ((𝑛↑2) / (𝑛 · ((2 · 𝑛) + 1)))) = (𝑛 ∈ ℕ ↦ ((𝑛↑2) / (𝑛 · ((2 · 𝑛) + 1))))
16 simpl 482 . . . 4 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → 𝑐 ∈ ℝ+)
17 simpr 484 . . . 4 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐)
189, 10, 1, 11, 12, 13, 14, 15, 16, 17stirlinglem15 45944 . . 3 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
1918rexlimiva 3149 . 2 (∃𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐 → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
203, 19ax-mp 5 1 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1
Colors of variables: wff setvar class
Syntax hints:  wa 395   = wceq 1537  wcel 2103  wrex 3072   class class class wbr 5169  cmpt 5252  cfv 6572  (class class class)co 7445  1c1 11181   + caddc 11183   · cmul 11185   / cdiv 11943  cn 12289  2c2 12344  4c4 12346  0cn0 12549  +crp 13053  cexp 14108  !cfa 14318  csqrt 15278  cli 15526  eceu 16104  πcpi 16108  logclog 26605
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1793  ax-4 1807  ax-5 1909  ax-6 1967  ax-7 2007  ax-8 2105  ax-9 2113  ax-10 2136  ax-11 2153  ax-12 2173  ax-ext 2705  ax-rep 5306  ax-sep 5320  ax-nul 5327  ax-pow 5386  ax-pr 5450  ax-un 7766  ax-inf2 9706  ax-cc 10500  ax-cnex 11236  ax-resscn 11237  ax-1cn 11238  ax-icn 11239  ax-addcl 11240  ax-addrcl 11241  ax-mulcl 11242  ax-mulrcl 11243  ax-mulcom 11244  ax-addass 11245  ax-mulass 11246  ax-distr 11247  ax-i2m1 11248  ax-1ne0 11249  ax-1rid 11250  ax-rnegex 11251  ax-rrecex 11252  ax-cnre 11253  ax-pre-lttri 11254  ax-pre-lttrn 11255  ax-pre-ltadd 11256  ax-pre-mulgt0 11257  ax-pre-sup 11258  ax-addf 11259
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 847  df-3or 1088  df-3an 1089  df-tru 1540  df-fal 1550  df-ex 1778  df-nf 1782  df-sb 2065  df-mo 2537  df-eu 2566  df-clab 2712  df-cleq 2726  df-clel 2813  df-nfc 2890  df-ne 2943  df-nel 3049  df-ral 3064  df-rex 3073  df-rmo 3383  df-reu 3384  df-rab 3439  df-v 3484  df-sbc 3799  df-csb 3916  df-dif 3973  df-un 3975  df-in 3977  df-ss 3987  df-pss 3990  df-symdif 4266  df-nul 4348  df-if 4549  df-pw 4624  df-sn 4649  df-pr 4651  df-tp 4653  df-op 4655  df-uni 4932  df-int 4973  df-iun 5021  df-iin 5022  df-disj 5137  df-br 5170  df-opab 5232  df-mpt 5253  df-tr 5287  df-id 5597  df-eprel 5603  df-po 5611  df-so 5612  df-fr 5654  df-se 5655  df-we 5656  df-xp 5705  df-rel 5706  df-cnv 5707  df-co 5708  df-dm 5709  df-rn 5710  df-res 5711  df-ima 5712  df-pred 6331  df-ord 6397  df-on 6398  df-lim 6399  df-suc 6400  df-iota 6524  df-fun 6574  df-fn 6575  df-f 6576  df-f1 6577  df-fo 6578  df-f1o 6579  df-fv 6580  df-isom 6581  df-riota 7401  df-ov 7448  df-oprab 7449  df-mpo 7450  df-of 7710  df-ofr 7711  df-om 7900  df-1st 8026  df-2nd 8027  df-supp 8198  df-frecs 8318  df-wrecs 8349  df-recs 8423  df-rdg 8462  df-1o 8518  df-2o 8519  df-oadd 8522  df-omul 8523  df-er 8759  df-map 8882  df-pm 8883  df-ixp 8952  df-en 9000  df-dom 9001  df-sdom 9002  df-fin 9003  df-fsupp 9428  df-fi 9476  df-sup 9507  df-inf 9508  df-oi 9575  df-dju 9966  df-card 10004  df-acn 10007  df-pnf 11322  df-mnf 11323  df-xr 11324  df-ltxr 11325  df-le 11326  df-sub 11518  df-neg 11519  df-div 11944  df-nn 12290  df-2 12352  df-3 12353  df-4 12354  df-5 12355  df-6 12356  df-7 12357  df-8 12358  df-9 12359  df-n0 12550  df-xnn0 12622  df-z 12636  df-dec 12755  df-uz 12900  df-q 13010  df-rp 13054  df-xneg 13171  df-xadd 13172  df-xmul 13173  df-ioo 13407  df-ioc 13408  df-ico 13409  df-icc 13410  df-fz 13564  df-fzo 13708  df-fl 13839  df-mod 13917  df-seq 14049  df-exp 14109  df-fac 14319  df-bc 14348  df-hash 14376  df-shft 15112  df-cj 15144  df-re 15145  df-im 15146  df-sqrt 15280  df-abs 15281  df-limsup 15513  df-clim 15530  df-rlim 15531  df-sum 15731  df-ef 16109  df-e 16110  df-sin 16111  df-cos 16112  df-tan 16113  df-pi 16114  df-dvds 16297  df-struct 17189  df-sets 17206  df-slot 17224  df-ndx 17236  df-base 17254  df-ress 17283  df-plusg 17319  df-mulr 17320  df-starv 17321  df-sca 17322  df-vsca 17323  df-ip 17324  df-tset 17325  df-ple 17326  df-ds 17328  df-unif 17329  df-hom 17330  df-cco 17331  df-rest 17477  df-topn 17478  df-0g 17496  df-gsum 17497  df-topgen 17498  df-pt 17499  df-prds 17502  df-xrs 17557  df-qtop 17562  df-imas 17563  df-xps 17565  df-mre 17639  df-mrc 17640  df-acs 17642  df-mgm 18673  df-sgrp 18752  df-mnd 18768  df-submnd 18814  df-mulg 19103  df-cntz 19352  df-cmn 19819  df-psmet 21374  df-xmet 21375  df-met 21376  df-bl 21377  df-mopn 21378  df-fbas 21379  df-fg 21380  df-cnfld 21383  df-top 22914  df-topon 22931  df-topsp 22953  df-bases 22967  df-cld 23041  df-ntr 23042  df-cls 23043  df-nei 23120  df-lp 23158  df-perf 23159  df-cn 23249  df-cnp 23250  df-haus 23337  df-cmp 23409  df-tx 23584  df-hmeo 23777  df-fil 23868  df-fm 23960  df-flim 23961  df-flf 23962  df-xms 24344  df-ms 24345  df-tms 24346  df-cncf 24916  df-ovol 25511  df-vol 25512  df-mbf 25666  df-itg1 25667  df-itg2 25668  df-ibl 25669  df-itg 25670  df-0p 25717  df-limc 25913  df-dv 25914  df-ulm 26430  df-log 26607  df-cxp 26608
This theorem is referenced by:  stirlingr  45946
  Copyright terms: Public domain W3C validator