reserve i,j for Nat;

theorem
  for K being Ring,A,B,C being Matrix of K st len B=len C & width B=
  width C & width A=len B holds A*(B+C)=A*B + A*C
proof
  let K be Ring;
  let A,B,C be Matrix of K;
  assume that
A1: len B=len C and
A2: width B= width C and
A3: width A=len B;
  set LHS = A*(B+C);
  set RHS = A*B + A*C;
  len (B+C) = len B by MATRIX_3:def 3;
  then
  len(A*B) = len A & len(A*C) = len A & len LHS = len A by A1,A3
,MATRIX_3:def 4;
  then
A4: len LHS = len RHS & len LHS = len A by MATRIX_3:def 3;
per cases by NAT_1:3;
  suppose len A = 0;
    then len LHS = 0 & len RHS = 0 by A4;
    hence A*(B+C)=A*B + A*C by CARD_2:64;
  end;
  suppose len A > 0;
    hence thesis by A1,A2,A3,Lm1;
  end;
end;
