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 Th19:
  [:rng nt,rng mt:] c= Indices A & (m=0 implies n=0) implies Segm(
  A,nt,mt) = Segm(A@,mt,nt)@
proof
  assume that
A1: [:rng nt,rng mt:] c= Indices A and
A2: m=0 implies n=0;
  set S9=Segm(A@,mt,nt);
  set S=Segm(A,nt,mt);
  per cases;
  suppose
A3: n=0;
    len S9=0 or len S9>0 & len S9=m by MATRIX_0:def 2;
    then width S9=0 by A3,MATRIX_0:23,def 3;
    then
A4: len (S9@)=0 by MATRIX_0:def 6;
    len S=0 by A3,MATRIX_0:def 2;
    then S={};
    hence thesis by A4;
  end;
  suppose
A5: n>0;
    then
A6: width S=m by Th1;
    len S=n by A5,Th1;
    then (S@)@ = S by A2,A5,A6,MATRIX_0:57;
    hence thesis by A1,A2,A5,Th18;
  end;
end;
