reserve i,j,n for Nat,
  K for Field,
  a for Element of K,
  M,M1,M2,M3,M4 for Matrix of n,K;
reserve A for Matrix of K;

theorem Th42:
  for K being Ring
  for M1 being Matrix of n,K
  holds M1*(M1@)=1.(K,n) & M1 is invertible iff M1 is Orthogonal
proof
  let K be Ring;
  let M1 be Matrix of n,K;
A1: width M1=n & len M1=n by MATRIX_0:24;
A2: len (M1@)=n by MATRIX_0:24;
A3: width (M1~)=n by MATRIX_0:24;
A4: len (M1~)=n by MATRIX_0:24;
  thus M1*(M1@)=1.(K,n) & M1 is invertible implies M1 is Orthogonal
  proof
    assume that
A5: M1*(M1@)=1.(K,n) and
A6: M1 is invertible;
A7: M1~ is_reverse_of M1 by A6,Def4;
    then M1~*(M1*M1~)=M1~*(M1*(M1@)) by A5;
    then (M1~*M1)*M1~=M1~*(M1*(M1@)) by A1,A3,A4,MATRIX_3:33;
    then (M1~*M1)*M1~=(M1~*M1)*(M1@) by A1,A3,A2,MATRIX_3:33;
    then (1.(K,n))*M1~=(M1~*M1)*(M1@) by A7;
    then (1.(K,n))*M1~=(1.(K,n))*(M1@) by A7;
    then M1~=(1.(K,n))*(M1@) by MATRIX_3:18;
    then M1~=M1@ by MATRIX_3:18;
    hence thesis by A6;
  end;
  assume
A8: M1 is Orthogonal;
  then
A9: M1~ is_reverse_of M1 by Def4;
  M1*(M1@)=M1*M1~ by A8;
  hence thesis by A9;
end;
