theorem
  for A,B being non empty bounded_above Subset of REAL holds upper_bound(A
  \/ B) = max(upper_bound A,upper_bound B)
proof
  let A,B be non empty bounded_above Subset of REAL;
  set r = max(upper_bound A,upper_bound B);
A1: r >= upper_bound B by XXREAL_0:25;
A2: for r1 being Real st for t being Real st t in A \/ B holds
  t <= r1 holds r <= r1
  proof
    let r1 be Real;
    assume
A3: for t being Real st t in A \/ B holds t <= r1;
    now
      let t be Real;
      assume t in B;
      then t in A \/ B by XBOOLE_0:def 3;
      hence t <= r1 by A3;
    end;
    then
A4: upper_bound B <= r1 by Th45;
    now
      let t be Real;
      assume t in A;
      then t in A \/ B by XBOOLE_0:def 3;
      hence t <= r1 by A3;
    end;
    then upper_bound A <= r1 by Th45;
    hence thesis by A4,XXREAL_0:28;
  end;
A5: r >= upper_bound A by XXREAL_0:25;
  for t being Real st t in A \/ B holds t <= r
  proof
    let t be Real;
    assume t in A \/ B;
    then t in A or t in B by XBOOLE_0:def 3;
    then upper_bound A >= t or upper_bound B >= t by Def1;
    hence thesis by A5,A1,XXREAL_0:2;
  end;
  hence thesis by A2,Th46;
end;
