 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).((multcomplexcpfunc A).(a,f),g)
  = (multcomplexcpfunc A).(a,(multcpfunc A).(f,g))
proof
  reconsider a as Element of COMPLEX by XCMPLX_0:def 2;
  reconsider i = (multcomplexcpfunc A).(a,f) as Element of PFuncs(A,COMPLEX);
  set j = (multcpfunc A).(f,g);
  set k = (multcpfunc A).(i,g);
  reconsider l = (multcomplexcpfunc A).(a,j) as Element of PFuncs(A,COMPLEX);
A1: dom i = dom f & dom k = dom i /\ dom g by Th5,Th7;
A2: dom j = dom f /\ dom g by Th5;
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,Th5;
    hence k.x = l.x by A8,A10;
  end;
  dom l = dom j by Th7;
  hence thesis by A1,A2,A3,PARTFUN1:5;
end;
