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 46049
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 46047 . 2 𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
4 nfv 1913 . . . . 5 𝑛 𝑐 ∈ ℝ+
5 nfmpt1 5232 . . . . . 6 𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
6 nfcv 2897 . . . . . 6 𝑛
7 nfcv 2897 . . . . . 6 𝑛𝑐
85, 6, 7nfbr 5172 . . . . 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 46048 . . 3 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
1918rexlimiva 3134 . 2 (∃𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐 → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
203, 19ax-mp 5 1 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1
Colors of variables: wff setvar class
Syntax hints:  wa 395   = wceq 1539  wcel 2107  wrex 3059   class class class wbr 5125  cmpt 5207  cfv 6542  (class class class)co 7414  1c1 11139   + caddc 11141   · cmul 11143   / cdiv 11903  cn 12249  2c2 12304  4c4 12306  0cn0 12510  +crp 13017  cexp 14085  !cfa 14295  csqrt 15255  cli 15503  eceu 16081  πcpi 16085  logclog 26551
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1794  ax-4 1808  ax-5 1909  ax-6 1966  ax-7 2006  ax-8 2109  ax-9 2117  ax-10 2140  ax-11 2156  ax-12 2176  ax-ext 2706  ax-rep 5261  ax-sep 5278  ax-nul 5288  ax-pow 5347  ax-pr 5414  ax-un 7738  ax-inf2 9664  ax-cc 10458  ax-cnex 11194  ax-resscn 11195  ax-1cn 11196  ax-icn 11197  ax-addcl 11198  ax-addrcl 11199  ax-mulcl 11200  ax-mulrcl 11201  ax-mulcom 11202  ax-addass 11203  ax-mulass 11204  ax-distr 11205  ax-i2m1 11206  ax-1ne0 11207  ax-1rid 11208  ax-rnegex 11209  ax-rrecex 11210  ax-cnre 11211  ax-pre-lttri 11212  ax-pre-lttrn 11213  ax-pre-ltadd 11214  ax-pre-mulgt0 11215  ax-pre-sup 11216  ax-addf 11217
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 848  df-3or 1087  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1779  df-nf 1783  df-sb 2064  df-mo 2538  df-eu 2567  df-clab 2713  df-cleq 2726  df-clel 2808  df-nfc 2884  df-ne 2932  df-nel 3036  df-ral 3051  df-rex 3060  df-rmo 3364  df-reu 3365  df-rab 3421  df-v 3466  df-sbc 3773  df-csb 3882  df-dif 3936  df-un 3938  df-in 3940  df-ss 3950  df-pss 3953  df-symdif 4235  df-nul 4316  df-if 4508  df-pw 4584  df-sn 4609  df-pr 4611  df-tp 4613  df-op 4615  df-uni 4890  df-int 4929  df-iun 4975  df-iin 4976  df-disj 5093  df-br 5126  df-opab 5188  df-mpt 5208  df-tr 5242  df-id 5560  df-eprel 5566  df-po 5574  df-so 5575  df-fr 5619  df-se 5620  df-we 5621  df-xp 5673  df-rel 5674  df-cnv 5675  df-co 5676  df-dm 5677  df-rn 5678  df-res 5679  df-ima 5680  df-pred 6303  df-ord 6368  df-on 6369  df-lim 6370  df-suc 6371  df-iota 6495  df-fun 6544  df-fn 6545  df-f 6546  df-f1 6547  df-fo 6548  df-f1o 6549  df-fv 6550  df-isom 6551  df-riota 7371  df-ov 7417  df-oprab 7418  df-mpo 7419  df-of 7680  df-ofr 7681  df-om 7871  df-1st 7997  df-2nd 7998  df-supp 8169  df-frecs 8289  df-wrecs 8320  df-recs 8394  df-rdg 8433  df-1o 8489  df-2o 8490  df-oadd 8493  df-omul 8494  df-er 8728  df-map 8851  df-pm 8852  df-ixp 8921  df-en 8969  df-dom 8970  df-sdom 8971  df-fin 8972  df-fsupp 9385  df-fi 9434  df-sup 9465  df-inf 9466  df-oi 9533  df-dju 9924  df-card 9962  df-acn 9965  df-pnf 11280  df-mnf 11281  df-xr 11282  df-ltxr 11283  df-le 11284  df-sub 11477  df-neg 11478  df-div 11904  df-nn 12250  df-2 12312  df-3 12313  df-4 12314  df-5 12315  df-6 12316  df-7 12317  df-8 12318  df-9 12319  df-n0 12511  df-xnn0 12584  df-z 12598  df-dec 12718  df-uz 12862  df-q 12974  df-rp 13018  df-xneg 13137  df-xadd 13138  df-xmul 13139  df-ioo 13374  df-ioc 13375  df-ico 13376  df-icc 13377  df-fz 13531  df-fzo 13678  df-fl 13815  df-mod 13893  df-seq 14026  df-exp 14086  df-fac 14296  df-bc 14325  df-hash 14353  df-shft 15089  df-cj 15121  df-re 15122  df-im 15123  df-sqrt 15257  df-abs 15258  df-limsup 15490  df-clim 15507  df-rlim 15508  df-sum 15706  df-ef 16086  df-e 16087  df-sin 16088  df-cos 16089  df-tan 16090  df-pi 16091  df-dvds 16274  df-struct 17167  df-sets 17184  df-slot 17202  df-ndx 17214  df-base 17231  df-ress 17257  df-plusg 17290  df-mulr 17291  df-starv 17292  df-sca 17293  df-vsca 17294  df-ip 17295  df-tset 17296  df-ple 17297  df-ds 17299  df-unif 17300  df-hom 17301  df-cco 17302  df-rest 17443  df-topn 17444  df-0g 17462  df-gsum 17463  df-topgen 17464  df-pt 17465  df-prds 17468  df-xrs 17523  df-qtop 17528  df-imas 17529  df-xps 17531  df-mre 17605  df-mrc 17606  df-acs 17608  df-mgm 18627  df-sgrp 18706  df-mnd 18722  df-submnd 18771  df-mulg 19060  df-cntz 19309  df-cmn 19773  df-psmet 21323  df-xmet 21324  df-met 21325  df-bl 21326  df-mopn 21327  df-fbas 21328  df-fg 21329  df-cnfld 21332  df-top 22867  df-topon 22884  df-topsp 22906  df-bases 22919  df-cld 22992  df-ntr 22993  df-cls 22994  df-nei 23071  df-lp 23109  df-perf 23110  df-cn 23200  df-cnp 23201  df-haus 23288  df-cmp 23360  df-tx 23535  df-hmeo 23728  df-fil 23819  df-fm 23911  df-flim 23912  df-flf 23913  df-xms 24294  df-ms 24295  df-tms 24296  df-cncf 24859  df-ovol 25454  df-vol 25455  df-mbf 25609  df-itg1 25610  df-itg2 25611  df-ibl 25612  df-itg 25613  df-0p 25660  df-limc 25856  df-dv 25857  df-ulm 26375  df-log 26553  df-cxp 26554
This theorem is referenced by:  stirlingr  46050
  Copyright terms: Public domain W3C validator