reserve Omega for non empty set;
reserve r for Real;
reserve Sigma for SigmaField of Omega;
reserve P for Probability of Sigma;
reserve E for finite non empty set;
reserve f,g for Real-Valued-Random-Variable of Sigma;

theorem Th21:
  for f,g be PartFunc of Omega,REAL holds (R_EAL f)(#)(R_EAL g) = R_EAL (f(#)g)
proof
  let f,g be PartFunc of Omega,REAL;
A1: dom ((R_EAL f)(#) (R_EAL g)) =dom ( R_EAL f ) /\ dom ( R_EAL g ) by
MESFUNC1:def 5
    .=dom (f (#)g ) by VALUED_1:def 4;
  now
    let x be object;
    assume
A2: x in dom ((R_EAL f )(#) (R_EAL g));
    hence ((R_EAL f)(#)(R_EAL g)).x =((R_EAL f ).x) * ((R_EAL g).x) by
MESFUNC1:def 5
      .= (f.x) * ((g.x) qua Real) by EXTREAL1:1
      .= (f (#) g).x by A1,A2,VALUED_1:def 4;
  end;
  hence thesis by A1,FUNCT_1:2;
end;
