reserve D for non empty set,
  i,j,k for Nat,
  n,m for Nat,
  r for Real,
  e for real-valued FinSequence;

theorem
  for M being non empty-yielding Joint_Probability Matrix of REAL holds
  for i,j st [i,j] in Indices M holds M*(i,j) <= 1
proof
  let M be non empty-yielding Joint_Probability Matrix of REAL;
A1: for i,j st [i,j] in Indices M holds M*(i,j) >=0 by Def6;
A2: for i be Nat st i in dom Sum M holds (Sum M).i >= 0
  proof
    let i be Nat such that
A3: i in dom Sum M;
    i in Seg len Sum M by A3,FINSEQ_1:def 3;
    then i in Seg len M by Def1;
    then i in dom M by FINSEQ_1:def 3;
    then for j be Nat st j in dom(M.i) holds (M.i).j >= 0 by A1,Lm1;
    then Sum(M.i) >= 0 by RVSUM_1:84;
    hence thesis by A3,Def1;
  end;
A4: for i st i in dom Sum M holds (Sum M).i <= 1
  proof
    let i;
    assume i in dom Sum M;
    then (Sum M).i <= SumAll M by A2,Th5;
    hence thesis by Def7;
  end;
A5: for i st i in dom M holds for j st j in dom(M.i) holds (M.i).j <= Sum(M. i)
  proof
    let i;
    assume i in dom M;
    then for j be Nat st j in dom(M.i) holds (M.i).j >= 0 by A1,Lm1;
    hence thesis by Th5;
  end;
A6: for i st i in dom M holds for j st j in dom(M.i) holds (M.i).j <= 1
  proof
    let i such that
A7: i in dom M;
    i in Seg len M by A7,FINSEQ_1:def 3;
    then i in Seg len Sum M by Def1;
    then
A8: i in dom Sum M by FINSEQ_1:def 3;
    then (Sum M).i <= 1 by A4;
    then
A9: Sum(M.i) <= 1 by A8,Def1;
    let j;
    assume j in dom(M.i);
    then (M.i).j <= Sum(M.i) by A5,A7;
    hence thesis by A9,XXREAL_0:2;
  end;
  let i,j such that
A10: [i,j] in Indices M;
A11: ex p1 being FinSequence of REAL st p1 = M.i & M*(i,j) = p1.j by A10,
MATRIX_0:def 5;
  i in Seg len M by A10,Th12;
  then
A12: i in dom M by FINSEQ_1:def 3;
  j in Seg width M by A10,Th12;
  then j in Seg len(M.i) by A12,MATRIX_0:36;
  then j in dom(M.i) by FINSEQ_1:def 3;
  hence thesis by A6,A12,A11;
end;
