
theorem Th30:
  for A being Subset of R^1,B being Subset of REAL? st A = B holds
  NAT /\ A = {} & A is open iff not REAL in B & B is open
proof
  let A be Subset of R^1,B be Subset of REAL?;
  consider f being Function of R^1, REAL? such that
A1: f = (id REAL)+*(NAT --> REAL) and
A2: for A being Subset of REAL? holds A is closed iff f"A is closed by Def8;
  assume
A3: A = B;
A4: NAT /\ A = {} & not REAL in B implies f"(B`) = A`
  proof
    assume that
A5: NAT /\ A = {} and
A6: not REAL in B;
A7: REAL \ A = ((((REAL\NAT)\/{REAL})\A)\{REAL}) \/ NAT
    proof
      thus REAL \ A c= ((((REAL\NAT)\/{REAL})\A)\{REAL}) \/ NAT
      proof
        let x be object;
        assume
A8:     x in REAL\A;
        then
A9:     not x in A by XBOOLE_0:def 5;
A10:    x in REAL by A8;
A11:    not x in {REAL}
        proof
          assume x in {REAL};
          then A: x = REAL by TARSKI:def 1;
          reconsider xx = x as set by TARSKI:1;
          not xx in xx;
          hence contradiction by A,A10;
        end;
        per cases;
        suppose
          x in NAT;
          hence thesis by XBOOLE_0:def 3;
        end;
        suppose
          not x in NAT;
          then x in REAL \ NAT by A8,XBOOLE_0:def 5;
          then x in (REAL\NAT) \/ {REAL} by XBOOLE_0:def 3;
          then x in ((REAL\NAT)\/{REAL})\A by A9,XBOOLE_0:def 5;
          then x in (((REAL\NAT)\/{REAL})\A)\{REAL} by A11,XBOOLE_0:def 5;
          hence thesis by XBOOLE_0:def 3;
        end;
      end;
      let x be object;
      assume
A12:  x in ((((REAL\NAT)\/{REAL})\A)\{REAL}) \/ NAT;
      per cases by A12,XBOOLE_0:def 3;
      suppose
A13:    x in NAT;
        then not x in A by A5,XBOOLE_0:def 4;
        hence thesis by A13,XBOOLE_0:def 5,NUMBERS:19;
      end;
      suppose
A14:    x in (((REAL\NAT)\/{REAL})\A)\{REAL};
        then x in ((REAL\NAT)\/{REAL})\A by XBOOLE_0:def 5;
        then
A15:    not x in A by XBOOLE_0:def 5;
        x in REAL\NAT or x in {REAL} by A14,XBOOLE_0:def 3;
        hence thesis by A14,A15,XBOOLE_0:def 5;
      end;
    end;
    B` c= the carrier of REAL?;
    then
A16: B` c= (REAL \ NAT) \/ {REAL} by Def8;
A17: B` \ {REAL} c= REAL
    proof
      let x be object;
      assume
A18:  x in B` \ {REAL};
      then x in B` by XBOOLE_0:def 5;
      then x in (REAL \ NAT) or x in {REAL} by A16,XBOOLE_0:def 3;
      hence thesis by A18,XBOOLE_0:def 5;
    end;
A19: REAL in [#](REAL?) \ B by A6,Th27,XBOOLE_0:def 5;
    {REAL} c= B`
    by A19,TARSKI:def 1;
    then ( not REAL in REAL)& B` = (B`\{REAL}) \/ {REAL} by XBOOLE_1:45;
    then ((id REAL)+*(NAT --> REAL))"(B`) = (([#](REAL?) \ B)\{REAL}) \/ NAT
    by A17,Th18
      .= ((((REAL\NAT)\/{REAL})\A)\{REAL}) \/ NAT by A3,Def8;
    hence thesis by A1,A7,TOPMETR:17;
  end;
  thus NAT /\ A = {} & A is open implies not REAL in B & B is open
  proof
    assume that
A20: NAT /\ A = {} and
A21: A is open;
    thus not REAL in B by A3,A20,Th29;
    A` is closed by A21,TOPS_1:4;
    then B` is closed by A3,A2,A4,A20,Th29;
    hence thesis by TOPS_1:4;
  end;
  assume that
A22: not REAL in B and
A23: B is open;
  thus NAT /\ A = {} by A3,A22,Th29;
  B` is closed by A23,TOPS_1:4;
  then A` is closed by A3,A2,A4,A22,Th29;
  hence thesis by TOPS_1:4;
end;
