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
  Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent & card Funcs([:X,Y
  :],Z) = card Funcs(X,Funcs(Y,Z))
proof
  deffunc F(Function) = curry $1;
  consider f such that
A1: dom f = Funcs([:X,Y:],Z) & for g st g in Funcs([:X,Y:],Z) holds f.g
  = F(g) from LambdaFS;
A2: now
    assume
A3: [:X,Y:] <> {};
    thus Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent
    proof
      take f;
      thus f is one-to-one
      proof
        let x1,x2 be object;
        assume that
A4:     x1 in dom f and
A5:     x2 in dom f and
A6:     f.x1 = f.x2;
        consider g2 such that
A7:     x2 = g2 and
A8:     dom g2 = [:X,Y:] and
        rng g2 c= Z by A1,A5,FUNCT_2:def 2;
A9:     f.x2 = curry g2 by A1,A5,A7;
        consider g1 such that
A10:    x1 = g1 and
A11:    dom g1 = [:X,Y:] and
        rng g1 c= Z by A1,A4,FUNCT_2:def 2;
        f.x1 = curry g1 by A1,A4,A10;
        hence thesis by A6,A10,A11,A7,A8,A9,Th37;
      end;
      thus dom f = Funcs([:X,Y:],Z) by A1;
      thus rng f c= Funcs(X,Funcs(Y,Z))
      proof
        let y be object;
        assume y in rng f;
        then consider x being object such that
A12:    x in dom f and
A13:    y = f.x by FUNCT_1:def 3;
        consider g such that
A14:    x = g and
A15:    dom g = [:X,Y:] and
A16:    rng g c= Z by A1,A12,FUNCT_2:def 2;
A17:    dom curry g = X by A3,A15,Th17;
        rng curry g c= Funcs(Y,rng g) & Funcs(Y,rng g) c= Funcs(Y,Z) by A15,A16
,Th28,Th49;
        then
A18:    rng curry g c= Funcs(Y,Z);
        y = curry g by A1,A12,A13,A14;
        hence thesis by A17,A18,FUNCT_2:def 2;
      end;
      let y be object;
      assume y in Funcs(X,Funcs(Y,Z));
      then consider g such that
A19:  y = g and
A20:  dom g = X and
A21:  rng g c= Funcs(Y,Z) by FUNCT_2:def 2;
      dom uncurry g = [:X,Y:] & rng uncurry g c= Z by A20,A21,Th19,Th34;
      then
A22:  uncurry g in Funcs([:X,Y:],Z) by FUNCT_2:def 2;
      Y <> {} by A3,ZFMISC_1:90;
      then curry uncurry g = g by A21,Th41;
      then f.(uncurry g) = y by A1,A19,A22;
      hence thesis by A1,A22,FUNCT_1:def 3;
    end;
    hence card Funcs([:X,Y:],Z) = card Funcs(X,Funcs(Y,Z)) by CARD_1:5;
  end;
  now
    assume
A23: [:X,Y:] = {};
    then
A24: Funcs([:X,Y:],Z) = {{}} by Th50;
A25: now
      assume Y = {};
      then Funcs(Y,Z) = {{}} by Th50;
      then Funcs(X,Funcs(Y,Z)) = {X --> {}} by Th52;
      hence Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent by A24,
CARD_1:28;
    end;
    X = {} or Y = {} by A23;
    hence Funcs([:X,Y:],Z),Funcs(X,Funcs(Y,Z)) are_equipotent by A24,A25,Th50;
    X = {} implies Funcs(X,Funcs(Y,Z)) = {{}} by Th50;
    hence card Funcs([:X,Y:],Z) = card Funcs(X,Funcs(Y,Z)) by A23,A25,Th50,
CARD_1:5;
  end;
  hence thesis by A2;
end;
