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
  x <> y implies Funcs(X,{x,y}),bool X are_equipotent & card Funcs(X,{x,
  y}) = card bool X
proof
  deffunc F(Function) = $1"{x};
  consider f such that
A1: dom f = Funcs(X,{x,y}) & for g st g in Funcs(X,{x,y}) holds f.g = F(
  g) from LambdaFS;
  assume
A2: x <> y;
  thus Funcs(X,{x,y}),bool X are_equipotent
  proof
    deffunc F(object) = x;
    take f;
    thus f is one-to-one
    proof
      let x1,x2 be object;
      assume that
A3:   x1 in dom f and
A4:   x2 in dom f and
A5:   f.x1 = f.x2;
      consider g2 being Function such that
A6:   x2 = g2 and
A7:   dom g2 = X and
A8:   rng g2 c= {x,y} by A1,A4,FUNCT_2:def 2;
A9:   f.x2 = g2"{x} by A1,A4,A6;
      consider g1 being Function such that
A10:  x1 = g1 and
A11:  dom g1 = X and
A12:  rng g1 c= {x,y} by A1,A3,FUNCT_2:def 2;
A13:  f.x1 = g1"{x} by A1,A3,A10;
      now
        let z be object such that
A14:    z in X;
A15:    now
          assume
A16:      not g1.z in {x};
          then
A17:      g1.z <> x by TARSKI:def 1;
          not z in g2"{x} by A5,A13,A9,A16,FUNCT_1:def 7;
          then not g2.z in {x} by A7,A14,FUNCT_1:def 7;
          then
A18:      g2.z <> x by TARSKI:def 1;
          g1.z in rng g1 by A11,A14,FUNCT_1:def 3;
          then
A19:      g1.z = y by A12,A17,TARSKI:def 2;
          g2.z in rng g2 by A7,A14,FUNCT_1:def 3;
          hence g1.z = g2.z by A8,A18,A19,TARSKI:def 2;
        end;
        now
          assume
A20:      g1.z in {x};
          then z in g2"{x} by A5,A11,A13,A9,A14,FUNCT_1:def 7;
          then g2.z in {x} by FUNCT_1:def 7;
          then g2.z = x by TARSKI:def 1;
          hence g1.z = g2.z by A20,TARSKI:def 1;
        end;
        hence g1.z = g2.z by A15;
      end;
      hence thesis by A10,A11,A6,A7,FUNCT_1:2;
    end;
    thus dom f = Funcs(X,{x,y}) by A1;
    thus rng f c= bool X
    proof
      let z be object;
      assume z in rng f;
      then consider t being object such that
A21:  t in dom f and
A22:  z = f.t by FUNCT_1:def 3;
      consider g such that
A23:  t = g and
A24:  dom g = X and
      rng g c= {x,y} by A1,A21,FUNCT_2:def 2;
A25:  g"{x} c= X by A24,RELAT_1:132;
      z = g"{x} by A1,A21,A22,A23;
      hence thesis by A25;
    end;
    deffunc G(object) = y;
    let z be object;
    reconsider zz=z as set by TARSKI:1;
    defpred P[object] means $1 in zz;
    consider g such that
A26: dom g = X &
for t being object st t in X holds (P[t] implies g.t = F(t)) & (
    not P[t] implies g.t = G(t)) from PARTFUN1:sch 1;
    assume
A27: z in bool X;
A28: g"{x} = zz
    proof
      thus g"{x} c= zz
      proof
        let t be object;
        assume
A29:    t in g"{x};
        then g.t in {x} by FUNCT_1:def 7;
        then
A30:    g.t = x by TARSKI:def 1;
        t in dom g by A29,FUNCT_1:def 7;
        hence thesis by A2,A26,A30;
      end;
      let t be object;
      assume
A31:  t in zz;
      then g.t = x by A27,A26;
      then g.t in {x} by TARSKI:def 1;
      hence thesis by A27,A26,A31,FUNCT_1:def 7;
    end;
    rng g c= {x,y}
    proof
      let t be object;
      assume t in rng g;
      then ex v being object st v in dom g & t = g.v by FUNCT_1:def 3;
      then t = x or t = y by A26;
      hence thesis by TARSKI:def 2;
    end;
    then
A32: g in Funcs(X,{x,y}) by A26,FUNCT_2:def 2;
    then f.g = g"{x} by A1;
    hence thesis by A1,A32,A28,FUNCT_1:def 3;
  end;
  hence thesis by CARD_1:5;
end;
