let K be Field; :: thesis: for A, B, C being Matrix of K st len B = len C & width B = width C & len A = width B & len B > 0 & len A > 0 holds
(B + C) * A = (B * A) + (C * A)

let A, B, C be Matrix of K; :: thesis: ( len B = len C & width B = width C & len A = width B & len B > 0 & len A > 0 implies (B + C) * A = (B * A) + (C * A) )
assume A1: ( len B = len C & width B = width C & len A = width B & len B > 0 & len A > 0 ) ; :: thesis: (B + C) * A = (B * A) + (C * A)
A2: ( len (B + C) = len B & width (B + C) = width B ) by MATRIX_3:def 3;
then A3: ( len ((B + C) * A) = len B & width ((B + C) * A) = width A ) by A1, MATRIX_3:def 4;
then reconsider M1 = (B + C) * A as Matrix of len B, width A,K by A1, MATRIX_1:20;
A4: ( len (B * A) = len B & width (B * A) = width A ) by A1, MATRIX_3:def 4;
A5: ( len (C * A) = len C & width (C * A) = width A ) by A1, MATRIX_3:def 4;
A6: Indices M1 = Indices (B * A) by A3, A4, Th55;
A7: Indices M1 = Indices (C * A) by A1, A3, A5, Th55;
A8: ( len ((B * A) + (C * A)) = len (B * A) & width ((B * A) + (C * A)) = width (B * A) ) by MATRIX_3:def 3;
then reconsider M2 = (B * A) + (C * A) as Matrix of len B, width A,K by A1, A4, MATRIX_1:20;
for i, j being Nat st [i,j] in Indices M1 holds
M1 * i,j = M2 * i,j
proof
let i, j be Nat; :: thesis: ( [i,j] in Indices M1 implies M1 * i,j = M2 * i,j )
assume A9: [i,j] in Indices M1 ; :: thesis: M1 * i,j = M2 * i,j
len (Col A,j) = width B by A1, MATRIX_1:def 9;
then A10: len (Col A,j) = len (Line B,i) by MATRIX_1:def 8;
len (Col A,j) = width C by A1, MATRIX_1:def 9;
then A11: len (Col A,j) = len (Line C,i) by MATRIX_1:def 8;
1 + 0 <= width B by A1, NAT_1:13;
then A12: 1 in Seg (width B) by FINSEQ_1:3;
i in dom (B * A) by A6, A9, ZFMISC_1:106;
then i in Seg (len B) by A4, FINSEQ_1:def 3;
then i in dom B by FINSEQ_1:def 3;
then A13: [i,1] in Indices B by A12, ZFMISC_1:106;
reconsider q1 = Line B,i, q2 = Line C,i, q3 = Col A,j as Element of (len A) -tuples_on the carrier of K by A1;
A14: len (mlt (Line B,i),(Col A,j)) = len (mlt q1,q3)
.= len A by FINSEQ_1:def 18
.= len (mlt q2,q3) by FINSEQ_1:def 18
.= len (mlt (Line C,i),(Col A,j)) ;
A15: M1 * i,j = (Line (B + C),i) "*" (Col A,j) by A1, A2, A9, MATRIX_3:def 4
.= Sum (mlt (Line (B + C),i),(Col A,j)) by FVSUM_1:def 10
.= Sum (mlt ((Line B,i) + (Line C,i)),(Col A,j)) by A1, A13, Th59
.= Sum ((mlt (Line B,i),(Col A,j)) + (mlt (Line C,i),(Col A,j))) by A10, A11, Th56
.= (Sum (mlt (Line B,i),(Col A,j))) + (Sum (mlt (Line C,i),(Col A,j))) by A14, Th61 ;
M2 * i,j = ((B * A) * i,j) + ((C * A) * i,j) by A6, A9, MATRIX_3:def 3
.= ((Line B,i) "*" (Col A,j)) + ((C * A) * i,j) by A1, A6, A9, MATRIX_3:def 4
.= ((Line B,i) "*" (Col A,j)) + ((Line C,i) "*" (Col A,j)) by A1, A7, A9, MATRIX_3:def 4
.= ((Line B,i) "*" (Col A,j)) + (Sum (mlt (Line C,i),(Col A,j))) by FVSUM_1:def 10
.= (Sum (mlt (Line B,i),(Col A,j))) + (Sum (mlt (Line C,i),(Col A,j))) by FVSUM_1:def 10 ;
hence M1 * i,j = M2 * i,j by A15; :: thesis: verum
end;
hence (B + C) * A = (B * A) + (C * A) by A3, A4, A8, MATRIX_1:21; :: thesis: verum