reserve a,b,r for Real;
reserve A,B for non empty set;
reserve f,g,h for Element of PFuncs(A,REAL);

theorem
  (multpfunc A).((multrealpfunc A).(a,f),g) = (multrealpfunc A).(a,(
  multpfunc A).(f,g))
proof
  reconsider aa=a as Element of REAL by XREAL_0:def 1;
  reconsider i = (multrealpfunc A).(aa,f) as Element of PFuncs(A,REAL);
  set j = (multpfunc A).(f,g);
  set k = (multpfunc A).(i,g);
  reconsider l = (multrealpfunc A).(aa,j) as Element of PFuncs(A,REAL);
A1: dom i = dom f & dom k = dom i /\ dom g by Th7,Th9;
A2: dom j = dom f /\ dom g by Th7;
A3: now
    let x be Element of A;
A4: j.x = (f(#)g).x by Def3;
    assume
A5: x in dom k;
    then x in dom(f(#)g) by A1,VALUED_1:def 4;
    then
A6: j.x = f.x * g.x by A4,VALUED_1:def 4;
A7: i.x = (a(#)f).x & dom (a(#)f) = dom f by Def4,VALUED_1:def 5;
    x in dom f by A1,A5,XBOOLE_0:def 4;
    then
A8: i.x = a * f.x by A7,VALUED_1:def 5;
A9: l.x = (a(#)j).x by Def4;
    x in dom(a(#)j) by A1,A2,A5,VALUED_1:def 5;
    then
A10: l.x = a*(f.x * g.x) by A6,A9,VALUED_1:def 5;
    k.x =i.x * g.x by A5,Th7;
    hence k.x = l.x by A8,A10;
  end;
  dom l = dom j by Th9;
  hence thesis by A1,A2,A3,PARTFUN1:5;
end;
