reserve x, y for object, X for set,
  i, j, k, l, n, m for Nat,
  D for non empty set,
  K for commutative Ring,
  a,b for Element of K,
  perm, p, q for Element of Permutations(n),
  Perm,P for Permutation of Seg n,
  F for Function of Seg n,Seg n,
  perm2, p2, q2, pq2 for Element of Permutations(n+2),
  Perm2 for Permutation of Seg (n+2);
reserve s for Element of 2Set Seg (n+2);
reserve pD for FinSequence of D,
  M for Matrix of n,m,D,
  pK,qK for FinSequence of K,
  A for Matrix of n,K;

theorem Th50:
  for i,j st i in Seg n & j in Seg n & i < j for M be (Matrix of n
  ,K) st Line(M,i) = Line(M,j) holds Det(M) = 0.K
proof
  let i,j such that
A1: i in Seg n and
A2: j in Seg n and
A3: i < j;
  set P=Permutations(n);
  consider Q,E be finite set such that
  E ={p:p is even} & Q = {q:q is odd} and
A4: E /\ Q = {} & E \/ Q = P and
A5: ex P be Function of E,Q,tr be Element of Permutations n st tr is
being_transposition & tr.i=j & dom P=E & P is bijective & for p st p in E holds
  P.p=p*tr by A1,A2,A3,Lm8;
A6: E c= P by A4,XBOOLE_1:7;
  set KK=the carrier of K;
  set aa=the addF of K;
  let M be (Matrix of n,K) such that
A7: Line(M,i) = Line(M,j);
A8: Q c= P by A4,XBOOLE_1:7;
  set PathM=Path_product(M);
  consider PERM be Function of E,Q, tr be Element of Permutations n such that
A9: tr is being_transposition and
A10: tr.i=j and
A11: dom PERM = E and
A12: PERM is bijective and
A13: for p st p in E holds PERM.p=p*tr by A5;
  reconsider E,Q as Element of Fin P by A6,A8,FINSUB_1:def 5;
  aa is having_a_unity by FVSUM_1:8;
  then consider GE be Function of Fin P,KK such that
A14: aa $$ (E,PathM) = GE.E and
A15: for e being Element of KK st e is_a_unity_wrt aa holds GE.{} = e and
A16: for x being Element of P holds GE.{x} = PathM.x and
A17: for B9 being Element of Fin P st B9 c= E & B9 <> {} for x being
  Element of P st x in E \ B9 holds GE.(B9 \/ {x}) = aa.(GE.B9,PathM.x) by
SETWISEO:def 3;
A18: E misses Q by A4;
  aa is having_a_unity by FVSUM_1:8;
  then consider GQ be Function of Fin P,KK such that
A19: aa $$ (Q,PathM) = GQ.Q and
A20: for e being Element of KK st e is_a_unity_wrt aa holds GQ.{} = e and
A21: for x being Element of P holds GQ.{x} = PathM.x and
A22: for B9 being Element of Fin P st B9 c= Q & B9 <> {} for x being
  Element of P st x in Q \ B9 holds GQ.(B9 \/ {x}) = aa.(GQ.B9,PathM.x) by
SETWISEO:def 3;
  defpred P[Nat] means for B,PB be Element of Fin P st card B=$1 & B c= E &
  PERM.:B=PB holds GE.B + GQ.PB = 0.K;
A23: for k be Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A24: P[k];
    let B,PB be Element of Fin P such that
A25: card B=k+1 and
A26: B c=E and
A27: PERM.:B=PB;
    now
      per cases;
      case
        k=0;
        then consider x being object such that
A28:    B={x} by A25,CARD_2:42;
A29:    x in B by A28,TARSKI:def 1;
        B c= P by FINSUB_1:def 5;
        then reconsider x as Element of P by A29;
        x*tr is Element of P by MATRIX_9:39;
        then reconsider Px=PERM.x as Element of P by A13,A26,A29;
A30:    Im(PERM,x)={Px} by A11,A26,A29,FUNCT_1:59;
A31:    GE.{x}=PathM.x by A16;
A32:    GQ.{PERM.x}=PathM.(Px) by A21;
        Px = x*tr by A13,A26,A29;
        then -GE.B=GQ.PB by A1,A2,A3,A7,A9,A10,A27,A28,A31,A32,A30,Th49;
        hence thesis by RLVECT_1:def 10;
      end;
      case
A33:    k>0;
        consider x being object such that
A34:    x in B by A25,CARD_1:27,XBOOLE_0:def 1;
        B c= P by FINSUB_1:def 5;
        then reconsider x as Element of P by A34;
        x*tr is Element of P by MATRIX_9:39;
        then reconsider Px=PERM.x as Element of P by A13,A26,A34;
A35:    Im(PERM,x)={Px} by A11,A26,A34,FUNCT_1:59;
        Px=x*tr by A13,A26,A34;
        then
A36:    -PathM.x=PathM.Px by A1,A2,A3,A7,A9,A10,Th49;
A37:    Q c= P by FINSUB_1:def 5;
        B c= P by FINSUB_1:def 5;
        then
A38:    B\{x} c=P;
A39:    rng PERM =Q by A12,FUNCT_2:def 3;
        then
A40:    Px in Q by A11,A26,A34,FUNCT_1:def 3;
        PERM.:(B\{x}) c= rng PERM by RELAT_1:111;
        then PERM.:(B\{x})c=P by A39,A37;
        then reconsider
        B9=B\{x},PeBx=PERM.:(B\{x}) as Element of Fin P
        by A38,FINSUB_1:def 5;
A41:    Px in {Px} by TARSKI:def 1;
A42:    {x} \/ B9=B by A34,ZFMISC_1:116;
        then
A43:    PERM.:B=Im(PERM,x)\/PeBx by RELAT_1:120;
        B9 misses {x} by XBOOLE_1:79;
        then B9/\{x}={};
        then PERM.:{}={Px}/\PeBx by A12,A35,FUNCT_1:62;
        then not Px in PeBx by A41,XBOOLE_0:def 4;
        then
A44:    Px in Q\PeBx by A40,XBOOLE_0:def 5;
A45:    not x in B9 by ZFMISC_1:56;
        then
A46:    x in E\B9 by A26,A34,XBOOLE_0:def 5;
A47:    k+1=card B9+1 by A25,A42,A45,CARD_2:41;
        then consider y being object such that
A48:    y in B9 by A33,CARD_1:27,XBOOLE_0:def 1;
        B\{x} c=E by A26;
        then PERM.y in PeBx by A11,A48,FUNCT_1:def 6;
        then GQ.PB = aa.(GQ.PeBx,PathM.Px) by A22,A27,A39,A43,A35,A44,
RELAT_1:111;
        hence
        GQ.PB+GE.B = (GQ.PeBx-PathM.x)+(GE.B9+PathM.x) by A17,A26,A33,A42,A47
,A46,A36,CARD_1:27,XBOOLE_1:1
          .= GQ.PeBx+(-PathM.x+(GE.B9+PathM.x)) by RLVECT_1:def 3
          .= GQ.PeBx+(GE.B9+(PathM.x-PathM.x)) by RLVECT_1:def 3
          .= GQ.PeBx+(GE.B9+0.K) by RLVECT_1:def 10
          .= (GQ.PeBx+GE.B9)+0.K by RLVECT_1:def 3
          .= 0.K+0.K by A24,A26,A47,XBOOLE_1:1
          .=0.K by RLVECT_1:4;
      end;
    end;
    hence thesis;
  end;
  set F=In(P,Fin P);
  P in Fin P by FINSUB_1:def 5; then
A49: P=F by SUBSET_1:def 8;
  rng PERM=Q by A12,FUNCT_2:def 3;
  then
A50: PERM.:E=Q by A11,RELAT_1:113;
A51: P[0]
  proof
    let B,PB be Element of Fin P such that
A52: card B=0 and
    B c= E and
A53: PERM.:B=PB;
A54: B={} by A52;
    then
A55: GE.B=0.K by A15,FVSUM_1:6;
    PERM.:{}={};
    then GQ.PB=0.K by A20,A53,A54,FVSUM_1:6;
    hence thesis by A55,RLVECT_1:def 4;
  end;
  for k be Nat holds P[k] from NAT_1:sch 2(A51,A23);
  then P[card E];
  then aa $$ (E,PathM)+aa $$ (Q,PathM)=0.K by A14,A19,A50;
  hence thesis by A4,A18,A49,FVSUM_1:8,SETWOP_2:4;
end;
