Metamath Proof Explorer


Theorem bccolsum

Description: A column-sum rule for binomial coefficents. (Contributed by Scott Fenton, 24-Jun-2020)

Ref Expression
Assertion bccolsum N 0 C 0 k = 0 N ( k C) = ( N + 1 C + 1 )

Proof

Step Hyp Ref Expression
1 oveq2 m = 0 0 m = 0 0
2 1 sumeq1d m = 0 k = 0 m ( k C) = k = 0 0 ( k C)
3 oveq1 m = 0 m + 1 = 0 + 1
4 0p1e1 0 + 1 = 1
5 3 4 eqtrdi m = 0 m + 1 = 1
6 5 oveq1d m = 0 ( m + 1 C + 1 ) = ( 1 C + 1 )
7 2 6 eqeq12d m = 0 k = 0 m ( k C) = ( m + 1 C + 1 ) k = 0 0 ( k C) = ( 1 C + 1 )
8 7 imbi2d m = 0 C 0 k = 0 m ( k C) = ( m + 1 C + 1 ) C 0 k = 0 0 ( k C) = ( 1 C + 1 )
9 oveq2 m = n 0 m = 0 n
10 9 sumeq1d m = n k = 0 m ( k C) = k = 0 n ( k C)
11 oveq1 m = n m + 1 = n + 1
12 11 oveq1d m = n ( m + 1 C + 1 ) = ( n + 1 C + 1 )
13 10 12 eqeq12d m = n k = 0 m ( k C) = ( m + 1 C + 1 ) k = 0 n ( k C) = ( n + 1 C + 1 )
14 13 imbi2d m = n C 0 k = 0 m ( k C) = ( m + 1 C + 1 ) C 0 k = 0 n ( k C) = ( n + 1 C + 1 )
15 oveq2 m = n + 1 0 m = 0 n + 1
16 15 sumeq1d m = n + 1 k = 0 m ( k C) = k = 0 n + 1 ( k C)
17 oveq1 m = n + 1 m + 1 = n + 1 + 1
18 17 oveq1d m = n + 1 ( m + 1 C + 1 ) = ( n + 1 + 1 C + 1 )
19 16 18 eqeq12d m = n + 1 k = 0 m ( k C) = ( m + 1 C + 1 ) k = 0 n + 1 ( k C) = ( n + 1 + 1 C + 1 )
20 19 imbi2d m = n + 1 C 0 k = 0 m ( k C) = ( m + 1 C + 1 ) C 0 k = 0 n + 1 ( k C) = ( n + 1 + 1 C + 1 )
21 oveq2 m = N 0 m = 0 N
22 21 sumeq1d m = N k = 0 m ( k C) = k = 0 N ( k C)
23 oveq1 m = N m + 1 = N + 1
24 23 oveq1d m = N ( m + 1 C + 1 ) = ( N + 1 C + 1 )
25 22 24 eqeq12d m = N k = 0 m ( k C) = ( m + 1 C + 1 ) k = 0 N ( k C) = ( N + 1 C + 1 )
26 25 imbi2d m = N C 0 k = 0 m ( k C) = ( m + 1 C + 1 ) C 0 k = 0 N ( k C) = ( N + 1 C + 1 )
27 0z 0
28 0nn0 0 0
29 nn0z C 0 C
30 bccl 0 0 C ( 0 C) 0
31 28 29 30 sylancr C 0 ( 0 C) 0
32 31 nn0cnd C 0 ( 0 C)
33 oveq1 k = 0 ( k C) = ( 0 C)
34 33 fsum1 0 ( 0 C) k = 0 0 ( k C) = ( 0 C)
35 27 32 34 sylancr C 0 k = 0 0 ( k C) = ( 0 C)
36 elnn0 C 0 C C = 0
37 1red C 1
38 nnrp C C +
39 37 38 ltaddrp2d C 1 < C + 1
40 peano2nn C C + 1
41 40 nnred C C + 1
42 37 41 ltnled C 1 < C + 1 ¬ C + 1 1
43 39 42 mpbid C ¬ C + 1 1
44 elfzle2 C + 1 0 1 C + 1 1
45 43 44 nsyl C ¬ C + 1 0 1
46 45 iffalsed C if C + 1 0 1 1 ! 1 C + 1 ! C + 1 ! 0 = 0
47 1nn0 1 0
48 40 nnzd C C + 1
49 bcval 1 0 C + 1 ( 1 C + 1 ) = if C + 1 0 1 1 ! 1 C + 1 ! C + 1 ! 0
50 47 48 49 sylancr C ( 1 C + 1 ) = if C + 1 0 1 1 ! 1 C + 1 ! C + 1 ! 0
51 bc0k C ( 0 C) = 0
52 46 50 51 3eqtr4rd C ( 0 C) = ( 1 C + 1 )
53 bcnn 0 0 ( 0 0 ) = 1
54 28 53 ax-mp ( 0 0 ) = 1
55 bcnn 1 0 ( 1 1 ) = 1
56 47 55 ax-mp ( 1 1 ) = 1
57 54 56 eqtr4i ( 0 0 ) = ( 1 1 )
58 oveq2 C = 0 ( 0 C) = ( 0 0 )
59 oveq1 C = 0 C + 1 = 0 + 1
60 59 4 eqtrdi C = 0 C + 1 = 1
61 60 oveq2d C = 0 ( 1 C + 1 ) = ( 1 1 )
62 57 58 61 3eqtr4a C = 0 ( 0 C) = ( 1 C + 1 )
63 52 62 jaoi C C = 0 ( 0 C) = ( 1 C + 1 )
64 36 63 sylbi C 0 ( 0 C) = ( 1 C + 1 )
65 35 64 eqtrd C 0 k = 0 0 ( k C) = ( 1 C + 1 )
66 elnn0uz n 0 n 0
67 66 biimpi n 0 n 0
68 67 adantr n 0 C 0 n 0
69 elfznn0 k 0 n + 1 k 0
70 69 adantl n 0 C 0 k 0 n + 1 k 0
71 simplr n 0 C 0 k 0 n + 1 C 0
72 71 nn0zd n 0 C 0 k 0 n + 1 C
73 bccl k 0 C ( k C) 0
74 70 72 73 syl2anc n 0 C 0 k 0 n + 1 ( k C) 0
75 74 nn0cnd n 0 C 0 k 0 n + 1 ( k C)
76 oveq1 k = n + 1 ( k C) = ( n + 1 C)
77 68 75 76 fsump1 n 0 C 0 k = 0 n + 1 ( k C) = k = 0 n ( k C) + ( n + 1 C)
78 77 adantr n 0 C 0 k = 0 n ( k C) = ( n + 1 C + 1 ) k = 0 n + 1 ( k C) = k = 0 n ( k C) + ( n + 1 C)
79 id k = 0 n ( k C) = ( n + 1 C + 1 ) k = 0 n ( k C) = ( n + 1 C + 1 )
80 nn0cn C 0 C
81 80 adantl n 0 C 0 C
82 1cnd n 0 C 0 1
83 81 82 pncand n 0 C 0 C + 1 - 1 = C
84 83 oveq2d n 0 C 0 ( n + 1 C + 1 - 1 ) = ( n + 1 C)
85 84 eqcomd n 0 C 0 ( n + 1 C) = ( n + 1 C + 1 - 1 )
86 79 85 oveqan12rd n 0 C 0 k = 0 n ( k C) = ( n + 1 C + 1 ) k = 0 n ( k C) + ( n + 1 C) = ( n + 1 C + 1 ) + ( n + 1 C + 1 - 1 )
87 peano2nn0 n 0 n + 1 0
88 peano2nn0 C 0 C + 1 0
89 88 nn0zd C 0 C + 1
90 bcpasc n + 1 0 C + 1 ( n + 1 C + 1 ) + ( n + 1 C + 1 - 1 ) = ( n + 1 + 1 C + 1 )
91 87 89 90 syl2an n 0 C 0 ( n + 1 C + 1 ) + ( n + 1 C + 1 - 1 ) = ( n + 1 + 1 C + 1 )
92 91 adantr n 0 C 0 k = 0 n ( k C) = ( n + 1 C + 1 ) ( n + 1 C + 1 ) + ( n + 1 C + 1 - 1 ) = ( n + 1 + 1 C + 1 )
93 78 86 92 3eqtrd n 0 C 0 k = 0 n ( k C) = ( n + 1 C + 1 ) k = 0 n + 1 ( k C) = ( n + 1 + 1 C + 1 )
94 93 exp31 n 0 C 0 k = 0 n ( k C) = ( n + 1 C + 1 ) k = 0 n + 1 ( k C) = ( n + 1 + 1 C + 1 )
95 94 a2d n 0 C 0 k = 0 n ( k C) = ( n + 1 C + 1 ) C 0 k = 0 n + 1 ( k C) = ( n + 1 + 1 C + 1 )
96 8 14 20 26 65 95 nn0ind N 0 C 0 k = 0 N ( k C) = ( N + 1 C + 1 )
97 96 imp N 0 C 0 k = 0 N ( k C) = ( N + 1 C + 1 )