reserve x,y,z for object,
  i,j,n,m for Nat,
  D for non empty set,
  s,t for FinSequence,
  a,a1,a2,b1,b2,d for Element of D,
  p, p1,p2,q,r for FinSequence of D;
reserve M,M1,M2 for Matrix of D;
reserve f for FinSequence of D;
reserve i,j,i1,j1 for Nat;
reserve k for Nat, G for Matrix of D;
reserve x,y,x1,x2,y1,y2 for object,
  i,j,k,l,n,m for Nat,
  D for non empty set,
  s,s2 for FinSequence,
  a,b,c,d for Element of D,
  q,r for FinSequence of D,
  a9,b9 for Element of D;

theorem Th53:
  for M1,M2 being Matrix of D st M1@=M2@ & len M1=len M2 holds M1 = M2
proof
  let M1,M2 be Matrix of D;
  assume that
A1: M1@=M2@ and
A2: len M1=len M2;
  len (M1@) = width M1 by Def6;
  then
A3: width M1=width M2 by A1,Def6;
A4: Indices M2=[:dom M2,Seg width M2:];
  for i,j st [i,j] in Indices M1 holds M1*(i,j) = M2*(i,j)
  proof
    let i,j;
    assume
A5: [i,j] in Indices M1;
    dom M1 = Seg len M2 by A2,FINSEQ_1:def 3
      .= dom M2 by FINSEQ_1:def 3;
    then M2@*(j,i) = M2*(i,j) by A3,A4,A5,Def6;
    hence thesis by A1,A5,Def6;
  end;
  hence thesis by A2,A3,Th21;
end;
