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 Th43:
  dom f c= [:X,Y:] implies uncurry curry f = f & uncurry' curry' f = f
proof
  assume
A1: dom f c= [:X,Y:];
A2: now
    let X,Y,f such that
A3: dom f c= [:X,Y:];
A4: dom uncurry curry f = dom f
    proof
      thus dom uncurry curry f c= dom f
      proof
        let x be object;
        assume x in dom uncurry curry f;
        then
        ex y,g,z st x = [y,z] & y in dom curry f & g = (curry f).y & z in
        dom g by Def2;
        hence thesis by Th24;
      end;
      let x be object;
      assume
A5:   x in dom f;
      then
A6:   x = [x`1,x`2] by A3,MCART_1:21;
      then x`1 in dom curry f by A5,Th12;
      then reconsider g = (curry f).x`1 as Function by FUNCOP_1:def 6;
      x`2 in dom g & x`1 in dom curry f by A5,A6,Th12,Th13;
      hence thesis by A6,Th31;
    end;
    now
      let x be object;
      assume
A7:   x in dom f;
      then
A8:   x = [x`1,x`2] by A3,MCART_1:21;
      then x`1 in dom curry f by A7,Th12;
      then reconsider g = (curry f).x`1 as Function by FUNCOP_1:def 6;
      (uncurry curry f).x = g.x`2 by A4,A7,Def2;
      then f.(x`1,x`2) = (uncurry curry f).(x`1,x`2) by A7,A8,Th13;
      hence f.x = (uncurry curry f).x by A8;
    end;
    hence uncurry curry f = f by A4;
  end;
  hence uncurry curry f = f by A1;
  dom ~f c= [:Y,X:] by A1,FUNCT_4:45;
  then uncurry curry ~f = ~f by A2;
  hence thesis by A1,FUNCT_4:52;
end;
