reserve x1, x2, x3, x4, x5, x6, x7 for set;

theorem
  for A being Subset of R^1 st A = RAT (2,4) \/ ]. 4, 5 .[ \/ ]. 5,
  +infty .[ holds A` = ]. -infty,2 .] \/ IRRAT(2,4) \/ {4} \/ {5}
proof
A1: ]. -infty,2.] \/ IRRAT (2, 4) c= ]. -infty,4.]
  proof
    let x be object;
    assume
A2: x in ]. -infty,2.] \/ IRRAT (2, 4);
    then reconsider x as Real;
    per cases by A2,XBOOLE_0:def 3;
    suppose
      x in ]. -infty,2.];
      then x <= 2 by XXREAL_1:234;
      then x <= 4 by XXREAL_0:2;
      hence thesis by XXREAL_1:234;
    end;
    suppose
      x in IRRAT (2, 4);
      then x < 4 by Th29;
      hence thesis by XXREAL_1:234;
    end;
  end;
  let A be Subset of R^1;
A3: ]. 4, 5 .[ \/ ]. 5,+infty .[ c= ]. 4,+infty .[
  proof
    let x be object;
    assume
A4: x in ]. 4, 5 .[ \/ ]. 5,+infty .[;
    then reconsider x as Real;
    per cases by A4,XBOOLE_0:def 3;
    suppose
      x in ]. 4, 5 .[;
      then x > 4 by XXREAL_1:4;
      hence thesis by XXREAL_1:235;
    end;
    suppose
      x in ]. 5,+infty .[;
      then x > 5 by XXREAL_1:235;
      then x > 4 by XXREAL_0:2;
      hence thesis by XXREAL_1:235;
    end;
  end;
  assume A = RAT (2,4) \/ ]. 4, 5 .[ \/ ]. 5,+infty .[;
  then
A5: A` = REAL \ (RAT (2,4) \/ (]. 4, 5 .[ \/ ]. 5,+infty .[)) by TOPMETR:17
,XBOOLE_1:4
    .= REAL \ RAT (2,4) \ (]. 4, 5 .[ \/ ]. 5,+infty .[) by XBOOLE_1:41
    .= (]. -infty,2.] \/ IRRAT (2, 4) \/ [.4,+infty .[) \ (]. 4, 5 .[ \/ ].
  5,+infty .[) by Th57;
  ]. -infty,4.] misses ]. 4,+infty .[ by XXREAL_1:91;
  then
  A` = ([.4,+infty .[ \ (]. 4, 5 .[ \/ ]. 5,+infty .[)) \/ (]. -infty,2.]
  \/ IRRAT (2, 4)) by A5,A1,A3,XBOOLE_1:64,87
    .= (]. -infty,2.] \/ IRRAT (2, 4)) \/ ({4} \/ {5}) by Th58
    .= ]. -infty,2 .] \/ IRRAT(2,4) \/ {4} \/ {5} by XBOOLE_1:4;
  hence thesis;
end;
