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;

theorem Th37:
  for F,Fmt be FinSequence of D,nt,mt st len F = width A9 & Fmt =
  F * mt & [:rng nt,rng mt:] c= Indices A9 for i,j st nt"{j} = {i} holds RLine(
  Segm(A9,nt,mt),i,Fmt) = Segm(RLine(A9,j,F),nt,mt)
proof
  let F,Fmt be FinSequence of D,nt,mt such that
A1: len F = width A9 and
A2: Fmt = F * mt and
A3: [:rng nt,rng mt:]c=Indices A9;
  let i,j such that
A4: nt"{j} = {i};
A5: i in {i} by TARSKI:def 1;
  then
A6: i in dom nt by A4,FUNCT_1:def 7;
  then nt.i in rng nt by FUNCT_1:def 3;
  then rng mt={} or [:rng nt,rng mt:]<>{};
  then
A7: rng mt c= Seg width A9 by A3,ZFMISC_1:114;
  nt.i in {j} by A4,A5,FUNCT_1:def 7;
  then
A8: nt.i=j by TARSKI:def 1;
  set R=RLine(A9,j,F);
  set SR=Segm(R,nt,mt);
  set S=Segm(A9,nt,mt);
A9: dom mt=Seg m by FINSEQ_2:124;
  set RS=RLine(S,i,Fmt);
A10: Indices SR=Indices S by MATRIX_0:26;
  dom F=Seg width A9 by A1,FINSEQ_1:def 3;
  then
A11: dom Fmt=dom mt by A2,A7,RELAT_1:27;
A12: width S in NAT by ORDINAL1:def 12;
A13: n<>0 by A6;
  then width S=m by MATRIX_0:23;
  then
A14: len Fmt=width S by A11,A9,FINSEQ_1:def 3,A12;
A15: Indices A9=Indices R by MATRIX_0:26;
  now
A16: dom nt=Seg n by FINSEQ_2:124;
    let k,l such that
A17: [k,l] in Indices SR;
A18: Indices S=[:Seg n,Seg m:] by A13,MATRIX_0:23;
    then
A19: k in Seg n by A10,A17,ZFMISC_1:87;
    reconsider k9=k,l9=l as Element of NAT by ORDINAL1:def 12;
A20: SR*(k,l) = R*(nt.k9,mt.l9) by A17,Def1;
A21: [nt.k9,mt.l9] in Indices A9 by A3,A15,A17,Th17;
A22: l in dom mt by A9,A10,A17,A18,ZFMISC_1:87;
    per cases;
    suppose
A23:  k=i;
      then
A24:  RS*(k,l)= Fmt.l by A14,A10,A17,MATRIX11:def 3;
      SR*(k,l)=F.(mt.l) by A1,A8,A20,A21,A23,MATRIX11:def 3;
      hence RS*(k,l)=SR*(k,l) by A2,A22,A24,FUNCT_1:13;
    end;
    suppose
      k<>i;
      then not k in nt"{j} by A4,TARSKI:def 1;
      then not nt.k in {j} by A19,A16,FUNCT_1:def 7;
      then
A25:  nt.k<>j by TARSKI:def 1;
      then
A26:  SR*(k,l)=A9*(nt.k9,mt.l9) by A1,A20,A21,MATRIX11:def 3;
      RS*(k,l)=S*(k,l) by A8,A14,A10,A17,A25,MATRIX11:def 3;
      hence RS*(k,l)=SR*(k,l) by A10,A17,A26,Def1;
    end;
  end;
  hence thesis by MATRIX_0:27;
end;
