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 Th37:
  dom f1 = [:X,Y:] & dom f2 = [:X,Y:] & curry f1 = curry f2 implies f1 = f2
proof
  assume that
A1: dom f1 = [:X,Y:] and
A2: dom f2 = [:X,Y:] and
A3: curry f1 = curry f2;
A4: now
    assume [:X,Y:] <> {};
    now
      let z be object;
      assume
A5:   z in [:X,Y:];
      then consider g1 being Function such that
A6:   (curry f1).z`1 = g1 and
      dom g1 = Y and
      rng g1 c= rng f1 and
A7:   for y st y in Y holds g1.y = f1.(z`1,y) by A1,Th22,MCART_1:10;
A8:   z = [z`1,z`2] by A5,MCART_1:21;
A9:   z`2 in Y by A5,MCART_1:10;
      then
A10:  f1.(z`1,z`2) = g1.z`2 by A7;
      ex g2 being Function st (curry f2).z`1 = g2 & dom g2 = Y & rng g2 c=
rng f2 & for y st y in Y holds g2.y = f2.(z`1,y) by A2,A5,Th22,MCART_1:10;
      then f2.(z`1,z`2) = g1.z`2 by A3,A9,A6;
      hence f1.z = f2.z by A8,A10;
    end;
    hence thesis by A1,A2;
  end;
  [:X,Y:] = {} implies f1 = {} & f2 = {} by A1,A2;
  hence thesis by A4;
end;
