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 Th51:
  Segm(A,Seg len A \ {i},Seg width A) = Del(A,i)
proof
  set SLA=Seg len A;
  set Si=SLA\{i};
  set S= Segm(A,Si,Seg width A);
A1: dom A=SLA by FINSEQ_1:def 3;
  per cases;
  suppose
A2: not i in dom A;
    then
A3: Del(A,i)=A by FINSEQ_3:104;
    Si=SLA by A1,A2,ZFMISC_1:57;
    hence thesis by A3,Th46;
  end;
  suppose
A4: i in dom A;
    then consider m such that
A5: len A = m + 1 and
A6: len Del(A,i) = m by FINSEQ_3:104;
    reconsider m as Element of NAT by ORDINAL1:def 12;
    card SLA = m+1 by A5,FINSEQ_1:57;
    then
A7: card Si=m by A1,A4,STIRL2_1:55;
A8: now
      reconsider A9=A as Matrix of m+1,width A,D by A5,MATRIX_0:20;
      let j such that
A9:   1<=j and
A10:  j<=m;
A11:  j in Seg m by A9,A10;
A12:  dom A=Seg len A by FINSEQ_1:def 3;
A13:  Del(A,i)=A*Sgm Si by A1,FINSEQ_3:def 2;
A14:  dom Del(A,i)=Seg m by A6,FINSEQ_1:def 3;
      then
A15:  Sgm Si.j in dom A by A11,A13,FUNCT_1:11;
      Del(A,i).j=A9.(Sgm Si.j) by A14,A11,A13,FUNCT_1:12;
      hence Del(A,i).j = Line(A9,Sgm Si.j) by A5,A15,A12,MATRIX_0:52
        .= Line(S,j) by A7,A11,Th48
        .= S.j by A7,A11,MATRIX_0:52;
    end;
    len S=m by A7,MATRIX_0:def 2;
    hence thesis by A6,A8;
  end;
end;
