Metamath Proof Explorer


Theorem binom

Description: The binomial theorem: ( A + B ) ^ N is the sum from k = 0 to N of ( N _C k ) x. ( ( A ^ k ) x. ( B ^ ( N - k ) ) . Theorem 15-2.8 of Gleason p. 296. This part of the proof sets up the induction and does the base case, with the bulk of the work (the induction step) in binomlem . This is Metamath 100 proof #44. (Contributed by NM, 7-Dec-2005) (Proof shortened by Mario Carneiro, 24-Apr-2014)

Ref Expression
Assertion binom A B N 0 A + B N = k = 0 N ( N k) A N k B k

Proof

Step Hyp Ref Expression
1 oveq2 x = 0 A + B x = A + B 0
2 oveq2 x = 0 0 x = 0 0
3 oveq1 x = 0 ( x k) = ( 0 k)
4 oveq1 x = 0 x k = 0 k
5 4 oveq2d x = 0 A x k = A 0 k
6 5 oveq1d x = 0 A x k B k = A 0 k B k
7 3 6 oveq12d x = 0 ( x k) A x k B k = ( 0 k) A 0 k B k
8 7 adantr x = 0 k 0 x ( x k) A x k B k = ( 0 k) A 0 k B k
9 2 8 sumeq12dv x = 0 k = 0 x ( x k) A x k B k = k = 0 0 ( 0 k) A 0 k B k
10 1 9 eqeq12d x = 0 A + B x = k = 0 x ( x k) A x k B k A + B 0 = k = 0 0 ( 0 k) A 0 k B k
11 10 imbi2d x = 0 A B A + B x = k = 0 x ( x k) A x k B k A B A + B 0 = k = 0 0 ( 0 k) A 0 k B k
12 oveq2 x = n A + B x = A + B n
13 oveq2 x = n 0 x = 0 n
14 oveq1 x = n ( x k) = ( n k)
15 oveq1 x = n x k = n k
16 15 oveq2d x = n A x k = A n k
17 16 oveq1d x = n A x k B k = A n k B k
18 14 17 oveq12d x = n ( x k) A x k B k = ( n k) A n k B k
19 18 adantr x = n k 0 x ( x k) A x k B k = ( n k) A n k B k
20 13 19 sumeq12dv x = n k = 0 x ( x k) A x k B k = k = 0 n ( n k) A n k B k
21 12 20 eqeq12d x = n A + B x = k = 0 x ( x k) A x k B k A + B n = k = 0 n ( n k) A n k B k
22 21 imbi2d x = n A B A + B x = k = 0 x ( x k) A x k B k A B A + B n = k = 0 n ( n k) A n k B k
23 oveq2 x = n + 1 A + B x = A + B n + 1
24 oveq2 x = n + 1 0 x = 0 n + 1
25 oveq1 x = n + 1 ( x k) = ( n + 1 k)
26 oveq1 x = n + 1 x k = n + 1 - k
27 26 oveq2d x = n + 1 A x k = A n + 1 - k
28 27 oveq1d x = n + 1 A x k B k = A n + 1 - k B k
29 25 28 oveq12d x = n + 1 ( x k) A x k B k = ( n + 1 k) A n + 1 - k B k
30 29 adantr x = n + 1 k 0 x ( x k) A x k B k = ( n + 1 k) A n + 1 - k B k
31 24 30 sumeq12dv x = n + 1 k = 0 x ( x k) A x k B k = k = 0 n + 1 ( n + 1 k) A n + 1 - k B k
32 23 31 eqeq12d x = n + 1 A + B x = k = 0 x ( x k) A x k B k A + B n + 1 = k = 0 n + 1 ( n + 1 k) A n + 1 - k B k
33 32 imbi2d x = n + 1 A B A + B x = k = 0 x ( x k) A x k B k A B A + B n + 1 = k = 0 n + 1 ( n + 1 k) A n + 1 - k B k
34 oveq2 x = N A + B x = A + B N
35 oveq2 x = N 0 x = 0 N
36 oveq1 x = N ( x k) = ( N k)
37 oveq1 x = N x k = N k
38 37 oveq2d x = N A x k = A N k
39 38 oveq1d x = N A x k B k = A N k B k
40 36 39 oveq12d x = N ( x k) A x k B k = ( N k) A N k B k
41 40 adantr x = N k 0 x ( x k) A x k B k = ( N k) A N k B k
42 35 41 sumeq12dv x = N k = 0 x ( x k) A x k B k = k = 0 N ( N k) A N k B k
43 34 42 eqeq12d x = N A + B x = k = 0 x ( x k) A x k B k A + B N = k = 0 N ( N k) A N k B k
44 43 imbi2d x = N A B A + B x = k = 0 x ( x k) A x k B k A B A + B N = k = 0 N ( N k) A N k B k
45 exp0 A A 0 = 1
46 exp0 B B 0 = 1
47 45 46 oveqan12d A B A 0 B 0 = 1 1
48 1t1e1 1 1 = 1
49 47 48 eqtrdi A B A 0 B 0 = 1
50 49 oveq2d A B 1 A 0 B 0 = 1 1
51 50 48 eqtrdi A B 1 A 0 B 0 = 1
52 0z 0
53 ax-1cn 1
54 51 53 eqeltrdi A B 1 A 0 B 0
55 oveq2 k = 0 ( 0 k) = ( 0 0 )
56 0nn0 0 0
57 bcn0 0 0 ( 0 0 ) = 1
58 56 57 ax-mp ( 0 0 ) = 1
59 55 58 eqtrdi k = 0 ( 0 k) = 1
60 oveq2 k = 0 0 k = 0 0
61 0m0e0 0 0 = 0
62 60 61 eqtrdi k = 0 0 k = 0
63 62 oveq2d k = 0 A 0 k = A 0
64 oveq2 k = 0 B k = B 0
65 63 64 oveq12d k = 0 A 0 k B k = A 0 B 0
66 59 65 oveq12d k = 0 ( 0 k) A 0 k B k = 1 A 0 B 0
67 66 fsum1 0 1 A 0 B 0 k = 0 0 ( 0 k) A 0 k B k = 1 A 0 B 0
68 52 54 67 sylancr A B k = 0 0 ( 0 k) A 0 k B k = 1 A 0 B 0
69 addcl A B A + B
70 69 exp0d A B A + B 0 = 1
71 51 68 70 3eqtr4rd A B A + B 0 = k = 0 0 ( 0 k) A 0 k B k
72 simprl n 0 A B A
73 simprr n 0 A B B
74 simpl n 0 A B n 0
75 id A + B n = k = 0 n ( n k) A n k B k A + B n = k = 0 n ( n k) A n k B k
76 72 73 74 75 binomlem n 0 A B A + B n = k = 0 n ( n k) A n k B k A + B n + 1 = k = 0 n + 1 ( n + 1 k) A n + 1 - k B k
77 76 exp31 n 0 A B A + B n = k = 0 n ( n k) A n k B k A + B n + 1 = k = 0 n + 1 ( n + 1 k) A n + 1 - k B k
78 77 a2d n 0 A B A + B n = k = 0 n ( n k) A n k B k A B A + B n + 1 = k = 0 n + 1 ( n + 1 k) A n + 1 - k B k
79 11 22 33 44 71 78 nn0ind N 0 A B A + B N = k = 0 N ( N k) A N k B k
80 79 impcom A B N 0 A + B N = k = 0 N ( N k) A N k B k
81 80 3impa A B N 0 A + B N = k = 0 N ( N k) A N k B k