reserve a,b,p,x,x9,x1,x19,x2,y,y9,y1,y19,y2,z,z9,z1,z2 for object,
   X,X9,Y,Y9,Z,Z9 for set;
reserve A,D,D9 for non empty set;
reserve f,g,h for Function;
reserve A,B for set;
reserve x,y,i,j,k for object;

theorem
  for f,g,h being Function, D being set holds f | D =h | D implies (h +*
  g) | D = (f +* g) | D
proof
  let f,g,h be Function, D be set;
  assume
A1: f |D = h | D;
A2: dom ((f +* g) | D) = dom (f +* g) /\ D by RELAT_1:61
    .= (dom f \/ dom g) /\ D by Def1;
A3: dom ((h +* g) | D) = dom (h +* g) /\ D by RELAT_1:61
    .= (dom h \/ dom g) /\ D by Def1;
  then
A4: dom ((h +* g) | D) = (dom h /\ D) \/ (dom g /\ D) by XBOOLE_1:23
    .= dom (f| D) \/ (dom g /\ D) by A1,RELAT_1:61
    .= (dom f /\ D) \/ (dom g /\ D) by RELAT_1:61
    .= (dom f \/ dom g ) /\ D by XBOOLE_1:23;
  now
    let x be object;
    assume
A5: x in dom ((f +* g) | D);
    then
A6: x in dom f \/ dom g by A2,XBOOLE_0:def 4;
A7: x in D by A2,A5,XBOOLE_0:def 4;
A8: x in dom h \/ dom g & ((h +* g) | D).x = (h +* g).x by A2,A3,A4,A5,
FUNCT_1:47,XBOOLE_0:def 4;
    per cases;
    suppose
A9:   x in dom g;
      ((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47
        .=g.x by A6,A9,Def1;
      hence ((h +* g) | D).x =((f +* g) | D).x by A8,A9,Def1;
    end;
    suppose
A10:  not x in dom g;
      then
A11:  ((h +* g) | D).x = h.x by A8,Def1
        .=(h | D ).x by A7,FUNCT_1:49;
      thus ((f +* g) | D).x = (f +* g).x by A5,FUNCT_1:47
        .=f.x by A6,A10,Def1
        .=((h +* g) | D).x by A1,A7,A11,FUNCT_1:49;
    end;
  end;
  hence thesis by A2,A4;
end;
