Metamath Proof Explorer


Theorem binomlem

Description: Lemma for binom (binomial theorem). Inductive step. (Contributed by NM, 6-Dec-2005) (Revised by Mario Carneiro, 24-Apr-2014)

Ref Expression
Hypotheses binomlem.1 φ A
binomlem.2 φ B
binomlem.3 φ N 0
binomlem.4 ψ A + B N = k = 0 N ( N k) A N k B k
Assertion binomlem φ ψ A + B N + 1 = k = 0 N + 1 ( N + 1 k) A N + 1 - k B k

Proof

Step Hyp Ref Expression
1 binomlem.1 φ A
2 binomlem.2 φ B
3 binomlem.3 φ N 0
4 binomlem.4 ψ A + B N = k = 0 N ( N k) A N k B k
5 4 adantl φ ψ A + B N = k = 0 N ( N k) A N k B k
6 5 oveq1d φ ψ A + B N A = k = 0 N ( N k) A N k B k A
7 fzfid φ 0 N Fin
8 fzelp1 k 0 N k 0 N + 1
9 elfzelz k 0 N + 1 k
10 bccl N 0 k ( N k) 0
11 3 9 10 syl2an φ k 0 N + 1 ( N k) 0
12 11 nn0cnd φ k 0 N + 1 ( N k)
13 8 12 sylan2 φ k 0 N ( N k)
14 fznn0sub k 0 N N k 0
15 expcl A N k 0 A N k
16 1 14 15 syl2an φ k 0 N A N k
17 elfznn0 k 0 N + 1 k 0
18 expcl B k 0 B k
19 2 17 18 syl2an φ k 0 N + 1 B k
20 8 19 sylan2 φ k 0 N B k
21 16 20 mulcld φ k 0 N A N k B k
22 13 21 mulcld φ k 0 N ( N k) A N k B k
23 7 1 22 fsummulc1 φ k = 0 N ( N k) A N k B k A = k = 0 N ( N k) A N k B k A
24 1 adantr φ k 0 N A
25 13 21 24 mulassd φ k 0 N ( N k) A N k B k A = ( N k) A N k B k A
26 3 nn0cnd φ N
27 26 adantr φ k 0 N N
28 1cnd φ k 0 N 1
29 elfzelz k 0 N k
30 29 adantl φ k 0 N k
31 30 zcnd φ k 0 N k
32 27 28 31 addsubd φ k 0 N N + 1 - k = N - k + 1
33 32 oveq2d φ k 0 N A N + 1 - k = A N - k + 1
34 expp1 A N k 0 A N - k + 1 = A N k A
35 1 14 34 syl2an φ k 0 N A N - k + 1 = A N k A
36 33 35 eqtrd φ k 0 N A N + 1 - k = A N k A
37 36 oveq1d φ k 0 N A N + 1 - k B k = A N k A B k
38 16 24 20 mul32d φ k 0 N A N k A B k = A N k B k A
39 37 38 eqtrd φ k 0 N A N + 1 - k B k = A N k B k A
40 39 oveq2d φ k 0 N ( N k) A N + 1 - k B k = ( N k) A N k B k A
41 25 40 eqtr4d φ k 0 N ( N k) A N k B k A = ( N k) A N + 1 - k B k
42 41 sumeq2dv φ k = 0 N ( N k) A N k B k A = k = 0 N ( N k) A N + 1 - k B k
43 fzssp1 0 N 0 N + 1
44 43 a1i φ 0 N 0 N + 1
45 fznn0sub k 0 N + 1 N + 1 - k 0
46 expcl A N + 1 - k 0 A N + 1 - k
47 1 45 46 syl2an φ k 0 N + 1 A N + 1 - k
48 47 19 mulcld φ k 0 N + 1 A N + 1 - k B k
49 12 48 mulcld φ k 0 N + 1 ( N k) A N + 1 - k B k
50 8 49 sylan2 φ k 0 N ( N k) A N + 1 - k B k
51 3 adantr φ k 0 N + 1 0 N N 0
52 eldifi k 0 N + 1 0 N k 0 N + 1
53 52 9 syl k 0 N + 1 0 N k
54 53 adantl φ k 0 N + 1 0 N k
55 eldifn k 0 N + 1 0 N ¬ k 0 N
56 55 adantl φ k 0 N + 1 0 N ¬ k 0 N
57 bcval3 N 0 k ¬ k 0 N ( N k) = 0
58 51 54 56 57 syl3anc φ k 0 N + 1 0 N ( N k) = 0
59 58 oveq1d φ k 0 N + 1 0 N ( N k) A N + 1 - k B k = 0 A N + 1 - k B k
60 48 mul02d φ k 0 N + 1 0 A N + 1 - k B k = 0
61 52 60 sylan2 φ k 0 N + 1 0 N 0 A N + 1 - k B k = 0
62 59 61 eqtrd φ k 0 N + 1 0 N ( N k) A N + 1 - k B k = 0
63 fzssuz 0 N + 1 0
64 63 a1i φ 0 N + 1 0
65 44 50 62 64 sumss φ k = 0 N ( N k) A N + 1 - k B k = k = 0 N + 1 ( N k) A N + 1 - k B k
66 23 42 65 3eqtrd φ k = 0 N ( N k) A N k B k A = k = 0 N + 1 ( N k) A N + 1 - k B k
67 66 adantr φ ψ k = 0 N ( N k) A N k B k A = k = 0 N + 1 ( N k) A N + 1 - k B k
68 6 67 eqtrd φ ψ A + B N A = k = 0 N + 1 ( N k) A N + 1 - k B k
69 4 oveq1d ψ A + B N B = k = 0 N ( N k) A N k B k B
70 7 2 22 fsummulc1 φ k = 0 N ( N k) A N k B k B = k = 0 N ( N k) A N k B k B
71 1zzd φ 1
72 0z 0
73 72 a1i φ 0
74 3 nn0zd φ N
75 2 adantr φ k 0 N B
76 22 75 mulcld φ k 0 N ( N k) A N k B k B
77 oveq2 k = j 1 ( N k) = ( N j 1 )
78 oveq2 k = j 1 N k = N j 1
79 78 oveq2d k = j 1 A N k = A N j 1
80 oveq2 k = j 1 B k = B j 1
81 79 80 oveq12d k = j 1 A N k B k = A N j 1 B j 1
82 77 81 oveq12d k = j 1 ( N k) A N k B k = ( N j 1 ) A N j 1 B j 1
83 82 oveq1d k = j 1 ( N k) A N k B k B = ( N j 1 ) A N j 1 B j 1 B
84 71 73 74 76 83 fsumshft φ k = 0 N ( N k) A N k B k B = j = 0 + 1 N + 1 ( N j 1 ) A N j 1 B j 1 B
85 oveq1 j = k j 1 = k 1
86 85 oveq2d j = k ( N j 1 ) = ( N k 1 )
87 85 oveq2d j = k N j 1 = N k 1
88 87 oveq2d j = k A N j 1 = A N k 1
89 85 oveq2d j = k B j 1 = B k 1
90 88 89 oveq12d j = k A N j 1 B j 1 = A N k 1 B k 1
91 86 90 oveq12d j = k ( N j 1 ) A N j 1 B j 1 = ( N k 1 ) A N k 1 B k 1
92 91 oveq1d j = k ( N j 1 ) A N j 1 B j 1 B = ( N k 1 ) A N k 1 B k 1 B
93 92 cbvsumv j = 0 + 1 N + 1 ( N j 1 ) A N j 1 B j 1 B = k = 0 + 1 N + 1 ( N k 1 ) A N k 1 B k 1 B
94 84 93 eqtrdi φ k = 0 N ( N k) A N k B k B = k = 0 + 1 N + 1 ( N k 1 ) A N k 1 B k 1 B
95 26 adantr φ k 0 + 1 N + 1 N
96 elfzelz k 0 + 1 N + 1 k
97 96 adantl φ k 0 + 1 N + 1 k
98 97 zcnd φ k 0 + 1 N + 1 k
99 1cnd φ k 0 + 1 N + 1 1
100 95 98 99 subsub3d φ k 0 + 1 N + 1 N k 1 = N + 1 - k
101 100 oveq2d φ k 0 + 1 N + 1 A N k 1 = A N + 1 - k
102 101 oveq1d φ k 0 + 1 N + 1 A N k 1 B k 1 = A N + 1 - k B k 1
103 102 oveq2d φ k 0 + 1 N + 1 ( N k 1 ) A N k 1 B k 1 = ( N k 1 ) A N + 1 - k B k 1
104 103 oveq1d φ k 0 + 1 N + 1 ( N k 1 ) A N k 1 B k 1 B = ( N k 1 ) A N + 1 - k B k 1 B
105 fzp1ss 0 0 + 1 N + 1 0 N + 1
106 72 105 ax-mp 0 + 1 N + 1 0 N + 1
107 106 sseli k 0 + 1 N + 1 k 0 N + 1
108 9 adantl φ k 0 N + 1 k
109 peano2zm k k 1
110 108 109 syl φ k 0 N + 1 k 1
111 bccl N 0 k 1 ( N k 1 ) 0
112 3 110 111 syl2an2r φ k 0 N + 1 ( N k 1 ) 0
113 112 nn0cnd φ k 0 N + 1 ( N k 1 )
114 107 113 sylan2 φ k 0 + 1 N + 1 ( N k 1 )
115 107 47 sylan2 φ k 0 + 1 N + 1 A N + 1 - k
116 2 adantr φ k 0 + 1 N + 1 B
117 elfznn k 1 N + 1 k
118 0p1e1 0 + 1 = 1
119 118 oveq1i 0 + 1 N + 1 = 1 N + 1
120 117 119 eleq2s k 0 + 1 N + 1 k
121 120 adantl φ k 0 + 1 N + 1 k
122 nnm1nn0 k k 1 0
123 121 122 syl φ k 0 + 1 N + 1 k 1 0
124 116 123 expcld φ k 0 + 1 N + 1 B k 1
125 115 124 mulcld φ k 0 + 1 N + 1 A N + 1 - k B k 1
126 114 125 116 mulassd φ k 0 + 1 N + 1 ( N k 1 ) A N + 1 - k B k 1 B = ( N k 1 ) A N + 1 - k B k 1 B
127 115 124 116 mulassd φ k 0 + 1 N + 1 A N + 1 - k B k 1 B = A N + 1 - k B k 1 B
128 expm1t B k B k = B k 1 B
129 2 120 128 syl2an φ k 0 + 1 N + 1 B k = B k 1 B
130 129 oveq2d φ k 0 + 1 N + 1 A N + 1 - k B k = A N + 1 - k B k 1 B
131 127 130 eqtr4d φ k 0 + 1 N + 1 A N + 1 - k B k 1 B = A N + 1 - k B k
132 131 oveq2d φ k 0 + 1 N + 1 ( N k 1 ) A N + 1 - k B k 1 B = ( N k 1 ) A N + 1 - k B k
133 104 126 132 3eqtrd φ k 0 + 1 N + 1 ( N k 1 ) A N k 1 B k 1 B = ( N k 1 ) A N + 1 - k B k
134 133 sumeq2dv φ k = 0 + 1 N + 1 ( N k 1 ) A N k 1 B k 1 B = k = 0 + 1 N + 1 ( N k 1 ) A N + 1 - k B k
135 106 a1i φ 0 + 1 N + 1 0 N + 1
136 113 48 mulcld φ k 0 N + 1 ( N k 1 ) A N + 1 - k B k
137 107 136 sylan2 φ k 0 + 1 N + 1 ( N k 1 ) A N + 1 - k B k
138 3 adantr φ k 0 N + 1 0 + 1 N + 1 N 0
139 eldifi k 0 N + 1 0 + 1 N + 1 k 0 N + 1
140 139 adantl φ k 0 N + 1 0 + 1 N + 1 k 0 N + 1
141 140 9 syl φ k 0 N + 1 0 + 1 N + 1 k
142 141 109 syl φ k 0 N + 1 0 + 1 N + 1 k 1
143 eldifn k 0 N + 1 0 + 1 N + 1 ¬ k 0 + 1 N + 1
144 143 adantl φ k 0 N + 1 0 + 1 N + 1 ¬ k 0 + 1 N + 1
145 72 a1i φ k 0 N + 1 0 + 1 N + 1 0
146 138 nn0zd φ k 0 N + 1 0 + 1 N + 1 N
147 1zzd φ k 0 N + 1 0 + 1 N + 1 1
148 fzaddel 0 N k 1 1 k 1 0 N k - 1 + 1 0 + 1 N + 1
149 145 146 142 147 148 syl22anc φ k 0 N + 1 0 + 1 N + 1 k 1 0 N k - 1 + 1 0 + 1 N + 1
150 141 zcnd φ k 0 N + 1 0 + 1 N + 1 k
151 ax-1cn 1
152 npcan k 1 k - 1 + 1 = k
153 150 151 152 sylancl φ k 0 N + 1 0 + 1 N + 1 k - 1 + 1 = k
154 153 eleq1d φ k 0 N + 1 0 + 1 N + 1 k - 1 + 1 0 + 1 N + 1 k 0 + 1 N + 1
155 149 154 bitrd φ k 0 N + 1 0 + 1 N + 1 k 1 0 N k 0 + 1 N + 1
156 144 155 mtbird φ k 0 N + 1 0 + 1 N + 1 ¬ k 1 0 N
157 bcval3 N 0 k 1 ¬ k 1 0 N ( N k 1 ) = 0
158 138 142 156 157 syl3anc φ k 0 N + 1 0 + 1 N + 1 ( N k 1 ) = 0
159 158 oveq1d φ k 0 N + 1 0 + 1 N + 1 ( N k 1 ) A N + 1 - k B k = 0 A N + 1 - k B k
160 139 60 sylan2 φ k 0 N + 1 0 + 1 N + 1 0 A N + 1 - k B k = 0
161 159 160 eqtrd φ k 0 N + 1 0 + 1 N + 1 ( N k 1 ) A N + 1 - k B k = 0
162 135 137 161 64 sumss φ k = 0 + 1 N + 1 ( N k 1 ) A N + 1 - k B k = k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
163 94 134 162 3eqtrd φ k = 0 N ( N k) A N k B k B = k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
164 70 163 eqtrd φ k = 0 N ( N k) A N k B k B = k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
165 69 164 sylan9eqr φ ψ A + B N B = k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
166 68 165 oveq12d φ ψ A + B N A + A + B N B = k = 0 N + 1 ( N k) A N + 1 - k B k + k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
167 1 2 addcld φ A + B
168 167 3 expp1d φ A + B N + 1 = A + B N A + B
169 167 3 expcld φ A + B N
170 169 1 2 adddid φ A + B N A + B = A + B N A + A + B N B
171 168 170 eqtrd φ A + B N + 1 = A + B N A + A + B N B
172 171 adantr φ ψ A + B N + 1 = A + B N A + A + B N B
173 bcpasc N 0 k ( N k) + ( N k 1 ) = ( N + 1 k)
174 3 9 173 syl2an φ k 0 N + 1 ( N k) + ( N k 1 ) = ( N + 1 k)
175 174 oveq1d φ k 0 N + 1 ( N k) + ( N k 1 ) A N + 1 - k B k = ( N + 1 k) A N + 1 - k B k
176 12 113 48 adddird φ k 0 N + 1 ( N k) + ( N k 1 ) A N + 1 - k B k = ( N k) A N + 1 - k B k + ( N k 1 ) A N + 1 - k B k
177 175 176 eqtr3d φ k 0 N + 1 ( N + 1 k) A N + 1 - k B k = ( N k) A N + 1 - k B k + ( N k 1 ) A N + 1 - k B k
178 177 sumeq2dv φ k = 0 N + 1 ( N + 1 k) A N + 1 - k B k = k = 0 N + 1 ( N k) A N + 1 - k B k + ( N k 1 ) A N + 1 - k B k
179 fzfid φ 0 N + 1 Fin
180 179 49 136 fsumadd φ k = 0 N + 1 ( N k) A N + 1 - k B k + ( N k 1 ) A N + 1 - k B k = k = 0 N + 1 ( N k) A N + 1 - k B k + k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
181 178 180 eqtrd φ k = 0 N + 1 ( N + 1 k) A N + 1 - k B k = k = 0 N + 1 ( N k) A N + 1 - k B k + k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
182 181 adantr φ ψ k = 0 N + 1 ( N + 1 k) A N + 1 - k B k = k = 0 N + 1 ( N k) A N + 1 - k B k + k = 0 N + 1 ( N k 1 ) A N + 1 - k B k
183 166 172 182 3eqtr4d φ ψ A + B N + 1 = k = 0 N + 1 ( N + 1 k) A N + 1 - k B k