reserve i,j for Nat;

theorem
  for K being Field, A,B being Matrix of K st width A=len B holds ex C
  being Matrix of K st len C=len A & width C=width B & for i,j st [i,j] in
  Indices C holds C*(i,j)=Line(A,i) "*" Col(B,j)
proof
  let K be Field, A,B be Matrix of K;
  assume
A1: width A=len B;
  deffunc F(Nat,Nat) = Line(A,$1) "*" Col(B,$2);
  consider M being Matrix of len A,width B,(the carrier of K) such that
A2: for i,j st [i,j] in Indices M holds M*(i,j) = F(i,j) from MATRIX_0:
  sch 1;
  per cases;
  suppose
    len A > 0;
    then len M=len A & width M= width B by MATRIX_0:23;
    hence thesis by A2;
  end;
  suppose
A3: len A=0;
    then
A4: len M=0 by MATRIX_0:25;
    len B=0 by A1,A3,MATRIX_0:def 3;
    then width B=0 by MATRIX_0:def 3;
    then width M= width B by A4,MATRIX_0:def 3;
    hence thesis by A2,A3,A4;
  end;
end;
