reserve D for non empty set,
  i,j,k,l for Nat,
  n for Nat,
  x for set,
  a,b,c,r,r1,r2 for Real,
  p,q for FinSequence of REAL,
  MR,MR1 for Matrix of REAL;

theorem Th19:
  MR is m-nonnegative iff for i st i in dom MR holds Line(MR,i) is nonnegative
proof
  hereby
    assume
A1: MR is m-nonnegative;
    let i such that
A2: i in dom MR;
    now
      let k;
      assume k in dom Line(MR,i);
      then
A3:   k in dom (MR.i) by A2,MATRIX_0:60;
      then k in Seg width MR by A2,Th18;
      then
A4:   (Line(MR,i)).k = MR*(i,k) by MATRIX_0:def 7;
      [i,k] in Indices MR by A2,A3,MATRPROB:13;
      hence (Line(MR,i)).k >= 0 by A1,A4,MATRPROB:def 6;
    end;
    hence Line(MR,i) is nonnegative;
  end;
  assume
A5: for i st i in dom MR holds Line(MR,i) is nonnegative;
  now
    let i,j such that
A6: [i,j] in Indices MR;
A7: j in Seg width MR by A6,MATRPROB:12;
    then j in Seg len Line(MR,i) by MATRIX_0:def 7;
    then
A8: j in dom Line(MR,i) by FINSEQ_1:def 3;
    i in Seg len MR by A6,MATRPROB:12;
    then i in dom MR by FINSEQ_1:def 3;
    then
A9: Line(MR,i) is nonnegative by A5;
    MR*(i,j) = Line(MR,i).j by A7,MATRIX_0:def 7;
    hence MR*(i,j) >= 0 by A8,A9;
  end;
  hence thesis by MATRPROB:def 6;
end;
