reserve x,y for object,
  N for Element of NAT,
  c,i,j,k,m,n for Nat,
  D for non empty set,
  s for Element of 2Set Seg (n+2),
  p for Element of Permutations(n) ,
  p1, q1 for Element of Permutations(n+1),
  p2 for Element of Permutations(n +2),
  K for Field,
  a for Element of K,
  f for FinSequence of K,
  A for (Matrix of K),
  AD for Matrix of n,m,D,
  pD for FinSequence of D,
  M for Matrix of n,K;

theorem Th30:
  Det M <> 0.K implies M * ((Det M)" * (Matrix_of_Cofactor M)@) = 1.(K,n)
proof
  set D=Det M;
  set D9=D";
  set C=Matrix_of_Cofactor M;
  set DC=D9*(C@);
  set MC=M*DC;
  set ID=1.(K,n);
  assume
A1: D<>0.K;
  now
A2: Indices MC=Indices ID by MATRIX_0:26;
    reconsider N=n as Element of NAT by ORDINAL1:def 12;
    let i,j be Nat such that
A3: [i,j] in Indices MC;
    reconsider COL=Col(C@,j),L=Line(M,i) as Element of N-tuples_on the carrier
    of K by MATRIX_0:24;
    reconsider i9=i,j9=j as Element of NAT by ORDINAL1:def 12;
A4: len DC=n by MATRIX_0:24;
A5: Indices MC=[:Seg n,Seg n:] by MATRIX_0:24;
    then
A6: i in Seg n by A3,ZFMISC_1:87;
A7: j in Seg n by A3,A5,ZFMISC_1:87;
    then
A8: 1<=j by FINSEQ_1:1;
    width (C@)=n by MATRIX_0:24;
    then j<=width (C@) by A7,FINSEQ_1:1;
    then Col(DC,j)=D9*COL by A8,MATRIXR1:19;
    then mlt(Line(M,i),Col(DC,j)) = D9* mlt(L,COL) by FVSUM_1:69;
    then
A9: Line(M,i) "*" Col(DC,j) = D9*(Line(M,i)"*"Col(C@,j)) by FVSUM_1:73
      .= D9* Det RLine(M,j9,Line(M,i9))by A7,Th29;
A10: width M=n by MATRIX_0:24;
    then
A11: MC*(i,j)=D9* Det RLine(M,j,Line(M,i)) by A3,A4,A9,MATRIX_3:def 4;
    per cases;
    suppose
A12:  i=j;
      then
A13:  RLine(M,j,Line(M,i))=M by MATRIX11:30;
A14:  D*D9=1_K by A1,VECTSP_1:def 10;
      ID*(i,j) = 1_K by A3,A2,A12,MATRIX_1:def 3;
      hence ID*(i,j) = MC*(i,j) by A3,A10,A4,A9,A13,A14,MATRIX_3:def 4;
    end;
    suppose
A15:  i<>j;
      then
A16:  ID*(i,j) = 0.K by A3,A2,MATRIX_1:def 3;
      Det RLine(M,j9,Line(M,i9))=0.K by A6,A7,A15,MATRIX11:51;
      hence ID*(i,j) = MC*(i,j) by A11,A16;
    end;
  end;
  hence thesis by MATRIX_0:27;
end;
