Metamath Proof Explorer


Theorem srgbinom

Description: The binomial theorem for commuting elements of a semiring: ( A + B ) ^ N is the sum from k = 0 to N of ( N _C k ) x. ( ( A ^ k ) x. ( B ^ ( N - k ) ) (generalization of binom ). (Contributed by AV, 24-Aug-2019)

Ref Expression
Hypotheses srgbinom.s S = Base R
srgbinom.m × ˙ = R
srgbinom.t · ˙ = R
srgbinom.a + ˙ = + R
srgbinom.g G = mulGrp R
srgbinom.e × ˙ = G
Assertion srgbinom R SRing N 0 A S B S A × ˙ B = B × ˙ A N × ˙ A + ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B

Proof

Step Hyp Ref Expression
1 srgbinom.s S = Base R
2 srgbinom.m × ˙ = R
3 srgbinom.t · ˙ = R
4 srgbinom.a + ˙ = + R
5 srgbinom.g G = mulGrp R
6 srgbinom.e × ˙ = G
7 oveq1 x = 0 x × ˙ A + ˙ B = 0 × ˙ A + ˙ B
8 oveq2 x = 0 0 x = 0 0
9 oveq1 x = 0 ( x k) = ( 0 k)
10 oveq1 x = 0 x k = 0 k
11 10 oveq1d x = 0 x k × ˙ A = 0 k × ˙ A
12 11 oveq1d x = 0 x k × ˙ A × ˙ k × ˙ B = 0 k × ˙ A × ˙ k × ˙ B
13 9 12 oveq12d x = 0 ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
14 8 13 mpteq12dv x = 0 k 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = k 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
15 14 oveq2d x = 0 R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = R k = 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
16 7 15 eqeq12d x = 0 x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B 0 × ˙ A + ˙ B = R k = 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
17 16 imbi2d x = 0 R SRing A S B S A × ˙ B = B × ˙ A x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B R SRing A S B S A × ˙ B = B × ˙ A 0 × ˙ A + ˙ B = R k = 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
18 oveq1 x = n x × ˙ A + ˙ B = n × ˙ A + ˙ B
19 oveq2 x = n 0 x = 0 n
20 oveq1 x = n ( x k) = ( n k)
21 oveq1 x = n x k = n k
22 21 oveq1d x = n x k × ˙ A = n k × ˙ A
23 22 oveq1d x = n x k × ˙ A × ˙ k × ˙ B = n k × ˙ A × ˙ k × ˙ B
24 20 23 oveq12d x = n ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B
25 19 24 mpteq12dv x = n k 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = k 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B
26 25 oveq2d x = n R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B
27 18 26 eqeq12d x = n x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B n × ˙ A + ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B
28 27 imbi2d x = n R SRing A S B S A × ˙ B = B × ˙ A x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B R SRing A S B S A × ˙ B = B × ˙ A n × ˙ A + ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B
29 oveq1 x = n + 1 x × ˙ A + ˙ B = n + 1 × ˙ A + ˙ B
30 oveq2 x = n + 1 0 x = 0 n + 1
31 oveq1 x = n + 1 ( x k) = ( n + 1 k)
32 oveq1 x = n + 1 x k = n + 1 - k
33 32 oveq1d x = n + 1 x k × ˙ A = n + 1 - k × ˙ A
34 33 oveq1d x = n + 1 x k × ˙ A × ˙ k × ˙ B = n + 1 - k × ˙ A × ˙ k × ˙ B
35 31 34 oveq12d x = n + 1 ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
36 30 35 mpteq12dv x = n + 1 k 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = k 0 n + 1 ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
37 36 oveq2d x = n + 1 R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = R k = 0 n + 1 ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
38 29 37 eqeq12d x = n + 1 x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B n + 1 × ˙ A + ˙ B = R k = 0 n + 1 ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
39 38 imbi2d x = n + 1 R SRing A S B S A × ˙ B = B × ˙ A x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B R SRing A S B S A × ˙ B = B × ˙ A n + 1 × ˙ A + ˙ B = R k = 0 n + 1 ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
40 oveq1 x = N x × ˙ A + ˙ B = N × ˙ A + ˙ B
41 oveq2 x = N 0 x = 0 N
42 oveq1 x = N ( x k) = ( N k)
43 oveq1 x = N x k = N k
44 43 oveq1d x = N x k × ˙ A = N k × ˙ A
45 44 oveq1d x = N x k × ˙ A × ˙ k × ˙ B = N k × ˙ A × ˙ k × ˙ B
46 42 45 oveq12d x = N ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
47 41 46 mpteq12dv x = N k 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = k 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
48 47 oveq2d x = N R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
49 40 48 eqeq12d x = N x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B N × ˙ A + ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
50 49 imbi2d x = N R SRing A S B S A × ˙ B = B × ˙ A x × ˙ A + ˙ B = R k = 0 x ( x k) · ˙ x k × ˙ A × ˙ k × ˙ B R SRing A S B S A × ˙ B = B × ˙ A N × ˙ A + ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
51 simpr1 R SRing A S B S A × ˙ B = B × ˙ A A S
52 5 1 mgpbas S = Base G
53 51 52 eleqtrdi R SRing A S B S A × ˙ B = B × ˙ A A Base G
54 eqid Base G = Base G
55 eqid 0 G = 0 G
56 54 55 6 mulg0 A Base G 0 × ˙ A = 0 G
57 53 56 syl R SRing A S B S A × ˙ B = B × ˙ A 0 × ˙ A = 0 G
58 simpr2 R SRing A S B S A × ˙ B = B × ˙ A B S
59 58 52 eleqtrdi R SRing A S B S A × ˙ B = B × ˙ A B Base G
60 54 55 6 mulg0 B Base G 0 × ˙ B = 0 G
61 59 60 syl R SRing A S B S A × ˙ B = B × ˙ A 0 × ˙ B = 0 G
62 57 61 oveq12d R SRing A S B S A × ˙ B = B × ˙ A 0 × ˙ A × ˙ 0 × ˙ B = 0 G × ˙ 0 G
63 62 oveq2d R SRing A S B S A × ˙ B = B × ˙ A 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B = 1 · ˙ 0 G × ˙ 0 G
64 eqid 1 R = 1 R
65 1 64 srgidcl R SRing 1 R S
66 65 ancli R SRing R SRing 1 R S
67 66 adantr R SRing A S B S A × ˙ B = B × ˙ A R SRing 1 R S
68 1 2 64 srglidm R SRing 1 R S 1 R × ˙ 1 R = 1 R
69 67 68 syl R SRing A S B S A × ˙ B = B × ˙ A 1 R × ˙ 1 R = 1 R
70 69 oveq2d R SRing A S B S A × ˙ B = B × ˙ A 1 · ˙ 1 R × ˙ 1 R = 1 · ˙ 1 R
71 eqid Base R = Base R
72 71 64 srgidcl R SRing 1 R Base R
73 71 3 mulg1 1 R Base R 1 · ˙ 1 R = 1 R
74 72 73 syl R SRing 1 · ˙ 1 R = 1 R
75 74 adantr R SRing A S B S A × ˙ B = B × ˙ A 1 · ˙ 1 R = 1 R
76 70 75 eqtrd R SRing A S B S A × ˙ B = B × ˙ A 1 · ˙ 1 R × ˙ 1 R = 1 R
77 5 64 ringidval 1 R = 0 G
78 id 1 R = 0 G 1 R = 0 G
79 78 78 oveq12d 1 R = 0 G 1 R × ˙ 1 R = 0 G × ˙ 0 G
80 79 oveq2d 1 R = 0 G 1 · ˙ 1 R × ˙ 1 R = 1 · ˙ 0 G × ˙ 0 G
81 80 78 eqeq12d 1 R = 0 G 1 · ˙ 1 R × ˙ 1 R = 1 R 1 · ˙ 0 G × ˙ 0 G = 0 G
82 77 81 ax-mp 1 · ˙ 1 R × ˙ 1 R = 1 R 1 · ˙ 0 G × ˙ 0 G = 0 G
83 76 82 sylib R SRing A S B S A × ˙ B = B × ˙ A 1 · ˙ 0 G × ˙ 0 G = 0 G
84 63 83 eqtrd R SRing A S B S A × ˙ B = B × ˙ A 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B = 0 G
85 fz0sn 0 0 = 0
86 85 a1i R SRing A S B S A × ˙ B = B × ˙ A 0 0 = 0
87 86 mpteq1d R SRing A S B S A × ˙ B = B × ˙ A k 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B = k 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
88 87 oveq2d R SRing A S B S A × ˙ B = B × ˙ A R k = 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B = R k 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
89 srgmnd R SRing R Mnd
90 89 adantr R SRing A S B S A × ˙ B = B × ˙ A R Mnd
91 c0ex 0 V
92 91 a1i R SRing A S B S A × ˙ B = B × ˙ A 0 V
93 77 65 eqeltrrid R SRing 0 G S
94 93 adantr R SRing A S B S A × ˙ B = B × ˙ A 0 G S
95 84 94 eqeltrd R SRing A S B S A × ˙ B = B × ˙ A 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B S
96 oveq2 k = 0 ( 0 k) = ( 0 0 )
97 0nn0 0 0
98 bcn0 0 0 ( 0 0 ) = 1
99 97 98 ax-mp ( 0 0 ) = 1
100 96 99 eqtrdi k = 0 ( 0 k) = 1
101 oveq2 k = 0 0 k = 0 0
102 0m0e0 0 0 = 0
103 101 102 eqtrdi k = 0 0 k = 0
104 103 oveq1d k = 0 0 k × ˙ A = 0 × ˙ A
105 oveq1 k = 0 k × ˙ B = 0 × ˙ B
106 104 105 oveq12d k = 0 0 k × ˙ A × ˙ k × ˙ B = 0 × ˙ A × ˙ 0 × ˙ B
107 100 106 oveq12d k = 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B = 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B
108 1 107 gsumsn R Mnd 0 V 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B S R k 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B = 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B
109 90 92 95 108 syl3anc R SRing A S B S A × ˙ B = B × ˙ A R k 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B = 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B
110 88 109 eqtrd R SRing A S B S A × ˙ B = B × ˙ A R k = 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B = 1 · ˙ 0 × ˙ A × ˙ 0 × ˙ B
111 1 4 mndcl R Mnd A S B S A + ˙ B S
112 90 51 58 111 syl3anc R SRing A S B S A × ˙ B = B × ˙ A A + ˙ B S
113 112 52 eleqtrdi R SRing A S B S A × ˙ B = B × ˙ A A + ˙ B Base G
114 54 55 6 mulg0 A + ˙ B Base G 0 × ˙ A + ˙ B = 0 G
115 113 114 syl R SRing A S B S A × ˙ B = B × ˙ A 0 × ˙ A + ˙ B = 0 G
116 84 110 115 3eqtr4rd R SRing A S B S A × ˙ B = B × ˙ A 0 × ˙ A + ˙ B = R k = 0 0 ( 0 k) · ˙ 0 k × ˙ A × ˙ k × ˙ B
117 simprl n 0 R SRing A S B S A × ˙ B = B × ˙ A R SRing
118 51 adantl n 0 R SRing A S B S A × ˙ B = B × ˙ A A S
119 58 adantl n 0 R SRing A S B S A × ˙ B = B × ˙ A B S
120 simprr3 n 0 R SRing A S B S A × ˙ B = B × ˙ A A × ˙ B = B × ˙ A
121 simpl n 0 R SRing A S B S A × ˙ B = B × ˙ A n 0
122 id n × ˙ A + ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B n × ˙ A + ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B
123 1 2 3 4 5 6 117 118 119 120 121 122 srgbinomlem n 0 R SRing A S B S A × ˙ B = B × ˙ A n × ˙ A + ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B n + 1 × ˙ A + ˙ B = R k = 0 n + 1 ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
124 123 exp31 n 0 R SRing A S B S A × ˙ B = B × ˙ A n × ˙ A + ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B n + 1 × ˙ A + ˙ B = R k = 0 n + 1 ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
125 124 a2d n 0 R SRing A S B S A × ˙ B = B × ˙ A n × ˙ A + ˙ B = R k = 0 n ( n k) · ˙ n k × ˙ A × ˙ k × ˙ B R SRing A S B S A × ˙ B = B × ˙ A n + 1 × ˙ A + ˙ B = R k = 0 n + 1 ( n + 1 k) · ˙ n + 1 - k × ˙ A × ˙ k × ˙ B
126 17 28 39 50 116 125 nn0ind N 0 R SRing A S B S A × ˙ B = B × ˙ A N × ˙ A + ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
127 126 expd N 0 R SRing A S B S A × ˙ B = B × ˙ A N × ˙ A + ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
128 127 impcom R SRing N 0 A S B S A × ˙ B = B × ˙ A N × ˙ A + ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B
129 128 imp R SRing N 0 A S B S A × ˙ B = B × ˙ A N × ˙ A + ˙ B = R k = 0 N ( N k) · ˙ N k × ˙ A × ˙ k × ˙ B