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;
reserve x for set;
reserve x for object;

theorem
  dom g misses dom h implies (f \ g) +* h = (f +* h) \ g
  proof
    assume
A1: dom g misses dom h;
A2: dom(f+*h) = dom f \/ dom h by Def1;
A3: dom((f\g)+*h) = dom(f\g) \/ dom h by Def1;
A4: dom((f\g)+*h) = dom((f+*h)\g)
    proof
      thus dom((f\g)+*h) c= dom((f+*h)\g)
      proof
        let x be object;
        assume
A5:     x in dom((f\g)+*h);
        per cases by A3,A5,XBOOLE_0:def 3;
        suppose that
A6:       x in dom(f\g) and
A7:       not x in dom h;
          consider y being object such that
A8:       [x,y] in f\g by A6,XTUPLE_0:def 12;
A9:       x in dom f by A8,XTUPLE_0:def 12;
          then
A10:       x in dom(f+*h) by A2,XBOOLE_0:def 3;
A11:       not [x,y] in g by A8,XBOOLE_0:def 5;
A12:       (f+*h).x = f.x by A7,Th11;
          reconsider y as set by TARSKI:1;
          f.x = y by A8,A9,FUNCT_1:def 2;
          then [x,y] in f+*h by A12,A10,FUNCT_1:def 2;
          then [x,y] in (f+*h)\g by A11,XBOOLE_0:def 5;
          hence thesis by XTUPLE_0:def 12;
        end;
        suppose
A13:       x in dom h;
          then
A14:       not x in dom g by A1,XBOOLE_0:3;
          x in dom(f+*h) by A2,A13,XBOOLE_0:def 3;
          then
A15:       x in dom(f+*h) \ dom g by A14,XBOOLE_0:def 5;
          dom(f+*h) \ dom g c= dom((f+*h)\g) by XTUPLE_0:25;
          hence thesis by A15;
        end;
      end;
      let x be object;
      assume x in dom((f+*h)\g);
      then consider y being object such that
A16:   [x,y] in (f+*h)\g by XTUPLE_0:def 12;
       reconsider y as set by TARSKI:1;
A17:   x in dom(f+*h) by A16,XTUPLE_0:def 12;
      then
A18:   y = (f+*h).x by A16,FUNCT_1:def 2;
      per cases by A2,A17,XBOOLE_0:def 3;
      suppose that
A19:     x in dom f and
A20:     not x in dom h;
A21:     not [x,y] in g by A16,XBOOLE_0:def 5;
        (f+*h).x = f.x by A20,Th11;
        then [x,y] in f by A19,A18,FUNCT_1:def 2;
        then [x,y] in f\g by A21,XBOOLE_0:def 5;
        then x in dom(f\g) by XTUPLE_0:def 12;
        hence thesis by A3,XBOOLE_0:def 3;
      end;
      suppose x in dom h;
        hence thesis by A3,XBOOLE_0:def 3;
      end;
    end;
    now
      let x be object;
      assume
A22:   x in dom((f\g)+*h);
      per cases by A3,A22,XBOOLE_0:def 3;
      suppose that
A23:     x in dom(f\g) and
A24:     not x in dom h;
        thus ((f\g)+*h).x = (f\g).x by A24,Th11
        .= f.x by A23,GRFUNC_1:2
        .= (f+*h).x by A24,Th11
        .= ((f+*h)\g).x by A4,A22,GRFUNC_1:2;
      end;
      suppose
A25:     x in dom h;
        then
A26:     not x in dom g by A1,XBOOLE_0:3;
        x in dom(f+*h) by A25,A2,XBOOLE_0:def 3;
        then x in dom(f+*h) \ dom g by A26,XBOOLE_0:def 5;
        hence ((f+*h)\g).x = (f+*h).x by GRFUNC_1:32
        .= h.x by A25,Th13
        .= ((f\g)+*h).x by A25,Th13;
      end;
    end;
    hence thesis by A4;
  end;
