Metamath Proof Explorer


Theorem bcxmas

Description: Parallel summation (Christmas Stocking) theorem for Pascal's Triangle. (Contributed by Paul Chapman, 18-May-2007) (Revised by Mario Carneiro, 24-Apr-2014)

Ref Expression
Assertion bcxmas N 0 M 0 ( N + 1 + M M) = j = 0 M ( N + j j)

Proof

Step Hyp Ref Expression
1 bcxmaslem1 m = 0 ( N + 1 + m m) = ( N + 1 + 0 0 )
2 oveq2 m = 0 0 m = 0 0
3 2 sumeq1d m = 0 j = 0 m ( N + j j) = j = 0 0 ( N + j j)
4 1 3 eqeq12d m = 0 ( N + 1 + m m) = j = 0 m ( N + j j) ( N + 1 + 0 0 ) = j = 0 0 ( N + j j)
5 bcxmaslem1 m = k ( N + 1 + m m) = ( N + 1 + k k)
6 oveq2 m = k 0 m = 0 k
7 6 sumeq1d m = k j = 0 m ( N + j j) = j = 0 k ( N + j j)
8 5 7 eqeq12d m = k ( N + 1 + m m) = j = 0 m ( N + j j) ( N + 1 + k k) = j = 0 k ( N + j j)
9 bcxmaslem1 m = k + 1 ( N + 1 + m m) = ( N + 1 + k + 1 k + 1 )
10 oveq2 m = k + 1 0 m = 0 k + 1
11 10 sumeq1d m = k + 1 j = 0 m ( N + j j) = j = 0 k + 1 ( N + j j)
12 9 11 eqeq12d m = k + 1 ( N + 1 + m m) = j = 0 m ( N + j j) ( N + 1 + k + 1 k + 1 ) = j = 0 k + 1 ( N + j j)
13 bcxmaslem1 m = M ( N + 1 + m m) = ( N + 1 + M M)
14 oveq2 m = M 0 m = 0 M
15 14 sumeq1d m = M j = 0 m ( N + j j) = j = 0 M ( N + j j)
16 13 15 eqeq12d m = M ( N + 1 + m m) = j = 0 m ( N + j j) ( N + 1 + M M) = j = 0 M ( N + j j)
17 0nn0 0 0
18 nn0addcl N 0 0 0 N + 0 0
19 bcn0 N + 0 0 ( N + 0 0 ) = 1
20 18 19 syl N 0 0 0 ( N + 0 0 ) = 1
21 17 20 mpan2 N 0 ( N + 0 0 ) = 1
22 0z 0
23 1nn0 1 0
24 21 23 eqeltrdi N 0 ( N + 0 0 ) 0
25 24 nn0cnd N 0 ( N + 0 0 )
26 bcxmaslem1 j = 0 ( N + j j) = ( N + 0 0 )
27 26 fsum1 0 ( N + 0 0 ) j = 0 0 ( N + j j) = ( N + 0 0 )
28 22 25 27 sylancr N 0 j = 0 0 ( N + j j) = ( N + 0 0 )
29 peano2nn0 N 0 N + 1 0
30 nn0addcl N + 1 0 0 0 N + 1 + 0 0
31 29 17 30 sylancl N 0 N + 1 + 0 0
32 bcn0 N + 1 + 0 0 ( N + 1 + 0 0 ) = 1
33 31 32 syl N 0 ( N + 1 + 0 0 ) = 1
34 21 28 33 3eqtr4rd N 0 ( N + 1 + 0 0 ) = j = 0 0 ( N + j j)
35 simpr N 0 k 0 k 0
36 elnn0uz k 0 k 0
37 35 36 sylib N 0 k 0 k 0
38 simpl N 0 k 0 N 0
39 elfznn0 j 0 k + 1 j 0
40 nn0addcl N 0 j 0 N + j 0
41 38 39 40 syl2an N 0 k 0 j 0 k + 1 N + j 0
42 elfzelz j 0 k + 1 j
43 42 adantl N 0 k 0 j 0 k + 1 j
44 bccl N + j 0 j ( N + j j) 0
45 41 43 44 syl2anc N 0 k 0 j 0 k + 1 ( N + j j) 0
46 45 nn0cnd N 0 k 0 j 0 k + 1 ( N + j j)
47 bcxmaslem1 j = k + 1 ( N + j j) = ( N + k + 1 k + 1 )
48 37 46 47 fsump1 N 0 k 0 j = 0 k + 1 ( N + j j) = j = 0 k ( N + j j) + ( N + k + 1 k + 1 )
49 nn0cn N 0 N
50 49 adantr N 0 k 0 N
51 nn0cn k 0 k
52 51 adantl N 0 k 0 k
53 1cnd N 0 k 0 1
54 add32r N k 1 N + k + 1 = N + 1 + k
55 50 52 53 54 syl3anc N 0 k 0 N + k + 1 = N + 1 + k
56 55 oveq1d N 0 k 0 ( N + k + 1 k + 1 ) = ( N + 1 + k k + 1 )
57 56 oveq2d N 0 k 0 j = 0 k ( N + j j) + ( N + k + 1 k + 1 ) = j = 0 k ( N + j j) + ( N + 1 + k k + 1 )
58 48 57 eqtrd N 0 k 0 j = 0 k + 1 ( N + j j) = j = 0 k ( N + j j) + ( N + 1 + k k + 1 )
59 58 adantr N 0 k 0 ( N + 1 + k k) = j = 0 k ( N + j j) j = 0 k + 1 ( N + j j) = j = 0 k ( N + j j) + ( N + 1 + k k + 1 )
60 oveq1 ( N + 1 + k k) = j = 0 k ( N + j j) ( N + 1 + k k) + ( N + 1 + k k + 1 ) = j = 0 k ( N + j j) + ( N + 1 + k k + 1 )
61 60 adantl N 0 k 0 ( N + 1 + k k) = j = 0 k ( N + j j) ( N + 1 + k k) + ( N + 1 + k k + 1 ) = j = 0 k ( N + j j) + ( N + 1 + k k + 1 )
62 ax-1cn 1
63 pncan k 1 k + 1 - 1 = k
64 52 62 63 sylancl N 0 k 0 k + 1 - 1 = k
65 64 oveq2d N 0 k 0 ( N + 1 + k k + 1 - 1 ) = ( N + 1 + k k)
66 65 oveq2d N 0 k 0 ( N + 1 + k k + 1 ) + ( N + 1 + k k + 1 - 1 ) = ( N + 1 + k k + 1 ) + ( N + 1 + k k)
67 nn0addcl N + 1 0 k 0 N + 1 + k 0
68 29 67 sylan N 0 k 0 N + 1 + k 0
69 nn0p1nn k 0 k + 1
70 69 adantl N 0 k 0 k + 1
71 70 nnzd N 0 k 0 k + 1
72 bcpasc N + 1 + k 0 k + 1 ( N + 1 + k k + 1 ) + ( N + 1 + k k + 1 - 1 ) = ( N + 1 + k + 1 k + 1 )
73 68 71 72 syl2anc N 0 k 0 ( N + 1 + k k + 1 ) + ( N + 1 + k k + 1 - 1 ) = ( N + 1 + k + 1 k + 1 )
74 66 73 eqtr3d N 0 k 0 ( N + 1 + k k + 1 ) + ( N + 1 + k k) = ( N + 1 + k + 1 k + 1 )
75 nn0p1nn N 0 N + 1
76 nnnn0addcl N + 1 k 0 N + 1 + k
77 75 76 sylan N 0 k 0 N + 1 + k
78 77 nnnn0d N 0 k 0 N + 1 + k 0
79 bccl N + 1 + k 0 k + 1 ( N + 1 + k k + 1 ) 0
80 78 71 79 syl2anc N 0 k 0 ( N + 1 + k k + 1 ) 0
81 80 nn0cnd N 0 k 0 ( N + 1 + k k + 1 )
82 nn0z k 0 k
83 82 adantl N + 1 0 k 0 k
84 bccl N + 1 + k 0 k ( N + 1 + k k) 0
85 67 83 84 syl2anc N + 1 0 k 0 ( N + 1 + k k) 0
86 29 85 sylan N 0 k 0 ( N + 1 + k k) 0
87 86 nn0cnd N 0 k 0 ( N + 1 + k k)
88 81 87 addcomd N 0 k 0 ( N + 1 + k k + 1 ) + ( N + 1 + k k) = ( N + 1 + k k) + ( N + 1 + k k + 1 )
89 peano2cn N N + 1
90 49 89 syl N 0 N + 1
91 90 adantr N 0 k 0 N + 1
92 91 52 53 addassd N 0 k 0 N + 1 + k + 1 = N + 1 + k + 1
93 92 oveq1d N 0 k 0 ( N + 1 + k + 1 k + 1 ) = ( N + 1 + k + 1 k + 1 )
94 74 88 93 3eqtr3d N 0 k 0 ( N + 1 + k k) + ( N + 1 + k k + 1 ) = ( N + 1 + k + 1 k + 1 )
95 94 adantr N 0 k 0 ( N + 1 + k k) = j = 0 k ( N + j j) ( N + 1 + k k) + ( N + 1 + k k + 1 ) = ( N + 1 + k + 1 k + 1 )
96 59 61 95 3eqtr2rd N 0 k 0 ( N + 1 + k k) = j = 0 k ( N + j j) ( N + 1 + k + 1 k + 1 ) = j = 0 k + 1 ( N + j j)
97 4 8 12 16 34 96 nn0indd N 0 M 0 ( N + 1 + M M) = j = 0 M ( N + j j)