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 Th64:
  for P,Q,i,j st i in Seg card P & j in Seg card P & card P = card
Q holds Delete(EqSegm(M,P,Q),i,j) = EqSegm(M,P\{Sgm P.i},Q\{Sgm Q.j}) & card (P
  \{Sgm P.i}) = card (Q\{Sgm Q.j})
proof
  let P1,Q1,i,j such that
A1: i in Seg card P1 and
A2: j in Seg card P1 and
A3: card P1 = card Q1;
  set SQ1=Sgm Q1;
A5: dom SQ1=Seg card Q1 by FINSEQ_3:40;
A6: rng SQ1=Q1 by FINSEQ_1:def 14;
  then
A7: SQ1"Q1 = Seg card P1 by A3,A5,RELAT_1:134;
  set Q=Q1\{SQ1.j};
  set Q2=Seg card Q1\{j};
A8: Q c= Q1 by XBOOLE_1:36;
  set SP1=Sgm P1;
A10: dom SP1=Seg card P1 by FINSEQ_3:40;
A11: rng SP1=P1 by FINSEQ_1:def 14;
  then
A12: SP1"P1 = Seg card P1 by A10,RELAT_1:134;
  SQ1 is one-to-one by FINSEQ_3:92;
  then SQ1"{SQ1.j}={j} by A2,A3,A5,FINSEQ_5:4;
  then
A13: Q2 = SQ1 " Q by A3,A7,FUNCT_1:69;
A14: SP1.i in P1 by A1,A10,A11,FUNCT_1:def 3;
  set P2=Seg card P1\{i};
  set P=P1\{SP1.i};
  SP1 is one-to-one by FINSEQ_3:92;
  then SP1"{SP1.i}={i} by A1,A10,FINSEQ_5:4;
  then
A15: P2 = SP1 " P by A12,FUNCT_1:69;
  set E=EqSegm(M,P1,Q1);
A16: P c= P1 by XBOOLE_1:36;
  card P1<>0 by A1;
  then reconsider C=card P1-1 as Element of NAT by NAT_1:20;
A17: card P1=C+1;
  SQ1.j in Q1 by A2,A3,A5,A6,FUNCT_1:def 3;
  then
A18: card Q = C by A3,A17,STIRL2_1:55;
  Delete(E,i,j)=Deleting(E,i,j) by A1,A2,LAPLACE:def 1
    .=Segm(E,P2,Q2) by A3,Th58
    .=Segm(Segm(M,P1,Q1),P2,Q2) by A3,Def3
    .=Segm(M,P,Q) by A16,A8,A15,A13,Th56
    .=EqSegm(M,P,Q) by A14,A17,A18,Def3,STIRL2_1:55;
  hence thesis by A14,A17,A18,STIRL2_1:55;
end;
