 reserve a,b,r for Complex;
 reserve V for ComplexLinearSpace;
reserve A,B for non empty set;
reserve f,g,h for Element of PFuncs(A,COMPLEX);

theorem
  (multcpfunc A).(f,(addcpfunc A).(g,h)) =
  (addcpfunc A).((multcpfunc A).(f,g),(multcpfunc A).(f,h))
proof
  set i = (multcpfunc A).(f,h);
  set j = (multcpfunc A).(f,g);
  set k = (addcpfunc A).(j,i);
  set l = (addcpfunc A).(g,h);
  set m = (multcpfunc A).(f,l);
A1: dom f /\ dom g /\ dom h = dom f /\ (dom g /\ dom h) by XBOOLE_1:16;
  dom i = dom f /\ dom h & dom j = dom f /\ dom g by Th5;
  then dom k = (dom h /\ dom f) /\ (dom f /\ dom g) by Th4;
  then dom k = dom h /\ (dom f /\ (dom f /\ dom g)) by XBOOLE_1:16;
  then
A2: dom k = dom h /\ (dom f /\ dom f /\ dom g) by XBOOLE_1:16;
A3: dom f /\ dom g /\ dom h = dom g /\ (dom f /\ dom h) by XBOOLE_1:16;
A4: now
    let x be Element of A;
    assume
A5: x in dom k;
    then x in dom f /\ dom g by A2,XBOOLE_0:def 4;
    then
A6: x in dom(f(#)g) by VALUED_1:def 4;
    x in dom g /\ dom h by A2,A1,A5,XBOOLE_0:def 4;
    then
A7: x in dom(g+h) by VALUED_1:def 1;
    j.x = (f(#)g).x by Def3;
    then
A8: j.x = f.x * g.x by A6,VALUED_1:def 4;
    x in dom f /\ dom h by A2,A3,A5,XBOOLE_0:def 4;
    then
A9: x in dom(f(#)h) by VALUED_1:def 4;
    i.x = (f(#)h).x by Def3;
    then
A10: i.x = f.x * h.x by A9,VALUED_1:def 4;
    k.x = j.x + i.x by A5,Th4;
    then l.x = (g+h).x & k.x = f.x * (g.x + h.x) by A8,A10, Def5;
    then
A11: k.x = f.x * l.x by A7,VALUED_1:def 1;
    x in dom f /\ dom l by A2,A1,A5,Th4;
    then
A12: x in dom(f(#)l) by VALUED_1:def 4;
    m.x = (f(#)l).x by Def3;
    hence k.x = m.x by A12,A11,VALUED_1:def 4;
  end;
  dom m = dom f /\ dom l & dom l = dom g /\ dom h by Th4,Th5;
  hence thesis by A2,A4,PARTFUN1:5,XBOOLE_1:16;
end;
