Metamath Proof Explorer


Theorem geo2sum2

Description: The value of the finite geometric series 1 + 2 + 4 + 8 + ... + 2 ^ ( N - 1 ) . (Contributed by Mario Carneiro, 7-Sep-2016)

Ref Expression
Assertion geo2sum2 N 0 k 0 ..^ N 2 k = 2 N 1

Proof

Step Hyp Ref Expression
1 nn0z N 0 N
2 fzoval N 0 ..^ N = 0 N 1
3 1 2 syl N 0 0 ..^ N = 0 N 1
4 3 sumeq1d N 0 k 0 ..^ N 2 k = k = 0 N 1 2 k
5 2cn 2
6 5 a1i N 0 2
7 1ne2 1 2
8 7 necomi 2 1
9 8 a1i N 0 2 1
10 id N 0 N 0
11 6 9 10 geoser N 0 k = 0 N 1 2 k = 1 2 N 1 2
12 6 10 expcld N 0 2 N
13 ax-1cn 1
14 13 a1i N 0 1
15 12 14 subcld N 0 2 N 1
16 ax-1ne0 1 0
17 16 a1i N 0 1 0
18 15 14 17 div2negd N 0 2 N 1 1 = 2 N 1 1
19 12 14 negsubdi2d N 0 2 N 1 = 1 2 N
20 2m1e1 2 1 = 1
21 20 negeqi 2 1 = 1
22 5 13 negsubdi2i 2 1 = 1 2
23 21 22 eqtr3i 1 = 1 2
24 23 a1i N 0 1 = 1 2
25 19 24 oveq12d N 0 2 N 1 1 = 1 2 N 1 2
26 15 div1d N 0 2 N 1 1 = 2 N 1
27 18 25 26 3eqtr3d N 0 1 2 N 1 2 = 2 N 1
28 4 11 27 3eqtrd N 0 k 0 ..^ N 2 k = 2 N 1