reserve i,j,m,n,k for Nat,
  x,y for set,
  K for Field,
  a,a1,a2 for Element of K,
  D for non empty set,
  d,d1,d2 for Element of D,
  M,M1,M2 for (Matrix of D),
  A,A1,A2,B1,B2 for (Matrix of K),
  f,g for FinSequence of NAT;
reserve F,F1,F2 for FinSequence_of_Matrix of D,
  G,G9,G1,G2 for FinSequence_of_Matrix of K;

theorem Th13:
  Sum Len F = 0 implies Sum Width F = 0
proof
  set LF=Len F;
  set WF=Width F;
  assume
A1: Sum LF=0;
  per cases by A1,RVSUM_1:85;
  suppose
    ex i st i in dom LF & 0> LF.i;
    hence thesis;
  end;
  suppose
A2: for i st i in dom LF holds 0>=LF.i;
    set F0=len F|->0;
A3: len WF=len F by CARD_1:def 7;
A4: dom LF=dom F by Def3;
A5: dom WF=dom F by Def4;
A6: now
      let j such that
A7:   1<=j and
A8:   j<=len WF;
A9:   j in dom WF by A7,A8,FINSEQ_3:25;
      then
A10:  WF.j=width (F.j) by Def4;
      j in Seg len F by A3,A7,A8;
      then
A11:  F0.j=0 by FINSEQ_2:57;
A12:  0>= LF.j by A2,A5,A4,A9;
      LF.j=len (F.j) by A5,A4,A9,Def3;
      hence WF.j=F0.j by A10,A12,A11,MATRIX_0:def 3;
    end;
    len F0=len F by CARD_1:def 7;
    then WF=F0 by A3,A6;
    hence thesis by RVSUM_1:81;
  end;
end;
