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
  for A be Matrix of n,K st Det A <> 0.K for x,b be FinSequence of K st
len x = n & x * A = <*b*> holds <*x*> = b * A~ & for i st i in Seg n holds x.i
  = (Det A)" * Det ReplaceLine(A,i,b)
proof
  let A be Matrix of n,K such that
A1: Det A <> 0.K;
  let x,b be FinSequence of K such that
A2: len x = n and
A3: x * A = <*b*>;
  set X=<*x*>;
A4: width X=len x by MATRIX_0:23;
  hence X = b * A~ by A1,A2,A3,Th38;
A5: [:Seg 1,Seg n:]= Indices X by A2,MATRIX_0:23;
  set B=<*b*>;
A6: 1 in Seg 1;
  then
A7: Line(X,1)=X. 1 by MATRIX_0:52;
  let i such that
A8: i in Seg n;
A9: [1,i] in [:Seg 1,Seg n:] by A8,A6,ZFMISC_1:87;
A10: Line(B,1)=B.1 by A6,MATRIX_0:52;
  X*(1,i) = Line(X,1).i by A2,A4,A8,MATRIX_0:def 7
    .= x.i by A7;
  hence x.i = (Det A)" * Det ReplaceLine(A,i,Line(B,1)) by A1,A2,A3,A4,A9,A5
,Th38
    .= (Det A)" * Det ReplaceLine(A,i,b) by A10;
end;
