reserve i,n for Nat,
  K for Field,
  M1,M2,M3,M4 for Matrix of n,K;

theorem
  M2 is invertible & M1 is_congruent_Matrix_of M2 & n>0 implies M1 is
  invertible
proof
  assume that
A1: M2 is invertible and
A2: M1 is_congruent_Matrix_of M2 and
A3: n>0;
  consider M4 be Matrix of n,K such that
A4: M4 is invertible and
A5: M1=M4@*M2*M4 by A2;
  set M6=M4~@;
  set M5=M4@;
A6: width M4=n & width (M4~)=n by MATRIX_0:24;
  len M4=n by MATRIX_0:24;
  then
A7: ((M4~)*M4)@=(M4@)*(M4~@) by A3,A6,MATRIX_3:22;
A8: M4~ is_reverse_of M4 by A4,MATRIX_6:def 4;
  then (M4~)*M4=1.(K,n) by MATRIX_6:def 2;
  then
A9: M5*M6=1.(K,n) by A7,MATRIX_6:10;
  len (M4~)=n by MATRIX_0:24;
  then (M4*(M4~))@=(M4~@)*(M4@) by A3,A6,MATRIX_3:22;
  then M5*M6=M6*M5 by A8,A7,MATRIX_6:def 2;
  then M5 is_reverse_of M6 by A9,MATRIX_6:def 2;
  then M5 is invertible by MATRIX_6:def 3;
  then M5*M2 is invertible by A1,MATRIX_6:36;
  hence thesis by A4,A5,MATRIX_6:36;
end;
