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 Th31:
  for f,i st len f=n & i in Seg n holds mlt(Col(Matrix_of_Cofactor
  M,i),f) = LaplaceExpL(RLine(M@,i,f),i)
proof
  let f,i such that
A1: len f=n and
A2: i in Seg n;
  reconsider N=n as Element of NAT by ORDINAL1:def 12;
  set KK=the carrier of K;
  set C=Matrix_of_Cofactor M;
  reconsider Tp=f,TC=Col(C,i) as Element of N-tuples_on KK by A1,FINSEQ_2:92
,MATRIX_0:24;
  set R=RLine(M@,i,f);
  set LL=LaplaceExpL(R,i);
  set MCT=mlt(TC,Tp);
A3: len LL=n by Def7;
A4: now
A5: Indices M@=[:Seg n,Seg n:] by MATRIX_0:24;
A6: dom LL=Seg n by A3,FINSEQ_1:def 3;
A7: width (M@)=n by MATRIX_0:24;
    let j be Nat such that
A8: 1<=j and
A9: j<=n;
A10: j in Seg n by A8,A9;
    then Delete(M@,i,j)=Delete(M,j,i)@ by A2,Th14;
    then
A11: Cofactor(M@,i,j)=Cofactor(M,j,i) by MATRIXR2:43;
    Indices C=[:Seg n,Seg n:] by MATRIX_0:24;
    then [j,i] in Indices C by A2,A10,ZFMISC_1:87;
    then
A12: C*(j,i)=Cofactor(M,j,i) by Def6;
    n=len C by MATRIX_0:24;
    then dom C=Seg n by FINSEQ_1:def 3;
    then
A13: Col(C,i).j=C*(j,i) by A10,MATRIX_0:def 8;
A14: Indices M=[:Seg n,Seg n:] by MATRIX_0:24;
    then [i,j] in Indices M by A2,A10,ZFMISC_1:87;
    then R*(i,j)=f.j by A1,A7,A14,A5,MATRIX11:def 3;
    then
A15: MCT.j=Cofactor(M,j,i)*(R*(i,j)) by A10,A13,A12,FVSUM_1:61;
    Cofactor(R,i,j)=Cofactor(M@,i,j) by A2,A10,Th15;
    hence MCT.j=LL.j by A10,A11,A6,A15,Def7;
  end;
  len MCT=n by CARD_1:def 7;
  hence thesis by A3,A4;
end;
