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 46012
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 2740 . . 3 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) = (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
2 eqid 2740 . . 3 (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛))) = (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)))
31, 2stirlinglem14 46010 . 2 𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
4 nfv 1913 . . . . 5 𝑛 𝑐 ∈ ℝ+
5 nfmpt1 5274 . . . . . 6 𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
6 nfcv 2908 . . . . . 6 𝑛
7 nfcv 2908 . . . . . 6 𝑛𝑐
85, 6, 7nfbr 5213 . . . . 5 𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
94, 8nfan 1898 . . . 4 𝑛(𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐)
10 stirling.1 . . . 4 𝑆 = (𝑛 ∈ ℕ0 ↦ ((√‘((2 · π) · 𝑛)) · ((𝑛 / e)↑𝑛)))
11 eqid 2740 . . . 4 (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛))) = (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))
12 eqid 2740 . . . 4 (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))) = (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))
13 eqid 2740 . . . 4 (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1))) = (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1)))
14 eqid 2740 . . . 4 (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2))) = (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2)))
15 eqid 2740 . . . 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 46011 . . 3 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
1918rexlimiva 3153 . 2 (∃𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐 → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
203, 19ax-mp 5 1 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1
Colors of variables: wff setvar class
Syntax hints:  wa 395   = wceq 1537  wcel 2108  wrex 3076   class class class wbr 5166  cmpt 5249  cfv 6575  (class class class)co 7450  1c1 11187   + caddc 11189   · cmul 11191   / cdiv 11949  cn 12295  2c2 12350  4c4 12352  0cn0 12555  +crp 13059  cexp 14114  !cfa 14324  csqrt 15284  cli 15532  eceu 16112  πcpi 16116  logclog 26616
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 2110  ax-9 2118  ax-10 2141  ax-11 2158  ax-12 2178  ax-ext 2711  ax-rep 5303  ax-sep 5317  ax-nul 5324  ax-pow 5383  ax-pr 5447  ax-un 7772  ax-inf2 9712  ax-cc 10506  ax-cnex 11242  ax-resscn 11243  ax-1cn 11244  ax-icn 11245  ax-addcl 11246  ax-addrcl 11247  ax-mulcl 11248  ax-mulrcl 11249  ax-mulcom 11250  ax-addass 11251  ax-mulass 11252  ax-distr 11253  ax-i2m1 11254  ax-1ne0 11255  ax-1rid 11256  ax-rnegex 11257  ax-rrecex 11258  ax-cnre 11259  ax-pre-lttri 11260  ax-pre-lttrn 11261  ax-pre-ltadd 11262  ax-pre-mulgt0 11263  ax-pre-sup 11264  ax-addf 11265
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 2543  df-eu 2572  df-clab 2718  df-cleq 2732  df-clel 2819  df-nfc 2895  df-ne 2947  df-nel 3053  df-ral 3068  df-rex 3077  df-rmo 3388  df-reu 3389  df-rab 3444  df-v 3490  df-sbc 3805  df-csb 3922  df-dif 3979  df-un 3981  df-in 3983  df-ss 3993  df-pss 3996  df-symdif 4272  df-nul 4353  df-if 4549  df-pw 4624  df-sn 4649  df-pr 4651  df-tp 4653  df-op 4655  df-uni 4932  df-int 4971  df-iun 5017  df-iin 5018  df-disj 5134  df-br 5167  df-opab 5229  df-mpt 5250  df-tr 5284  df-id 5593  df-eprel 5599  df-po 5607  df-so 5608  df-fr 5652  df-se 5653  df-we 5654  df-xp 5706  df-rel 5707  df-cnv 5708  df-co 5709  df-dm 5710  df-rn 5711  df-res 5712  df-ima 5713  df-pred 6334  df-ord 6400  df-on 6401  df-lim 6402  df-suc 6403  df-iota 6527  df-fun 6577  df-fn 6578  df-f 6579  df-f1 6580  df-fo 6581  df-f1o 6582  df-fv 6583  df-isom 6584  df-riota 7406  df-ov 7453  df-oprab 7454  df-mpo 7455  df-of 7716  df-ofr 7717  df-om 7906  df-1st 8032  df-2nd 8033  df-supp 8204  df-frecs 8324  df-wrecs 8355  df-recs 8429  df-rdg 8468  df-1o 8524  df-2o 8525  df-oadd 8528  df-omul 8529  df-er 8765  df-map 8888  df-pm 8889  df-ixp 8958  df-en 9006  df-dom 9007  df-sdom 9008  df-fin 9009  df-fsupp 9434  df-fi 9482  df-sup 9513  df-inf 9514  df-oi 9581  df-dju 9972  df-card 10010  df-acn 10013  df-pnf 11328  df-mnf 11329  df-xr 11330  df-ltxr 11331  df-le 11332  df-sub 11524  df-neg 11525  df-div 11950  df-nn 12296  df-2 12358  df-3 12359  df-4 12360  df-5 12361  df-6 12362  df-7 12363  df-8 12364  df-9 12365  df-n0 12556  df-xnn0 12628  df-z 12642  df-dec 12761  df-uz 12906  df-q 13016  df-rp 13060  df-xneg 13177  df-xadd 13178  df-xmul 13179  df-ioo 13413  df-ioc 13414  df-ico 13415  df-icc 13416  df-fz 13570  df-fzo 13714  df-fl 13845  df-mod 13923  df-seq 14055  df-exp 14115  df-fac 14325  df-bc 14354  df-hash 14382  df-shft 15118  df-cj 15150  df-re 15151  df-im 15152  df-sqrt 15286  df-abs 15287  df-limsup 15519  df-clim 15536  df-rlim 15537  df-sum 15737  df-ef 16117  df-e 16118  df-sin 16119  df-cos 16120  df-tan 16121  df-pi 16122  df-dvds 16305  df-struct 17196  df-sets 17213  df-slot 17231  df-ndx 17243  df-base 17261  df-ress 17290  df-plusg 17326  df-mulr 17327  df-starv 17328  df-sca 17329  df-vsca 17330  df-ip 17331  df-tset 17332  df-ple 17333  df-ds 17335  df-unif 17336  df-hom 17337  df-cco 17338  df-rest 17484  df-topn 17485  df-0g 17503  df-gsum 17504  df-topgen 17505  df-pt 17506  df-prds 17509  df-xrs 17564  df-qtop 17569  df-imas 17570  df-xps 17572  df-mre 17646  df-mrc 17647  df-acs 17649  df-mgm 18680  df-sgrp 18759  df-mnd 18775  df-submnd 18821  df-mulg 19110  df-cntz 19359  df-cmn 19826  df-psmet 21381  df-xmet 21382  df-met 21383  df-bl 21384  df-mopn 21385  df-fbas 21386  df-fg 21387  df-cnfld 21390  df-top 22923  df-topon 22940  df-topsp 22962  df-bases 22976  df-cld 23050  df-ntr 23051  df-cls 23052  df-nei 23129  df-lp 23167  df-perf 23168  df-cn 23258  df-cnp 23259  df-haus 23346  df-cmp 23418  df-tx 23593  df-hmeo 23786  df-fil 23877  df-fm 23969  df-flim 23970  df-flf 23971  df-xms 24353  df-ms 24354  df-tms 24355  df-cncf 24925  df-ovol 25520  df-vol 25521  df-mbf 25675  df-itg1 25676  df-itg2 25677  df-ibl 25678  df-itg 25679  df-0p 25726  df-limc 25923  df-dv 25924  df-ulm 26440  df-log 26618  df-cxp 26619
This theorem is referenced by:  stirlingr  46013
  Copyright terms: Public domain W3C validator