Metamath Proof Explorer


Theorem geo2sum

Description: The value of the finite geometric series 2 ^ -u 1 + 2 ^ -u 2 + ... + 2 ^ -u N , multiplied by a constant. (Contributed by Mario Carneiro, 17-Mar-2014) (Revised by Mario Carneiro, 26-Apr-2014)

Ref Expression
Assertion geo2sum N A k = 1 N A 2 k = A A 2 N

Proof

Step Hyp Ref Expression
1 1zzd N A 1
2 nnz N N
3 2 adantr N A N
4 simplr N A k 1 N A
5 2nn 2
6 elfznn k 1 N k
7 6 adantl N A k 1 N k
8 7 nnnn0d N A k 1 N k 0
9 nnexpcl 2 k 0 2 k
10 5 8 9 sylancr N A k 1 N 2 k
11 10 nncnd N A k 1 N 2 k
12 10 nnne0d N A k 1 N 2 k 0
13 4 11 12 divcld N A k 1 N A 2 k
14 oveq2 k = j + 1 2 k = 2 j + 1
15 14 oveq2d k = j + 1 A 2 k = A 2 j + 1
16 1 1 3 13 15 fsumshftm N A k = 1 N A 2 k = j = 1 1 N 1 A 2 j + 1
17 1m1e0 1 1 = 0
18 17 oveq1i 1 1 N 1 = 0 N 1
19 18 sumeq1i j = 1 1 N 1 A 2 j + 1 = j = 0 N 1 A 2 j + 1
20 halfcn 1 2
21 elfznn0 j 0 N 1 j 0
22 21 adantl N A j 0 N 1 j 0
23 expcl 1 2 j 0 1 2 j
24 20 22 23 sylancr N A j 0 N 1 1 2 j
25 2cnd N A j 0 N 1 2
26 2ne0 2 0
27 26 a1i N A j 0 N 1 2 0
28 24 25 27 divrecd N A j 0 N 1 1 2 j 2 = 1 2 j 1 2
29 expp1 1 2 j 0 1 2 j + 1 = 1 2 j 1 2
30 20 22 29 sylancr N A j 0 N 1 1 2 j + 1 = 1 2 j 1 2
31 elfzelz j 0 N 1 j
32 31 peano2zd j 0 N 1 j + 1
33 32 adantl N A j 0 N 1 j + 1
34 25 27 33 exprecd N A j 0 N 1 1 2 j + 1 = 1 2 j + 1
35 28 30 34 3eqtr2rd N A j 0 N 1 1 2 j + 1 = 1 2 j 2
36 35 oveq2d N A j 0 N 1 A 1 2 j + 1 = A 1 2 j 2
37 simplr N A j 0 N 1 A
38 peano2nn0 j 0 j + 1 0
39 22 38 syl N A j 0 N 1 j + 1 0
40 nnexpcl 2 j + 1 0 2 j + 1
41 5 39 40 sylancr N A j 0 N 1 2 j + 1
42 41 nncnd N A j 0 N 1 2 j + 1
43 41 nnne0d N A j 0 N 1 2 j + 1 0
44 37 42 43 divrecd N A j 0 N 1 A 2 j + 1 = A 1 2 j + 1
45 24 37 25 27 div12d N A j 0 N 1 1 2 j A 2 = A 1 2 j 2
46 36 44 45 3eqtr4d N A j 0 N 1 A 2 j + 1 = 1 2 j A 2
47 46 sumeq2dv N A j = 0 N 1 A 2 j + 1 = j = 0 N 1 1 2 j A 2
48 fzfid N A 0 N 1 Fin
49 halfcl A A 2
50 49 adantl N A A 2
51 48 50 24 fsummulc1 N A j = 0 N 1 1 2 j A 2 = j = 0 N 1 1 2 j A 2
52 47 51 eqtr4d N A j = 0 N 1 A 2 j + 1 = j = 0 N 1 1 2 j A 2
53 19 52 eqtrid N A j = 1 1 N 1 A 2 j + 1 = j = 0 N 1 1 2 j A 2
54 2cnd N A 2
55 26 a1i N A 2 0
56 54 55 3 exprecd N A 1 2 N = 1 2 N
57 56 oveq2d N A 1 1 2 N = 1 1 2 N
58 1mhlfehlf 1 1 2 = 1 2
59 58 a1i N A 1 1 2 = 1 2
60 57 59 oveq12d N A 1 1 2 N 1 1 2 = 1 1 2 N 1 2
61 simpr N A A
62 61 54 55 divrec2d N A A 2 = 1 2 A
63 60 62 oveq12d N A 1 1 2 N 1 1 2 A 2 = 1 1 2 N 1 2 1 2 A
64 ax-1cn 1
65 nnnn0 N N 0
66 65 adantr N A N 0
67 nnexpcl 2 N 0 2 N
68 5 66 67 sylancr N A 2 N
69 68 nnrecred N A 1 2 N
70 69 recnd N A 1 2 N
71 subcl 1 1 2 N 1 1 2 N
72 64 70 71 sylancr N A 1 1 2 N
73 20 a1i N A 1 2
74 0re 0
75 halfgt0 0 < 1 2
76 74 75 gtneii 1 2 0
77 76 a1i N A 1 2 0
78 72 73 77 divcld N A 1 1 2 N 1 2
79 78 73 61 mulassd N A 1 1 2 N 1 2 1 2 A = 1 1 2 N 1 2 1 2 A
80 72 73 77 divcan1d N A 1 1 2 N 1 2 1 2 = 1 1 2 N
81 80 oveq1d N A 1 1 2 N 1 2 1 2 A = 1 1 2 N A
82 63 79 81 3eqtr2d N A 1 1 2 N 1 1 2 A 2 = 1 1 2 N A
83 halfre 1 2
84 halflt1 1 2 < 1
85 83 84 ltneii 1 2 1
86 85 a1i N A 1 2 1
87 73 86 66 geoser N A j = 0 N 1 1 2 j = 1 1 2 N 1 1 2
88 87 oveq1d N A j = 0 N 1 1 2 j A 2 = 1 1 2 N 1 1 2 A 2
89 mulid2 A 1 A = A
90 89 adantl N A 1 A = A
91 90 eqcomd N A A = 1 A
92 68 nncnd N A 2 N
93 68 nnne0d N A 2 N 0
94 61 92 93 divrec2d N A A 2 N = 1 2 N A
95 91 94 oveq12d N A A A 2 N = 1 A 1 2 N A
96 64 a1i N A 1
97 96 70 61 subdird N A 1 1 2 N A = 1 A 1 2 N A
98 95 97 eqtr4d N A A A 2 N = 1 1 2 N A
99 82 88 98 3eqtr4d N A j = 0 N 1 1 2 j A 2 = A A 2 N
100 16 53 99 3eqtrd N A k = 1 N A 2 k = A A 2 N