reserve a,b,i,j,k,l,m,n for Nat;

theorem F123:
  for f1,f2,f3 be complex-valued Function holds
    (f1 (#) f2) (#) f3 = f1 (#) (f2 (#) f3)
  proof
    let f1,f2,f3 be complex-valued Function;
    A1: dom ((f1 (#) f2) (#) f3) = dom (f1 (#) f2) /\ dom f3 by VALUED_1:def 4
    .= dom f1 /\ dom f2 /\ dom f3 by VALUED_1:def 4;
    A2: dom (f1 (#) (f2 (#) f3)) = dom f1 /\ dom (f2 (#) f3) by VALUED_1:def 4
    .= dom f1 /\ (dom f2 /\ dom f3) by VALUED_1:def 4; then
    A3: dom ((f1 (#) f2) (#) f3) = dom (f1 (#) (f2 (#) f3)) by A1,XBOOLE_1:16;
    for x be object st x in dom ((f1 (#) f2) (#) f3) holds
    ((f1 (#) f2) (#) f3).x = (f1 (#) (f2 (#) f3)).x
    proof
      let x be object such that
      B1: x in dom ((f1 (#) f2) (#) f3);
      x in dom (f1 (#) (f2 (#) f3)) by B1,A1,A2,XBOOLE_1:16; then
      B2a: x in (dom (f1 (#) f2) /\ dom f3) &
        x in (dom f1 /\ dom (f2 (#) f3)) by VALUED_1:def 4, B1;
      B3:  ((f1 (#) f2) (#) f3).x = (f1 (#) f2).x * f3.x by VALUED_1:def 4,B1
      .= (f1.x * f2.x) * f3.x by B2a,VALUED_1:def 4;
      (f1 (#) (f2 (#) f3)).x = f1.x * (f2 (#) f3).x by A3,B1,VALUED_1:def 4
      .= f1.x * (f2.x * f3.x) by B2a,VALUED_1:def 4;
      hence thesis by B3;
    end;
    hence thesis by A1,A2,XBOOLE_1:16,FUNCT_1:2;
  end;
