reserve x for set;
reserve a,b,c,d for ExtReal;

theorem
  a <= c & b <= c & (for d st a <= d & b <= d holds c <= d) implies c =
  max(a,b)
proof
  assume that
A1: a <= c & b <= c and
A2: for d st a <= d & b <= d holds c <= d;
  a <= max(a,b) & b <= max(a,b) by Th25;
  then
A3: c <= max(a,b) by A2;
  max(a,b) <= c by A1,Def9;
  hence thesis by A3,Th1;
end;
