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 Th33:
  Det M <> 0.K implies ((Det M)" * (Matrix_of_Cofactor M)@) * M = 1.(K,n)
proof
  set D=Det M;
  set D9=D";
  set C=Matrix_of_Cofactor M;
  set DC=D9*(C@);
  set CM=DC*M;
  set ID=1.(K,n);
  assume
A1: D<>0.K;
  now
A2: Indices CM=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 CM;
    reconsider COL=Col(M,j),L=Line(C@,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 M=n by MATRIX_0:24;
A5: Indices CM=[:Seg n,Seg n:] by MATRIX_0:24;
    then
A6: i in Seg n by A3,ZFMISC_1:87;
    then
A7: 1<=i by FINSEQ_1:1;
A8: j in Seg n by A3,A5,ZFMISC_1:87;
    len (C@)=n by MATRIX_0:24;
    then i<=len (C@) by A6,FINSEQ_1:1;
    then Line(DC,i)=D9*L by A7,MATRIXR1:20;
    then mlt(Line(DC,i),Col(M,j)) = D9* mlt(L,COL) by FVSUM_1:69;
    then
A9: Line(DC,i)"*"Col(M,j) = D9*(Line(C@,i)"*"Col(M,j)) by FVSUM_1:73
      .= D9*Det RLine(M@,i9,Line(M@,j9))by A6,A8,Th32;
A10: width DC=n by MATRIX_0:24;
    then
A11: CM*(i,j)=D9* Det RLine(M@,i,Line(M@,j)) by A3,A4,A9,MATRIX_3:def 4;
    per cases;
    suppose
A12:  i=j;
      then
A13:  RLine(M@,i,Line(M@,j))=M@ by MATRIX11:30;
A14:  D=Det M@ by MATRIXR2:43;
A15:  D9*D=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) = CM*(i,j) by A3,A10,A4,A9,A13,A15,A14,MATRIX_3:def 4;
    end;
    suppose
A16:  i<>j;
      then
A17:  ID*(i,j) = 0.K by A3,A2,MATRIX_1:def 3;
      Det RLine(M@,i9,Line(M@,j9))=0.K by A6,A8,A16,MATRIX11:51;
      hence ID*(i,j) = CM*(i,j) by A11,A17;
    end;
  end;
  hence thesis by MATRIX_0:27;
end;
