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 47241
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 2763 . . 3 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) = (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
2 eqid 2763 . . 3 (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛))) = (𝑛 ∈ ℕ ↦ (log‘((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)))
31, 2stirlinglem14 47239 . 2 ∃𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
4 nfv 1948 . . . . 5 Ⅎ𝑛 𝑐 ∈ ℝ+
5 nfmpt1 5207 . . . . . 6 Ⅎ𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))
6 nfcv 2926 . . . . . 6 Ⅎ𝑛 ⇝
7 nfcv 2926 . . . . . 6 Ⅎ𝑛𝑐
85, 6, 7nfbr 5155 . . . . 5 Ⅎ𝑛(𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐
94, 8nfan 1933 . . . 4 Ⅎ𝑛(𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐)
10 stirling.1 . . . 4 𝑆 = (𝑛 ∈ ℕ0 ↦ ((√‘((2 · π) · 𝑛)) · ((𝑛 / e)↑𝑛)))
11 eqid 2763 . . . 4 (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛))) = (𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))
12 eqid 2763 . . . 4 (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))) = (𝑛 ∈ ℕ ↦ ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))
13 eqid 2763 . . . 4 (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1))) = (𝑛 ∈ ℕ ↦ ((((2↑(4 · 𝑛)) · ((!‘𝑛)↑4)) / ((!‘(2 · 𝑛))↑2)) / ((2 · 𝑛) + 1)))
14 eqid 2763 . . . 4 (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2))) = (𝑛 ∈ ℕ ↦ ((((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘𝑛)↑4) / (((𝑛 ∈ ℕ ↦ ((𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛))))‘(2 · 𝑛)))‘𝑛)↑2)))
15 eqid 2763 . . . 4 (𝑛 ∈ ℕ ↦ ((𝑛↑2) / (𝑛 · ((2 · 𝑛) + 1)))) = (𝑛 ∈ ℕ ↦ ((𝑛↑2) / (𝑛 · ((2 · 𝑛) + 1))))
16 simpl 488 . . . 4 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → 𝑐 ∈ ℝ+)
17 simpr 490 . . . 4 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐)
189, 10, 1, 11, 12, 13, 14, 15, 16, 17stirlinglem15 47240 . . 3 ((𝑐 ∈ ℝ+ ∧ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐) → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆‘𝑛))) ⇝ 1)
1918rexlimiva 3159 . 2 (∃𝑐 ∈ ℝ+ (𝑛 ∈ ℕ ↦ ((!‘𝑛) / ((√‘(2 · 𝑛)) · ((𝑛 / e)↑𝑛)))) ⇝ 𝑐 → (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆‘𝑛))) ⇝ 1)
203, 19ax-mp 5 1 (𝑛 ∈ ℕ ↦ ((!‘𝑛) / (𝑆‘𝑛))) ⇝ 1
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   ∧ wa 401   = wceq 1569   ∈ wcel 2146  ∃wrex 3090   class class class wbr 5106   ↦ cmpt 5189  ‘cfv 6547  (class class class)co 7430  1c1 11214   + caddc 11216   · cmul 11218   / cdiv 11986  ℕcn 12348  2c2 12410  4c4 12412  ℕ0cn0 12619  ℝ+crp 13133  ↑cexp 14217  !cfa 14430  √csqrt 15415   ⇝ cli 15666  eceu 16243  πcpi 16247  logclog 26897
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1827  ax-4 1841  ax-5 1944  ax-6 2001  ax-7 2042  ax-8 2148  ax-9 2156  ax-10 2179  ax-11 2196  ax-12 2215  ax-ext 2735  ax-rep 5235  ax-sep 5252  ax-nul 5263  ax-pow 5331  ax-pr 5395  ax-un 7761  ax-inf2 9655  ax-cc 10526  ax-cnex 11269  ax-resscn 11270  ax-1cn 11271  ax-icn 11272  ax-addcl 11273  ax-addrcl 11274  ax-mulcl 11275  ax-mulrcl 11276  ax-mulcom 11277  ax-addass 11278  ax-mulass 11279  ax-distr 11280  ax-i2m1 11281  ax-1ne0 11282  ax-1rid 11283  ax-rnegex 11284  ax-rrecex 11285  ax-cnre 11286  ax-pre-lttri 11287  ax-pre-lttrn 11288  ax-pre-ltadd 11289  ax-pre-mulgt0 11290  ax-pre-sup 11291  ax-addf 11292
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1572  df-fal 1582  df-ex 1812  df-nf 1816  df-sb 2101  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-nel 3066  df-ral 3081  df-rex 3091  df-rmo 3369  df-reu 3370  df-rab 3417  df-v 3456  df-sbc 3743  df-csb 3852  df-ss 3901  df-pss 4017  df-dif 4050  df-in 4094  df-un 4154  df-symdif 4201  df-nul 4282  df-if 4486  df-pw 4562  df-sn 4589  df-pr 4591  df-tp 4593  df-op 4839  df-uni 4871  df-int 4911  df-iun 4956  df-iin 4957  df-disj 5074  df-br 5107  df-opab 5171  df-mpt 5190  df-tr 5216  df-id 5550  df-eprel 5555  df-po 5563  df-so 5564  df-fr 5608  df-se 5609  df-we 5610  df-xp 5661  df-rel 5662  df-cnv 5663  df-co 5664  df-dm 5665  df-rn 5666  df-res 5667  df-ima 5668  df-pred 6311  df-ord 6372  df-on 6373  df-lim 6374  df-suc 6375  df-iota 6501  df-fun 6549  df-fn 6550  df-f 6551  df-f1 6552  df-fo 6553  df-f1o 6554  df-fv 6555  df-isom 6556  df-riota 7387  df-ov 7433  df-oprab 7434  df-mpo 7435  df-of 7703  df-ofr 7704  df-om 7888  df-1st 8011  df-2nd 8012  df-supp 8191  df-frecs 8313  df-wrecs 8344  df-recs 8393  df-rdg 8432  df-1o 8490  df-2o 8491  df-oadd 8494  df-omul 8495  df-er 8731  df-map 8863  df-pm 8864  df-ixp 8940  df-en 8988  df-dom 8989  df-sdom 8990  df-fin 8991  df-fsupp 9368  df-fi 9416  df-sup 9447  df-inf 9448  df-oi 9517  df-dju 9995  df-card 10033  df-acn 10036  df-pnf 11358  df-mnf 11359  df-xr 11360  df-ltxr 11361  df-le 11362  df-sub 11556  df-neg 11557  df-div 11987  df-nn 12349  df-2 12418  df-3 12419  df-4 12420  df-5 12421  df-6 12422  df-7 12423  df-8 12424  df-9 12425  df-n0 12620  df-xnn0 12693  df-z 12707  df-dec 12828  df-uz 12979  df-q 13089  df-rp 13134  df-xneg 13254  df-xadd 13255  df-xmul 13256  df-ioo 13493  df-ioc 13494  df-ico 13495  df-icc 13496  df-fz 13653  df-fzo 13802  df-fl 13945  df-mod 14023  df-seq 14158  df-exp 14218  df-fac 14431  df-bc 14460  df-hash 14488  df-shft 15235  df-cj 15281  df-re 15282  df-im 15283  df-sqrt 15417  df-abs 15418  df-limsup 15653  df-clim 15670  df-rlim 15671  df-sum 15869  df-ef 16248  df-e 16249  df-sin 16250  df-cos 16251  df-tan 16252  df-pi 16253  df-dvds 16438  df-struct 17340  df-sets 17357  df-slot 17375  df-ndx 17387  df-base 17403  df-ress 17424  df-plusg 17456  df-mulr 17457  df-starv 17458  df-sca 17459  df-vsca 17460  df-ip 17461  df-tset 17462  df-ple 17463  df-ds 17465  df-unif 17466  df-hom 17467  df-cco 17468  df-rest 17608  df-topn 17609  df-0g 17627  df-gsum 17628  df-topgen 17629  df-pt 17630  df-prds 17633  df-xrs 17689  df-qtop 17694  df-imas 17695  df-xps 17697  df-mre 17771  df-mrc 17772  df-acs 17774  df-mgm 18831  df-sgrp 18923  df-mnd 18939  df-submnd 18994  df-mulg 19293  df-cntz 19546  df-cmn 20011  df-psmet 21685  df-xmet 21686  df-met 21687  df-bl 21688  df-mopn 21689  df-fbas 21690  df-fg 21691  df-cnfld 21694  df-top 23227  df-topon 23244  df-topsp 23266  df-bases 23279  df-cld 23352  df-ntr 23353  df-cls 23354  df-nei 23431  df-lp 23469  df-perf 23470  df-cn 23560  df-cnp 23561  df-haus 23648  df-cmp 23720  df-tx 23896  df-hmeo 24089  df-fil 24180  df-fm 24272  df-flim 24273  df-flf 24274  df-xms 24654  df-ms 24655  df-tms 24656  df-cncf 25214  df-ovol 25800  df-vol 25801  df-mbf 25955  df-itg1 25956  df-itg2 25957  df-ibl 25958  df-itg 25959  df-0p 26006  df-limc 26201  df-dv 26202  df-ulm 26719  df-log 26899  df-cxp 26900
This theorem is used by:  stirlingr  47242
  Copyright terms: Public domain W3C validator