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 Th22:
  [:X,Y:] <> {} & dom f = [:X,Y:] & x in X implies 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)
proof
  assume that
A1: [:X,Y:] <> {} and
A2: dom f = [:X,Y:] and
A3: x in X;
  {x} c= X by A3,ZFMISC_1:31;
  then
A4: [:{x},Y:] /\ dom f = [:{x},Y:] by A2,ZFMISC_1:101;
  x in proj1 dom f by A1,A2,A3,Th3;
  then consider g such that
A5: (curry f).x = g and
A6: dom g = proj2 (dom f /\ [:{x},proj2 dom f:]) & for y st y in dom g
  holds g.y = f.(x,y) by Def1;
  take g;
A7: proj2 [:{x},Y:] = Y by Th3;
A8: proj2 dom f = Y by A2,A3,Th3;
  rng g c= rng f
  proof
    let z be object;
    assume z in rng g;
    then consider y being object such that
A9: y in dom g & z = g.y by FUNCT_1:def 3;
    [x,y] in dom f & z = f.(x,y) by A2,A3,A6,A8,A4,A7,A9,ZFMISC_1:87;
    hence thesis by FUNCT_1:def 3;
  end;
  hence thesis by A5,A6,A8,A4,A7;
end;
