reserve X,Y,Z,X1,X2,Y1,Y2 for set, x,y,z,t,x1,x2 for object,
  f,g,h,f1,f2,g1,g2 for Function;

theorem Th39:
  rng f1 c= Funcs(X,Y) & rng f2 c= Funcs(X,Y) & X <> {} & uncurry
  f1 = uncurry f2 implies f1 = f2
proof
  assume that
A1: rng f1 c= Funcs(X,Y) and
A2: rng f2 c= Funcs(X,Y) and
A3: X <> {} and
A4: uncurry f1 = uncurry f2;
A5: dom uncurry f1 = [:dom f1,X:] & dom uncurry f2 = [:dom f2,X:] by A1,A2,Th19
;
  then dom f1 = {} implies dom f1 = dom f2 by A3,A4;
  then
A6: dom f1 = dom f2 by A3,A4,A5,ZFMISC_1:110;
  now
    let x be object;
    assume
A7: x in dom f1;
    then f1.x in rng f1 by FUNCT_1:def 3;
    then consider g1 such that
A8: f1.x = g1 and
A9: dom g1 = X and
    rng g1 c= Y by A1,FUNCT_2:def 2;
    f2.x in rng f2 by A6,A7,FUNCT_1:def 3;
    then consider g2 such that
A10: f2.x = g2 and
A11: dom g2 = X and
    rng g2 c= Y by A2,FUNCT_2:def 2;
    now
      let y be object;
A12:  [x,y]`1 = x & [x,y]`2 = y;
      assume
A13:  y in X;
      then
A14:  [x,y] in dom uncurry f2 by A4,A7,A8,A9,Def2;
      [x,y] in dom uncurry f1 by A7,A8,A9,A13,Def2;
      then (uncurry f1).[x,y] = g1.y by A8,A12,Def2;
      hence g1.y = g2.y by A4,A10,A14,A12,Def2;
    end;
    hence f1.x = f2.x by A8,A9,A10,A11,FUNCT_1:2;
  end;
  hence thesis by A6;
end;
