reserve a, b, r, s for Real;

theorem Th4:
  r < s implies lower_bound [.r,s.[ = r
proof
  set X = [.r,s.[;
  assume
A1: r < s;
A2: for a st a in X holds r <= a by XXREAL_1:3;
A3: (r+s)/2 < s by A1,XREAL_1:226;
A4: r < (r+s)/2 by A1,XREAL_1:226;
A5: for b st 0 < b ex a st a in X & a < r+b
  proof
    let b such that
A6: 0 < b and
A7: for a st a in X holds a >= r+b;
    per cases;
    suppose
      r + b > s;
      then
A8:   (r+s)/2 < r+b by A3,XXREAL_0:2;
      (r+s)/2 in X by A4,A3,XXREAL_1:3;
      hence thesis by A7,A8;
    end;
    suppose
A9:   r + b <= s;
A10:  r < r + b by A6,XREAL_1:29;
      then (r+(r+b))/2 < r+b by XREAL_1:226;
      then
A11:  (r+(r+b))/2 < s by A9,XXREAL_0:2;
      r < (r+(r+b))/2 by A10,XREAL_1:226;
      then (r+(r+b))/2 in X by A11,XXREAL_1:3;
      hence thesis by A7,A10,XREAL_1:226;
    end;
  end;
  X is non empty by A1,XXREAL_1:3;
  hence thesis by A2,A5,SEQ_4:def 2;
end;
