reserve x for set,
  D for non empty set,
  k,n,m,i,j,l for Nat,
  K for Field;

theorem
  for a,b being Real,A being Matrix of REAL holds (a-b)*A=a*A - b*A
proof
  let a,b be Real, A be Matrix of REAL;
A1: len ((a-b)*A)=len (A) & width ((a-b)*A)=width A by MATRIXR1:27;
A2: len (a*A)=len A & width (a*A)=width (A) by MATRIXR1:27;
A3: len (b*A)=len A & width (b*A)=width A by MATRIXR1:27;
A4: for i,j being Nat st [i,j] in Indices ((a-b)*A) holds ((a-b)*A)*(i,j)=(a
  *A - b*A)*(i,j)
  proof
    let i,j be Nat;
    assume
A5: [i,j] in Indices ((a-b)*A);
    reconsider i0=i,j0=j as Nat;
A6: Indices ((a-b)*A)=Indices A by A1,MATRIX_4:55;
    Indices (a*A)=Indices A by A2,MATRIX_4:55;
    then (a*A - b*A)*(i,j) =(a*A)*(i0,j0)-(b*A)*(i0,j0) by A2,A3,A5,A6,Th6
      .=a*(A*(i0,j0))-(b*A)*(i0,j0) by A5,A6,MATRIXR1:29
      .=a*(A*(i0,j0))-b*(A*(i0,j0)) by A5,A6,MATRIXR1:29
      .=(a-b)*(A*(i,j));
    hence thesis by A5,A6,MATRIXR1:29;
  end;
A7: width (a*A - b*A) =width (MXF2MXR ((MXR2MXF (a*A))+-(MXR2MXF (b*A)))) by
MATRIX_4:def 1
    .=width (a*A) by MATRIX_3:def 3;
  len (a*A - b*A) =len (MXF2MXR ((MXR2MXF (a*A))+-(MXR2MXF (b*A)))) by
MATRIX_4:def 1
    .=len (a*A) by MATRIX_3:def 3;
  hence thesis by A1,A7,A2,A4,MATRIX_0:21;
end;
