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 46056
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 2736 . . 3 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) = (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
2 eqid 2736 . . 3 (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛))) = (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)))
31, 2stirlinglem14 46054 . 2 𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
4 nfv 1913 . . . . 5 𝑛 𝑐 ∈ ℝ+
5 nfmpt1 5257 . . . . . 6 𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
6 nfcv 2904 . . . . . 6 𝑛
7 nfcv 2904 . . . . . 6 𝑛𝑐
85, 6, 7nfbr 5196 . . . . 5 𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
94, 8nfan 1898 . . . 4 𝑛(𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐)
10 stirling.1 . . . 4 𝑆 = (𝑛 ∈ ℕ0 ↦ ((√‘((2 · π) · 𝑛)) · ((𝑛 / e)↑𝑛)))
11 eqid 2736 . . . 4 (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛))) = (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))
12 eqid 2736 . . . 4 (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))) = (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))
13 eqid 2736 . . . 4 (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1))) = (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1)))
14 eqid 2736 . . . 4 (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2))) = (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2)))
15 eqid 2736 . . . 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 46055 . . 3 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
1918rexlimiva 3146 . 2 (∃𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐 → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1)
203, 19ax-mp 5 1 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆𝑛))) ⇝ 1
Colors of variables: wff setvar class
Syntax hints:  wa 395   = wceq 1538  wcel 2107  wrex 3069   class class class wbr 5149  cmpt 5232  cfv 6566  (class class class)co 7435  1c1 11160   + caddc 11162   · cmul 11164   / cdiv 11924  cn 12270  2c2 12325  4c4 12327  0cn0 12530  +crp 13038  cexp 14105  !cfa 14315  csqrt 15275  cli 15523  eceu 16101  πcpi 16105  logclog 26619
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 1966  ax-7 2006  ax-8 2109  ax-9 2117  ax-10 2140  ax-11 2156  ax-12 2176  ax-ext 2707  ax-rep 5286  ax-sep 5303  ax-nul 5313  ax-pow 5372  ax-pr 5439  ax-un 7758  ax-inf2 9685  ax-cc 10479  ax-cnex 11215  ax-resscn 11216  ax-1cn 11217  ax-icn 11218  ax-addcl 11219  ax-addrcl 11220  ax-mulcl 11221  ax-mulrcl 11222  ax-mulcom 11223  ax-addass 11224  ax-mulass 11225  ax-distr 11226  ax-i2m1 11227  ax-1ne0 11228  ax-1rid 11229  ax-rnegex 11230  ax-rrecex 11231  ax-cnre 11232  ax-pre-lttri 11233  ax-pre-lttrn 11234  ax-pre-ltadd 11235  ax-pre-mulgt0 11236  ax-pre-sup 11237  ax-addf 11238
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 848  df-3or 1087  df-3an 1088  df-tru 1541  df-fal 1551  df-ex 1778  df-nf 1782  df-sb 2064  df-mo 2539  df-eu 2568  df-clab 2714  df-cleq 2728  df-clel 2815  df-nfc 2891  df-ne 2940  df-nel 3046  df-ral 3061  df-rex 3070  df-rmo 3379  df-reu 3380  df-rab 3435  df-v 3481  df-sbc 3793  df-csb 3910  df-dif 3967  df-un 3969  df-in 3971  df-ss 3981  df-pss 3984  df-symdif 4260  df-nul 4341  df-if 4533  df-pw 4608  df-sn 4633  df-pr 4635  df-tp 4637  df-op 4639  df-uni 4914  df-int 4953  df-iun 4999  df-iin 5000  df-disj 5117  df-br 5150  df-opab 5212  df-mpt 5233  df-tr 5267  df-id 5584  df-eprel 5590  df-po 5598  df-so 5599  df-fr 5642  df-se 5643  df-we 5644  df-xp 5696  df-rel 5697  df-cnv 5698  df-co 5699  df-dm 5700  df-rn 5701  df-res 5702  df-ima 5703  df-pred 6326  df-ord 6392  df-on 6393  df-lim 6394  df-suc 6395  df-iota 6519  df-fun 6568  df-fn 6569  df-f 6570  df-f1 6571  df-fo 6572  df-f1o 6573  df-fv 6574  df-isom 6575  df-riota 7392  df-ov 7438  df-oprab 7439  df-mpo 7440  df-of 7701  df-ofr 7702  df-om 7892  df-1st 8019  df-2nd 8020  df-supp 8191  df-frecs 8311  df-wrecs 8342  df-recs 8416  df-rdg 8455  df-1o 8511  df-2o 8512  df-oadd 8515  df-omul 8516  df-er 8750  df-map 8873  df-pm 8874  df-ixp 8943  df-en 8991  df-dom 8992  df-sdom 8993  df-fin 8994  df-fsupp 9406  df-fi 9455  df-sup 9486  df-inf 9487  df-oi 9554  df-dju 9945  df-card 9983  df-acn 9986  df-pnf 11301  df-mnf 11302  df-xr 11303  df-ltxr 11304  df-le 11305  df-sub 11498  df-neg 11499  df-div 11925  df-nn 12271  df-2 12333  df-3 12334  df-4 12335  df-5 12336  df-6 12337  df-7 12338  df-8 12339  df-9 12340  df-n0 12531  df-xnn0 12604  df-z 12618  df-dec 12738  df-uz 12883  df-q 12995  df-rp 13039  df-xneg 13158  df-xadd 13159  df-xmul 13160  df-ioo 13394  df-ioc 13395  df-ico 13396  df-icc 13397  df-fz 13551  df-fzo 13698  df-fl 13835  df-mod 13913  df-seq 14046  df-exp 14106  df-fac 14316  df-bc 14345  df-hash 14373  df-shft 15109  df-cj 15141  df-re 15142  df-im 15143  df-sqrt 15277  df-abs 15278  df-limsup 15510  df-clim 15527  df-rlim 15528  df-sum 15726  df-ef 16106  df-e 16107  df-sin 16108  df-cos 16109  df-tan 16110  df-pi 16111  df-dvds 16294  df-struct 17187  df-sets 17204  df-slot 17222  df-ndx 17234  df-base 17252  df-ress 17281  df-plusg 17317  df-mulr 17318  df-starv 17319  df-sca 17320  df-vsca 17321  df-ip 17322  df-tset 17323  df-ple 17324  df-ds 17326  df-unif 17327  df-hom 17328  df-cco 17329  df-rest 17475  df-topn 17476  df-0g 17494  df-gsum 17495  df-topgen 17496  df-pt 17497  df-prds 17500  df-xrs 17555  df-qtop 17560  df-imas 17561  df-xps 17563  df-mre 17637  df-mrc 17638  df-acs 17640  df-mgm 18672  df-sgrp 18751  df-mnd 18767  df-submnd 18816  df-mulg 19105  df-cntz 19354  df-cmn 19821  df-psmet 21380  df-xmet 21381  df-met 21382  df-bl 21383  df-mopn 21384  df-fbas 21385  df-fg 21386  df-cnfld 21389  df-top 22922  df-topon 22939  df-topsp 22961  df-bases 22975  df-cld 23049  df-ntr 23050  df-cls 23051  df-nei 23128  df-lp 23166  df-perf 23167  df-cn 23257  df-cnp 23258  df-haus 23345  df-cmp 23417  df-tx 23592  df-hmeo 23785  df-fil 23876  df-fm 23968  df-flim 23969  df-flf 23970  df-xms 24352  df-ms 24353  df-tms 24354  df-cncf 24926  df-ovol 25521  df-vol 25522  df-mbf 25676  df-itg1 25677  df-itg2 25678  df-ibl 25679  df-itg 25680  df-0p 25727  df-limc 25924  df-dv 25925  df-ulm 26443  df-log 26621  df-cxp 26622
This theorem is referenced by:  stirlingr  46057
  Copyright terms: Public domain W3C validator