Metamath Proof Explorer


Theorem wallispi

Description: Wallis' formula for π : Wallis' product converges to π / 2 . (Contributed by Glauco Siliprandi, 29-Jun-2017)

Ref Expression
Hypotheses wallispi.1 F = k 2 k 2 k 1 2 k 2 k + 1
wallispi.2 W = n seq 1 × F n
Assertion wallispi W π 2

Proof

Step Hyp Ref Expression
1 wallispi.1 F = k 2 k 2 k 1 2 k 2 k + 1
2 wallispi.2 W = n seq 1 × F n
3 nnuz = 1
4 1zzd 1
5 eqid n 0 0 π sin x n dx = n 0 0 π sin x n dx
6 eqid n n 0 0 π sin x n dx 2 n n 0 0 π sin x n dx 2 n + 1 = n n 0 0 π sin x n dx 2 n n 0 0 π sin x n dx 2 n + 1
7 eqid n π 2 1 seq 1 × F n = n π 2 1 seq 1 × F n
8 eqid n 2 n + 1 2 n = n 2 n + 1 2 n
9 1 5 6 7 8 wallispilem5 n π 2 1 seq 1 × F n 1
10 9 a1i n π 2 1 seq 1 × F n 1
11 2cnd 2
12 picn π
13 12 a1i π
14 pire π
15 pipos 0 < π
16 14 15 gt0ne0ii π 0
17 16 a1i π 0
18 11 13 17 divcld 2 π
19 nnex V
20 19 mptex n 1 seq 1 × F n V
21 20 a1i n 1 seq 1 × F n V
22 12 a1i n π
23 22 halfcld n π 2
24 elnnuz n n 1
25 24 biimpi n n 1
26 oveq2 k = j 2 k = 2 j
27 26 oveq1d k = j 2 k 1 = 2 j 1
28 26 27 oveq12d k = j 2 k 2 k 1 = 2 j 2 j 1
29 26 oveq1d k = j 2 k + 1 = 2 j + 1
30 26 29 oveq12d k = j 2 k 2 k + 1 = 2 j 2 j + 1
31 28 30 oveq12d k = j 2 k 2 k 1 2 k 2 k + 1 = 2 j 2 j 1 2 j 2 j + 1
32 elfznn j 1 n j
33 2cnd j 2
34 nncn j j
35 33 34 mulcld j 2 j
36 1cnd j 1
37 35 36 subcld j 2 j 1
38 1red j 1
39 1t1e1 1 1 = 1
40 38 38 remulcld j 1 1
41 2re 2
42 41 a1i j 2
43 42 38 remulcld j 2 1
44 nnre j j
45 42 44 remulcld j 2 j
46 1rp 1 +
47 46 a1i j 1 +
48 1lt2 1 < 2
49 48 a1i j 1 < 2
50 38 42 47 49 ltmul1dd j 1 1 < 2 1
51 0le2 0 2
52 51 a1i j 0 2
53 nnge1 j 1 j
54 38 44 42 52 53 lemul2ad j 2 1 2 j
55 40 43 45 50 54 ltletrd j 1 1 < 2 j
56 39 55 eqbrtrrid j 1 < 2 j
57 38 56 gtned j 2 j 1
58 35 36 57 subne0d j 2 j 1 0
59 35 37 58 divcld j 2 j 2 j 1
60 35 36 addcld j 2 j + 1
61 0red j 0
62 45 38 readdcld j 2 j + 1
63 47 rpgt0d j 0 < 1
64 2rp 2 +
65 64 a1i j 2 +
66 nnrp j j +
67 65 66 rpmulcld j 2 j +
68 38 67 ltaddrp2d j 1 < 2 j + 1
69 61 38 62 63 68 lttrd j 0 < 2 j + 1
70 61 69 gtned j 2 j + 1 0
71 35 60 70 divcld j 2 j 2 j + 1
72 59 71 mulcld j 2 j 2 j 1 2 j 2 j + 1
73 32 72 syl j 1 n 2 j 2 j 1 2 j 2 j + 1
74 1 31 32 73 fvmptd3 j 1 n F j = 2 j 2 j 1 2 j 2 j + 1
75 64 a1i j 1 n 2 +
76 32 nnrpd j 1 n j +
77 75 76 rpmulcld j 1 n 2 j +
78 45 38 resubcld j 2 j 1
79 1m1e0 1 1 = 0
80 38 45 38 56 ltsub1dd j 1 1 < 2 j 1
81 79 80 eqbrtrrid j 0 < 2 j 1
82 78 81 elrpd j 2 j 1 +
83 32 82 syl j 1 n 2 j 1 +
84 77 83 rpdivcld j 1 n 2 j 2 j 1 +
85 41 a1i j 1 n 2
86 32 nnred j 1 n j
87 85 86 remulcld j 1 n 2 j
88 75 rpge0d j 1 n 0 2
89 76 rpge0d j 1 n 0 j
90 85 86 88 89 mulge0d j 1 n 0 2 j
91 87 90 ge0p1rpd j 1 n 2 j + 1 +
92 77 91 rpdivcld j 1 n 2 j 2 j + 1 +
93 84 92 rpmulcld j 1 n 2 j 2 j 1 2 j 2 j + 1 +
94 74 93 eqeltrd j 1 n F j +
95 94 adantl n j 1 n F j +
96 rpmulcl j + w + j w +
97 96 adantl n j + w + j w +
98 25 95 97 seqcl n seq 1 × F n +
99 98 rpcnd n seq 1 × F n
100 98 rpne0d n seq 1 × F n 0
101 99 100 reccld n 1 seq 1 × F n
102 23 101 mulcld n π 2 1 seq 1 × F n
103 7 102 fmpti n π 2 1 seq 1 × F n :
104 103 a1i n π 2 1 seq 1 × F n :
105 104 ffvelrnda j n π 2 1 seq 1 × F n j
106 fveq2 n = j seq 1 × F n = seq 1 × F j
107 106 eleq1d n = j seq 1 × F n + seq 1 × F j +
108 107 98 vtoclga j seq 1 × F j +
109 108 rpcnd j seq 1 × F j
110 108 rpne0d j seq 1 × F j 0
111 36 109 110 divrecd j 1 seq 1 × F j = 1 1 seq 1 × F j
112 12 a1i j π
113 65 rpne0d j 2 0
114 16 a1i j π 0
115 33 112 113 114 divcan6d j 2 π π 2 = 1
116 115 eqcomd j 1 = 2 π π 2
117 116 oveq1d j 1 1 seq 1 × F j = 2 π π 2 1 seq 1 × F j
118 33 112 114 divcld j 2 π
119 112 halfcld j π 2
120 109 110 reccld j 1 seq 1 × F j
121 118 119 120 mulassd j 2 π π 2 1 seq 1 × F j = 2 π π 2 1 seq 1 × F j
122 111 117 121 3eqtrd j 1 seq 1 × F j = 2 π π 2 1 seq 1 × F j
123 eqidd j n 1 seq 1 × F n = n 1 seq 1 × F n
124 106 oveq2d n = j 1 seq 1 × F n = 1 seq 1 × F j
125 124 adantl j n = j 1 seq 1 × F n = 1 seq 1 × F j
126 id j j
127 108 rpreccld j 1 seq 1 × F j +
128 123 125 126 127 fvmptd j n 1 seq 1 × F n j = 1 seq 1 × F j
129 eqidd j n π 2 1 seq 1 × F n = n π 2 1 seq 1 × F n
130 125 oveq2d j n = j π 2 1 seq 1 × F n = π 2 1 seq 1 × F j
131 119 120 mulcld j π 2 1 seq 1 × F j
132 129 130 126 131 fvmptd j n π 2 1 seq 1 × F n j = π 2 1 seq 1 × F j
133 132 oveq2d j 2 π n π 2 1 seq 1 × F n j = 2 π π 2 1 seq 1 × F j
134 122 128 133 3eqtr4d j n 1 seq 1 × F n j = 2 π n π 2 1 seq 1 × F n j
135 134 adantl j n 1 seq 1 × F n j = 2 π n π 2 1 seq 1 × F n j
136 3 4 10 18 21 105 135 climmulc2 n 1 seq 1 × F n 2 π 1
137 2cn 2
138 137 12 16 divcli 2 π
139 138 mulid1i 2 π 1 = 2 π
140 136 139 breqtrdi n 1 seq 1 × F n 2 π
141 2ne0 2 0
142 137 12 141 16 divne0i 2 π 0
143 142 a1i 2 π 0
144 128 120 eqeltrd j n 1 seq 1 × F n j
145 109 110 recne0d j 1 seq 1 × F j 0
146 128 145 eqnetrd j n 1 seq 1 × F n j 0
147 nelsn n 1 seq 1 × F n j 0 ¬ n 1 seq 1 × F n j 0
148 146 147 syl j ¬ n 1 seq 1 × F n j 0
149 144 148 eldifd j n 1 seq 1 × F n j 0
150 149 adantl j n 1 seq 1 × F n j 0
151 109 110 recrecd j 1 1 seq 1 × F j = seq 1 × F j
152 123 125 126 120 fvmptd j n 1 seq 1 × F n j = 1 seq 1 × F j
153 152 oveq2d j 1 n 1 seq 1 × F n j = 1 1 seq 1 × F j
154 106 2 98 fvmpt3 j W j = seq 1 × F j
155 151 153 154 3eqtr4rd j W j = 1 n 1 seq 1 × F n j
156 155 adantl j W j = 1 n 1 seq 1 × F n j
157 19 mptex n seq 1 × F n V
158 2 157 eqeltri W V
159 158 a1i W V
160 3 4 140 143 150 156 159 climrec W 1 2 π
161 160 mptru W 1 2 π
162 recdiv 2 2 0 π π 0 1 2 π = π 2
163 137 141 12 16 162 mp4an 1 2 π = π 2
164 161 163 breqtri W π 2