reserve x,y for object,X,Y for set,
  D for non empty set,
  i,j,k,l,m,n,m9,n9 for Nat,
  i0,j0,n0,m0 for non zero Nat,
  K for Field,
  a,b for Element of K,
  p for FinSequence of K,
  M for Matrix of n,K;
reserve A for (Matrix of D),
  A9 for Matrix of n9,m9,D,
  M9 for Matrix of n9, m9,K,
  nt,nt1,nt2 for Element of n-tuples_on NAT,
  mt,mt1 for Element of m -tuples_on NAT,
  M for Matrix of K;
reserve P,P1,P2,Q,Q1,Q2 for without_zero finite Subset of NAT;

theorem Th65:
  for M,P,P1,Q1 st card P1 = card Q1 & P c= P1 & Det EqSegm(M,P1,
  Q1) <> 0.K ex Q st Q c= Q1 & card P = card Q & Det EqSegm(M,P,Q) <> 0.K
proof
  let M,P,P1,Q1 such that
A1: card P1 = card Q1 and
A2: P c= P1 and
A3: Det EqSegm(M,P1,Q1) <> 0.K;
  defpred Q[Nat] means for P st P c= P1 & card P=$1 ex Q st Q c= Q1 & card P=
  card Q & Det EqSegm(M,P,Q) <> 0.K;
A4: for k be Element of NAT st k < card P1 & Q[k+1] holds Q[k]
  proof
    let k be Element of NAT such that
A5: k < card P1 and
A6: Q[k+1];
    let P such that
A7: P c= P1 and
A8: card P=k;
    P c< P1 by A5,A7,A8,XBOOLE_0:def 8;
    then P1\P<>{} by XBOOLE_1:105;
    then consider x being object such that
A9: x in P1\P by XBOOLE_0:def 1;
    reconsider x as non zero Element of NAT by A9;
    reconsider Px=P\/{x} as without_zero finite Subset of NAT;
A10: not x in P by A9,XBOOLE_0:def 5;
    then
A11: card Px=k+1 by A8,CARD_2:41;
    x in P1 by A9,XBOOLE_0:def 5;
    then {x} c= P1 by ZFMISC_1:31;
    then Px c= P1 by A7,XBOOLE_1:8;
    then consider Q2 such that
A12: Q2 c= Q1 and
A13: card Px=card Q2 and
A14: Det EqSegm(M,Px,Q2) <> 0.K by A6,A8,A10,CARD_2:41;
    set E=EqSegm(M,Px,Q2);
A15: Px\{x}=P by A10,ZFMISC_1:117;
    x in {x} by TARSKI:def 1;
    then
A16: x in Px by XBOOLE_0:def 3;
A18: dom Sgm Px = Seg card Px by FINSEQ_3:40;
    rng Sgm Px = Px by FINSEQ_1:def 14;
    then consider i be object such that
A19: i in Seg card Px and
A20: Sgm Px.i=x by A18,A16,FUNCT_1:def 3;
A21: k+1-'1=k+1-1 by XREAL_0:def 2;
    reconsider i as Element of NAT by A19;
    consider j such that
A22: j in Seg card Px and
A23: Det Delete(E,i,j) <> 0.K by A14,A19,Lm3;
    take Q=Q2\{Sgm Q2.j};
    Q c= Q2 by XBOOLE_1:36;
    hence thesis by A8,A11,A12,A13,A19,A20,A22,A23,A15,A21,Th64;
  end;
A24: Q[card P1]
  proof
    let P;
    assume that
A25: P c= P1 and
A26: card P=card P1;
    P=P1 by A25,A26,CARD_2:102;
    hence thesis by A1,A3;
  end;
  for k be Element of NAT st k <= card P1 holds Q[k]
   from PRE_POLY:sch 1(A24,A4);
  hence thesis by A2,NAT_1:43;
end;
