theorem
  X is compact & (for g1,g2 st g1 in X & g2 in X holds [.g1,g2.] c= X)
  implies ex p,g st X = [.p,g.]
proof
  assume that
A1: X is compact and
A2: for g1,g2 st g1 in X & g2 in X holds [.g1,g2.] c= X;
  per cases;
  suppose
A3: X={};
    take 1;
    take 0;
    thus thesis by A3,XXREAL_1:29;
  end;
  suppose
A4: X<>{};
    take p=lower_bound X, g=upper_bound X;
A5: X is real-bounded closed by A1,Th10;
    now
      let r be Element of REAL;
      assume r in X;
      then r<=g & p<=r by A5,SEQ_4:def 1,def 2;
      hence r in [.p,g.];
    end;
    then
A6: X c= [.p,g.];
    upper_bound X in X & lower_bound X in X by A4,A5,Th12,Th13;
    then [.p,g.] c= X by A2;
    hence thesis by A6;
  end;
end;
