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
  for p being ProbFinS FinSequence of REAL for M being non
  empty-yielding Conditional_Probability Matrix of REAL st len p = len M holds
  Entropy_of_Joint_Prob ((Vec2DiagMx p) * M) = Entropy p + Sum mlt(p,
  Entropy_of_Cond_Prob M)
proof
  let p be ProbFinS FinSequence of REAL;
  let M be non empty-yielding Conditional_Probability Matrix of REAL;
  set M1 = (Vec2DiagMx p) * M;
  assume
A1: len p = len M;
  then reconsider M1 as Joint_Probability Matrix of REAL by Th28;
A2: Entropy p + Sum mlt(p,Entropy_of_Cond_Prob M) =-Sum Infor_FinSeq_of p +
  Sum mlt(p,-LineSum Infor_FinSeq_of M) by Th63
    .=-Sum Infor_FinSeq_of p + Sum -mlt(p,LineSum Infor_FinSeq_of M) by
RVSUM_1:65
    .=-Sum Infor_FinSeq_of p + -Sum mlt(p,LineSum Infor_FinSeq_of M) by
RVSUM_1:88;
  Entropy_of_Joint_Prob M1 = -Sum Mx2FinS Infor_FinSeq_of M1 by Th59
    .= -SumAll Infor_FinSeq_of M1 by Th42
    .= -(Sum Infor_FinSeq_of p + Sum mlt(p,LineSum Infor_FinSeq_of M)) by A1
,Th64
    .= -Sum Infor_FinSeq_of p - Sum mlt(p,LineSum Infor_FinSeq_of M);
  hence thesis by A2;
end;
