reserve x,y,z,r,s for ExtReal;
reserve A,B for ext-real-membered set;

theorem
  A is bounded_above iff sup A <> +infty
proof
  hereby
    assume
A1: A is bounded_above;
    per cases by A1,Th57;
    suppose
      A = {};
      hence sup A <> +infty by Th39;
    end;
    suppose
      A = {-infty};
      hence sup A <> +infty by Lm1;
    end;
    suppose
      sup A in REAL;
      hence sup A <> +infty;
    end;
  end;
  assume
A2: sup A <> +infty;
  per cases by A2,XXREAL_0:14;
  suppose
A3: sup A = -infty;
    take 0;
    -infty is UpperBound of A by A3,Def3;
    hence thesis by Th71;
  end;
  suppose
    sup A in REAL;
    then reconsider r = sup A as Real;
    take r;
    thus thesis by Def3;
  end;
end;
