reserve a,x,y for object, A,B for set,
  l,m,n for Nat;

theorem Th10:
  for f,g,h being Function holds (g +* h)*f = (g*f) +* (h*f)
proof
  let f,g,h be Function;
A1: dom((g +* h)*f) = dom(g*f) \/ dom(h*f)
  proof
    thus dom((g +* h)*f) c= dom(g*f) \/ dom(h*f)
    proof
      let x be object;
      assume
A2:   x in dom((g +* h)*f);
      then f.x in dom(g +* h) by FUNCT_1:11;
      then f.x in dom g \/ dom h by FUNCT_4:def 1;
      then
A3:   f.x in dom g or f.x in dom h by XBOOLE_0:def 3;
      x in dom f by A2,FUNCT_1:11;
      then x in dom(g*f) or x in dom(h*f) by A3,FUNCT_1:11;
      hence thesis by XBOOLE_0:def 3;
    end;
    let x be object;
    assume x in dom(g*f) \/ dom(h*f);
    then
A4: x in dom(g*f) or x in dom(h*f) by XBOOLE_0:def 3;
    then f.x in dom g or f.x in dom h by FUNCT_1:11;
    then f.x in dom g \/ dom h by XBOOLE_0:def 3;
    then
A5: f.x in dom(g +* h) by FUNCT_4:def 1;
    x in dom f by A4,FUNCT_1:11;
    hence thesis by A5,FUNCT_1:11;
  end;
  now
    let x be object;
    assume x in dom(g*f) \/ dom(h*f);
    then x in dom(g*f) or x in dom(h*f) by XBOOLE_0:def 3;
    then
A6: x in dom f by FUNCT_1:11;
    hereby
      assume
A7:   x in dom(h*f);
      then
A8:   f.x in dom h by FUNCT_1:11;
      thus ((g +* h)*f).x = (g +* h).(f.x) by A6,FUNCT_1:13
        .= h.(f.x) by A8,FUNCT_4:13
        .= (h*f).x by A7,FUNCT_1:12;
    end;
    assume not x in dom(h*f);
    then
A9: not f.x in dom h by A6,FUNCT_1:11;
    thus ((g +* h)*f).x = (g +* h).(f.x) by A6,FUNCT_1:13
      .= g.(f.x) by A9,FUNCT_4:11
      .= (g*f).x by A6,FUNCT_1:13;
  end;
  hence thesis by A1,FUNCT_4:def 1;
end;
