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 Th17:
  [:rng nt,rng mt:] c= Indices A implies ( [i,j] in Indices Segm(A
  ,nt,mt) iff [nt.i,mt.j] in Indices A )
proof
  set S=Segm(A,nt,mt);
A1: dom mt=Seg m by FINSEQ_2:124;
  assume
A2: [:rng nt,rng mt:] c= Indices A;
  thus [i,j] in Indices Segm(A,nt,mt) implies [nt.i,mt.j] in Indices A
  proof
A3: dom mt=Seg m by FINSEQ_2:124;
    assume
A4: [i,j] in Indices S;
    then
A5: j in Seg width S by ZFMISC_1:87;
    [i,j] in [:Seg n,Seg width S:] by A4,MATRIX_0:25;
    then
A6: i in Seg n by ZFMISC_1:87;
    then
A7: n <> 0;
    dom nt=Seg n by FINSEQ_2:124;
    then
A8: nt.i in rng nt by A6,FUNCT_1:def 3;
    width S=m by Th1,A7;
    then mt.j in rng mt by A5,A3,FUNCT_1:def 3;
    then [nt.i,mt.j] in [:rng nt,rng mt:] by A8,ZFMISC_1:87;
    hence thesis by A2;
  end;
  assume
A9: [nt.i,mt.j] in Indices A;
A10: j in dom mt
  proof
    assume not j in dom mt;
    then mt.j = {} by FUNCT_1:def 2;
    then 0 in Seg width A by A9,ZFMISC_1:87;
    hence thesis by FINSEQ_1:1;
  end;
A11: i in dom nt
  proof
    assume not i in dom nt;
    then
A12: nt.i = {} by FUNCT_1:def 2;
    dom A=Seg len A by FINSEQ_1:def 3;
    then 0 in Seg len A by A9,A12,ZFMISC_1:87;
    hence thesis by FINSEQ_1:1;
  end;
  then n<>0;
  then
A13: width S=m by Th1;
  dom nt=Seg n by FINSEQ_2:124;
  then [i,j] in [:Seg n,Seg width S:] by A11,A10,A13,A1,ZFMISC_1:87;
  hence thesis by MATRIX_0:25;
end;
