
theorem Th28:
  for X be set for x be Element of BoolePoset X holds x is finite
  iff x is compact
proof
  let X be set;
  let x be Element of BoolePoset X;
  per cases;
  suppose
A1: x is empty;
    then x = Bottom BoolePoset X by YELLOW_1:18;
    hence thesis by A1,WAYBEL_3:15;
  end;
  suppose
A2: x is non empty;
    thus x is finite implies x is compact
    proof
      assume
A3:   x is finite;
      now
        defpred P[object,object] means ex A being set st A = $2 & $1 in A;
        let Y be Subset-Family of X;
        assume
A4:     x c= union Y;
A5:     for e be object st e in x ex u be object st u in Y & P[e,u]
        proof
          let e be object;
          assume e in x;
          then ex u be set st e in u & u in Y by A4,TARSKI:def 4;
          hence thesis;
        end;
        consider f be Function such that
A6:     dom f = x and
A7:     rng f c= Y and
A8:     for e be object st e in x holds P[e,f.e] from FUNCT_1:sch 6(A5);
        reconsider Z = rng f as Subset of Y by A7;
        reconsider Z as finite Subset of Y by A3,A6,FINSET_1:8;
        take Z;
        now
          let z be object;
          assume
A9:         z in x;
          then P[z,f.z] by A8;
          then z in f.z & f.z in Z by A6,FUNCT_1:def 3,A9;
          hence z in union Z by TARSKI:def 4;
        end;
        hence x c= union Z;
      end;
      then x << x by Th27;
      hence thesis by WAYBEL_3:def 2;
    end;
    thus x is compact implies x is finite
    proof
      reconsider x9 = x as non empty set by A2;
      set Y = the set of all  {y} where y is Element of x9 ;
      Y c= bool X
      proof
        let t be object;
         reconsider tt=t as set by TARSKI:1;
        assume t in Y;
        then
A10:     ex y9 be Element of x9 st t = {y9};
        for k being object st k in tt holds k in X by A10,Th26,TARSKI:def 3;
        then tt c= X;
        hence thesis;
      end;
      then reconsider Y as Subset-Family of X;
      now
        let y be object;
        assume y in x;
        then
A11:    {y} in Y;
        y in {y} by TARSKI:def 1;
        hence y in union Y by A11,TARSKI:def 4;
      end;
      then
A12:  x c= union Y;
      assume x is compact;
      then x << x by WAYBEL_3:def 2;
      then consider Z be finite Subset of Y such that
A13:  x c= union Z by A12,Th27;
      now
        let k be set;
        assume k in Z;
        then k in Y;
        then ex y9 be Element of x9 st k = {y9};
        hence k is finite;
      end;
      then union Z is finite by FINSET_1:7;
      hence thesis by A13;
    end;
  end;
end;
