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 Th28:
  dom f = [:X,Y:] implies rng curry f c= Funcs(Y,rng f) & rng
  curry' f c= Funcs(X,rng f)
proof
  assume
A1: dom f = [:X,Y:];
A2: now
    assume
A3: [:X,Y:] <> {};
    then
A4: dom curry f = X by A1,Th17;
    thus rng curry f c= Funcs(Y,rng f)
    proof
      let z be object;
      assume z in rng curry f;
      then consider x being object such that
A5:   x in dom curry f and
A6:   z = (curry f).x by FUNCT_1:def 3;
      ex g st (curry f).x = g & dom g = Y & rng g c= rng f & for y st y
      in Y holds g.y = f.(x,y) by A1,A3,A4,A5,Th22;
      hence thesis by A6,FUNCT_2:def 2;
    end;
A7: dom curry' f = Y by A1,A3,Th17;
    thus rng curry' f c= Funcs(X,rng f)
    proof
      let z be object;
      assume z in rng curry' f;
      then consider y being object such that
A8:   y in dom curry' f and
A9:   z = (curry' f).y by FUNCT_1:def 3;
      ex g st (curry' f).y = g & dom g = X & rng g c= rng f & for x st x
      in X holds g.x = f.(x,y) by A1,A3,A7,A8,Th25;
      hence thesis by A9,FUNCT_2:def 2;
    end;
  end;
  now
    assume
A10: dom f = {};
    then X = {} or Y = {} by A1;
    then
A11: [:Y,X:] = {} by ZFMISC_1:90;
    {} = dom curry f by A10,Def1,Th2;
    then
A12: rng curry f = {} by RELAT_1:42;
    dom ~f = [:Y,X:] & dom curry ~f = proj1 dom ~f by A1,Def1,FUNCT_4:46;
    then rng curry' f = {} by A11,Th2,RELAT_1:42;
    hence thesis by A12;
  end;
  hence thesis by A1,A2;
end;
