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 Th19:
  rng f c= Funcs(X,Y) implies dom uncurry f = [:dom f,X:] & dom
  uncurry' f = [:X,dom f:]
proof
  defpred P[object] means
   ex x,g,y st $1 = [x,y] & x in dom f & g = f.x & y in dom g;
  assume
A1: rng f c= Funcs(X,Y);
A2: for t being object holds t in [:dom f,X:] iff P[t]
  proof let t be object;
    thus t in [:dom f,X:] implies ex x,g,y st t = [x,y] & x in dom f & g = f.x
    & y in dom g
    proof
      assume
A3:   t in [:dom f,X:];
      then t`1 in dom f by MCART_1:10;
      then f.t`1 in rng f by FUNCT_1:def 3;
      then consider g such that
A4:   f.t`1 = g & dom g = X and
      rng g c= Y by A1,FUNCT_2:def 2;
      take t`1, g, t`2;
      thus thesis by A3,A4,MCART_1:10,21;
    end;
    given x,g,y such that
A5: t = [x,y] and
A6: x in dom f and
A7: g = f.x and
A8: y in dom g;
    g in rng f by A6,A7,FUNCT_1:def 3;
    then ex g1 st g = g1 & dom g1 = X & rng g1 c= Y by A1,FUNCT_2:def 2;
    hence thesis by A5,A6,A8,ZFMISC_1:87;
  end;
A9: for t being object holds t in dom uncurry f iff P[t] by Def2;
  thus dom uncurry f = [:dom f,X:] from XBOOLE_0:sch 2(A9,A2);
  hence thesis by FUNCT_4:46;
end;
