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 Th44:
  rng f c= PFuncs(X,Y) & not {} in rng f implies curry uncurry f =
  f & curry' uncurry' f = f
proof
  assume that
A1: rng f c= PFuncs(X,Y) and
A2: not {} in rng f;
A3: dom curry uncurry f = dom f
  proof
    dom uncurry f c= [:dom f,X:] by A1,Th30;
    hence dom curry uncurry f c= dom f by Th18;
    let x be object;
    assume
A4: x in dom f;
    then f.x in rng f by FUNCT_1:def 3;
    then consider g such that
A5: f.x = g and
    dom g c= X and
    rng g c= Y by A1,PARTFUN1:def 3;
    set y = the Element of dom g;
    g <> {} by A2,A4,A5,FUNCT_1:def 3;
    then
A6: [x,y] in dom uncurry f by A4,A5,Th31;
    dom curry uncurry f = proj1 dom uncurry f by Def1;
    hence thesis by A6,XTUPLE_0:def 12;
  end;
  now
    let x be object;
    assume
A7: x in dom f;
    then reconsider h = (curry uncurry f).x as Function by A3,Th23;
    f.x in rng f by A7,FUNCT_1:def 3;
    then consider g such that
A8: f.x = g and
    dom g c= X and
    rng g c= Y by A1,PARTFUN1:def 3;
A9: dom h = proj2 (dom uncurry f /\ [:{x},proj2 dom uncurry f:]) by A3,A7,Th24;
A10: dom h = dom g
    proof
      thus dom h c= dom g
      proof
        let z be object;
        assume z in dom h;
        then consider t being object such that
A11:    [t,z] in dom uncurry f /\ [:{x},proj2 dom uncurry f:] by A9,
XTUPLE_0:def 13;
        [t,z] in [:{x},proj2 dom uncurry f:] by A11,XBOOLE_0:def 4;
        then
A12:    t = x by ZFMISC_1:105;
        [t,z] in dom uncurry f by A11,XBOOLE_0:def 4;
        then consider x1,g1,x2 such that
A13:    [t,z] = [x1,x2] and
        x1 in dom f and
A14:    g1 = f.x1 & x2 in dom g1 by Def2;
        t = x1 by A13,XTUPLE_0:1;
        hence thesis by A8,A13,A14,A12,XTUPLE_0:1;
      end;
      let y be object;
      assume y in dom g;
      then [x,y] in dom uncurry f by A7,A8,Th31;
      hence thesis by Th13;
    end;
    now
      let y be object;
      assume
A15:  y in dom h;
      hence h.y = (uncurry f).(x,y) by A3,A7,Th24
        .= g.y by A7,A8,A10,A15,Th31;
    end;
    hence f.x = (curry uncurry f).x by A8,A10,FUNCT_1:2;
  end;
  hence
A16: curry uncurry f = f by A3;
  dom uncurry f c= [:dom f,X:] by A1,Th30;
  hence thesis by A16,FUNCT_4:52;
end;
