reserve x,y for set;
reserve s,r for Real;
reserve r1,r2 for Real;
reserve n for Nat;
reserve p,q,q1,q2 for Point of TOP-REAL 2;

theorem Th5:
  for r being Real, P being Subset of TOP-REAL 2
  st P={p where p is Point of TOP-REAL 2: p`1<=r} holds P is closed
proof
  let r be Real, P be Subset of TOP-REAL 2;
  assume
A1: P={p where p is Point of TOP-REAL 2: p`1<=r};
A2: 1 in Seg 2 by FINSEQ_1:1;
A3: P` c= {p where p is Point of TOP-REAL 2: p`1>r}
  proof
    let x be object;
    assume
A4: x in P`;
    then x in (the carrier of (TOP-REAL 2)) \ P by SUBSET_1:def 4;
    then
A5: not x in P by XBOOLE_0:def 5;
    reconsider q=x as Point of TOP-REAL 2 by A4;
    q`1>r by A1,A5;
    hence thesis;
  end;
  {p where p is Point of TOP-REAL 2: p`1>r} c= P`
  proof
    let x be object;
    assume x in {p where p is Point of TOP-REAL 2: p`1>r};
    then
A6: ex p being Point of TOP-REAL 2 st ( p=x)&( p`1>r);
    now
      assume x in {q where q is Point of TOP-REAL 2: q`1<=r};
      then ex q being Point of TOP-REAL 2 st ( q=x)&( q`1<=r);
      hence contradiction by A6;
    end;
    then x in (the carrier of TOP-REAL 2) \P by A1,A6,XBOOLE_0:def 5;
    hence thesis by SUBSET_1:def 4;
  end;
  then
A7: P`={p where p is Point of TOP-REAL 2: p`1>r} by A3;
A8: P`c= {p where p is Point of TOP-REAL 2: r<p/.1}
  proof
    let x be object;
    assume x in P`;
    then consider p being Point of TOP-REAL 2 such that
A9: p=x and
A10: p`1>r by A7;
    p/.1>r by A10,JORDAN2B:29;
    hence thesis by A9;
  end;
  {p where p is Point of TOP-REAL 2: r<p/.1} c= P`
  proof
    let x be object;
    assume x in {p where p is Point of TOP-REAL 2: r<p/.1};
    then consider q being Point of TOP-REAL 2 such that
A11: q=x and
A12: r<q/.1;
    q`1>r by A12,JORDAN2B:29;
    hence thesis by A7,A11;
  end;
  then
A13: P`={p where p is Point of TOP-REAL 2: r<p/.1} by A8;
  reconsider P1 = P` as Subset of TOP-REAL 2;
  P1 is open by A2,A13,JORDAN2B:13;
  hence thesis by TOPS_1:3;
end;
