Metamath Proof Explorer


Theorem wallispi2

Description: An alternative version of Wallis' formula for π ; this second formula uses factorials and it is later used to prove Stirling's approximation formula. (Contributed by Glauco Siliprandi, 29-Jun-2017)

Ref Expression
Hypothesis wallispi2.1 V = n 2 4 n n ! 4 2 n ! 2 2 n + 1
Assertion wallispi2 V π 2

Proof

Step Hyp Ref Expression
1 wallispi2.1 V = n 2 4 n n ! 4 2 n ! 2 2 n + 1
2 eqid k 2 k 2 k 1 2 k 2 k + 1 = k 2 k 2 k 1 2 k 2 k + 1
3 1cnd n 1
4 2cnd n 2
5 nncn n n
6 4 5 mulcld n 2 n
7 6 3 addcld n 2 n + 1
8 elnnuz n n 1
9 8 biimpi n n 1
10 eqidd m 1 n k 2 k 4 2 k 2 k 1 2 = k 2 k 4 2 k 2 k 1 2
11 simpr m 1 n k = m k = m
12 11 oveq2d m 1 n k = m 2 k = 2 m
13 12 oveq1d m 1 n k = m 2 k 4 = 2 m 4
14 12 oveq1d m 1 n k = m 2 k 1 = 2 m 1
15 12 14 oveq12d m 1 n k = m 2 k 2 k 1 = 2 m 2 m 1
16 15 oveq1d m 1 n k = m 2 k 2 k 1 2 = 2 m 2 m 1 2
17 13 16 oveq12d m 1 n k = m 2 k 4 2 k 2 k 1 2 = 2 m 4 2 m 2 m 1 2
18 elfznn m 1 n m
19 2cnd m 1 n 2
20 18 nncnd m 1 n m
21 19 20 mulcld m 1 n 2 m
22 4nn0 4 0
23 22 a1i m 1 n 4 0
24 21 23 expcld m 1 n 2 m 4
25 1cnd m 1 n 1
26 21 25 subcld m 1 n 2 m 1
27 21 26 mulcld m 1 n 2 m 2 m 1
28 27 sqcld m 1 n 2 m 2 m 1 2
29 2ne0 2 0
30 29 a1i m 1 n 2 0
31 18 nnne0d m 1 n m 0
32 19 20 30 31 mulne0d m 1 n 2 m 0
33 1red m 1 n 1
34 2re 2
35 34 a1i m 1 n 2
36 35 33 remulcld m 1 n 2 1
37 18 nnred m 1 n m
38 35 37 remulcld m 1 n 2 m
39 1lt2 1 < 2
40 39 a1i m 1 n 1 < 2
41 2t1e2 2 1 = 2
42 40 41 breqtrrdi m 1 n 1 < 2 1
43 0le2 0 2
44 43 a1i m 1 n 0 2
45 elfzle1 m 1 n 1 m
46 33 37 35 44 45 lemul2ad m 1 n 2 1 2 m
47 33 36 38 42 46 ltletrd m 1 n 1 < 2 m
48 33 47 gtned m 1 n 2 m 1
49 21 25 48 subne0d m 1 n 2 m 1 0
50 21 26 32 49 mulne0d m 1 n 2 m 2 m 1 0
51 2z 2
52 51 a1i m 1 n 2
53 27 50 52 expne0d m 1 n 2 m 2 m 1 2 0
54 24 28 53 divcld m 1 n 2 m 4 2 m 2 m 1 2
55 10 17 18 54 fvmptd m 1 n k 2 k 4 2 k 2 k 1 2 m = 2 m 4 2 m 2 m 1 2
56 55 54 eqeltrd m 1 n k 2 k 4 2 k 2 k 1 2 m
57 56 adantl n m 1 n k 2 k 4 2 k 2 k 1 2 m
58 mulcl m w m w
59 58 adantl n m w m w
60 9 57 59 seqcl n seq 1 × k 2 k 4 2 k 2 k 1 2 n
61 2nn 2
62 61 a1i n 2
63 id n n
64 62 63 nnmulcld n 2 n
65 64 peano2nnd n 2 n + 1
66 65 nnne0d n 2 n + 1 0
67 3 7 60 66 div32d n 1 2 n + 1 seq 1 × k 2 k 4 2 k 2 k 1 2 n = 1 seq 1 × k 2 k 4 2 k 2 k 1 2 n 2 n + 1
68 60 7 66 divcld n seq 1 × k 2 k 4 2 k 2 k 1 2 n 2 n + 1
69 68 mulid2d n 1 seq 1 × k 2 k 4 2 k 2 k 1 2 n 2 n + 1 = seq 1 × k 2 k 4 2 k 2 k 1 2 n 2 n + 1
70 wallispi2lem2 n seq 1 × k 2 k 4 2 k 2 k 1 2 n = 2 4 n n ! 4 2 n ! 2
71 70 oveq1d n seq 1 × k 2 k 4 2 k 2 k 1 2 n 2 n + 1 = 2 4 n n ! 4 2 n ! 2 2 n + 1
72 67 69 71 3eqtrd n 1 2 n + 1 seq 1 × k 2 k 4 2 k 2 k 1 2 n = 2 4 n n ! 4 2 n ! 2 2 n + 1
73 72 mpteq2ia n 1 2 n + 1 seq 1 × k 2 k 4 2 k 2 k 1 2 n = n 2 4 n n ! 4 2 n ! 2 2 n + 1
74 wallispi2lem1 n seq 1 × k 2 k 2 k 1 2 k 2 k + 1 n = 1 2 n + 1 seq 1 × k 2 k 4 2 k 2 k 1 2 n
75 74 mpteq2ia n seq 1 × k 2 k 2 k 1 2 k 2 k + 1 n = n 1 2 n + 1 seq 1 × k 2 k 4 2 k 2 k 1 2 n
76 73 75 1 3eqtr4ri V = n seq 1 × k 2 k 2 k 1 2 k 2 k + 1 n
77 2 76 wallispi V π 2