reserve A,B for Ordinal,
  K,M,N for Cardinal,
  x,x1,x2,y,y1,y2,z,u for object,X,Y,Z,X1,X2, Y1,Y2 for set,
  f,g for Function;

theorem
  bool X,bool card X are_equipotent & card bool X = card bool card X
proof
  consider f such that
A1: f is one-to-one and
A2: dom f = X and
A3: rng f = card X by CARD_1:def 2,WELLORD2:def 4;
  deffunc g(set) = f.:$1;
  consider g such that
A4: dom g = bool X &
for x being set st x in bool X holds g.x = g(x) from FUNCT_1:sch 5;
  thus bool X,bool card X are_equipotent
  proof
    take g;
    thus g is one-to-one
    proof
      let x,y be object;
      assume that
A5:   x in dom g and
A6:   y in dom g and
A7:   g.x = g.y;
      reconsider xx=x, yy=y as set by TARSKI:1;
A8:   g.x = f.:xx & g.y = f.:yy by A4,A5,A6;
A9:   yy c= xx
      proof
        let z be object;
        assume
A10:    z in yy;
        then f.z in f.:yy by A2,A4,A6,FUNCT_1:def 6;
        then ex u being object st u in dom f & u in xx & f.z = f.u
          by A7,A8,FUNCT_1:def 6;
        hence thesis by A1,A2,A4,A6,A10;
      end;
      xx c= yy
      proof
        let z be object;
        assume
A11:    z in xx;
        then f.z in f.:xx by A2,A4,A5,FUNCT_1:def 6;
        then ex u being object st u in dom f & u in yy & f.z = f.u
     by A7,A8,FUNCT_1:def 6;
        hence thesis by A1,A2,A4,A5,A11;
      end;
      hence thesis by A9,XBOOLE_0:def 10;
    end;
    thus dom g = bool X by A4;
    thus rng g c= bool card X
    proof
      let x be object;
      assume x in rng g;
      then consider y being object such that
A12:  y in dom g and
A13:  x = g.y by FUNCT_1:def 3;
      reconsider y as set by TARSKI:1;
A14:  f.:y c= rng f by RELAT_1:111;
      g.y = f.:y by A4,A12;
      hence thesis by A3,A13,A14;
    end;
    let x be object;
     reconsider xx=x as set by TARSKI:1;
A15: f"xx c= dom f by RELAT_1:132;
    assume x in bool card X;
    then f.:(f"xx) = x by A3,FUNCT_1:77;
    then g.(f"xx) = x by A2,A4,A15;
    hence thesis by A2,A4,A15,FUNCT_1:def 3;
  end;
  hence thesis by CARD_1:5;
end;
