let n be Element of NAT ; :: thesis: for A being Subset of (TOP-REAL n)
for a being real number st A = { q where q is Point of (TOP-REAL n) : |.q.| = a } holds
( A ` is open & A is closed )

let A be Subset of (TOP-REAL n); :: thesis: for a being real number st A = { q where q is Point of (TOP-REAL n) : |.q.| = a } holds
( A ` is open & A is closed )

let a be real number ; :: thesis: ( A = { q where q is Point of (TOP-REAL n) : |.q.| = a } implies ( A ` is open & A is closed ) )
assume A1: A = { q where q is Point of (TOP-REAL n) : |.q.| = a } ; :: thesis: ( A ` is open & A is closed )
reconsider a = a as Real by XREAL_0:def 1;
V: TopStruct(# the carrier of (TOP-REAL n),the topology of (TOP-REAL n) #) = TopSpaceMetr (Euclid n) by EUCLID:def 8;
then reconsider P1 = A ` as Subset of (TopSpaceMetr (Euclid n)) by XX, YY;
for p being Point of (Euclid n) st p in P1 holds
ex r being real number st
( r > 0 & Ball p,r c= P1 )
proof
let p be Point of (Euclid n); :: thesis: ( p in P1 implies ex r being real number st
( r > 0 & Ball p,r c= P1 ) )

assume p in P1 ; :: thesis: ex r being real number st
( r > 0 & Ball p,r c= P1 )

then A2: not p in A by XBOOLE_0:def 5;
reconsider q1 = p as Point of (TOP-REAL n) by TOPREAL3:13;
A3: |.q1.| <> a by A1, A2;
now
per cases ( |.q1.| <= a or |.q1.| > a ) ;
case |.q1.| <= a ; :: thesis: ex r being real number st
( r > 0 & Ball p,r c= P1 )

then A4: |.q1.| < a by A3, XXREAL_0:1;
set r1 = (a - |.q1.|) / 2;
A5: a - |.q1.| > 0 by A4, XREAL_1:52;
then A6: (a - |.q1.|) / 2 > 0 by XREAL_1:141;
Ball p,((a - |.q1.|) / 2) c= P1
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in Ball p,((a - |.q1.|) / 2) or x in P1 )
assume A7: x in Ball p,((a - |.q1.|) / 2) ; :: thesis: x in P1
then reconsider p2 = x as Point of (Euclid n) ;
reconsider q2 = p2 as Point of (TOP-REAL n) by TOPREAL3:13;
dist p,p2 < (a - |.q1.|) / 2 by A7, METRIC_1:12;
then A8: |.(q2 - q1).| < (a - |.q1.|) / 2 by JGRAPH_1:45;
now
assume q2 in A ; :: thesis: contradiction
then consider q being Point of (TOP-REAL n) such that
A9: ( q = q2 & |.q.| = a ) by A1;
|.(q2 - q1).| >= |.q2.| - |.q1.| by TOPRNS_1:33;
then (a - |.q1.|) / 2 > ((a - |.q1.|) / 2) + ((a - |.q1.|) / 2) by A8, A9, XXREAL_0:2;
then ((a - |.q1.|) / 2) - ((a - |.q1.|) / 2) > (a - |.q1.|) / 2 by XREAL_1:22;
hence contradiction by A5; :: thesis: verum
end;
hence x in P1 by XBOOLE_0:def 5; :: thesis: verum
end;
hence ex r being real number st
( r > 0 & Ball p,r c= P1 ) by A6; :: thesis: verum
end;
case A10: |.q1.| > a ; :: thesis: ex r being real number st
( r > 0 & Ball p,r c= P1 )

set r1 = (|.q1.| - a) / 2;
A11: |.q1.| - a > 0 by A10, XREAL_1:52;
then A12: (|.q1.| - a) / 2 > 0 by XREAL_1:141;
Ball p,((|.q1.| - a) / 2) c= P1
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in Ball p,((|.q1.| - a) / 2) or x in P1 )
assume A13: x in Ball p,((|.q1.| - a) / 2) ; :: thesis: x in P1
then reconsider p2 = x as Point of (Euclid n) ;
reconsider q2 = p2 as Point of (TOP-REAL n) by TOPREAL3:13;
dist p,p2 < (|.q1.| - a) / 2 by A13, METRIC_1:12;
then A14: |.(q1 - q2).| < (|.q1.| - a) / 2 by JGRAPH_1:45;
now
assume q2 in A ; :: thesis: contradiction
then consider q being Point of (TOP-REAL n) such that
A15: ( q = q2 & |.q.| = a ) by A1;
|.(q1 - q2).| >= |.q1.| - |.q2.| by TOPRNS_1:33;
then (|.q1.| - a) / 2 > ((|.q1.| - a) / 2) + ((|.q1.| - a) / 2) by A14, A15, XXREAL_0:2;
then ((|.q1.| - a) / 2) - ((|.q1.| - a) / 2) > (|.q1.| - a) / 2 by XREAL_1:22;
hence contradiction by A11; :: thesis: verum
end;
hence x in P1 by XBOOLE_0:def 5; :: thesis: verum
end;
hence ex r being real number st
( r > 0 & Ball p,r c= P1 ) by A12; :: thesis: verum
end;
end;
end;
hence ex r being real number st
( r > 0 & Ball p,r c= P1 ) ; :: thesis: verum
end;
then P1 is open by TOPMETR:22;
hence A ` is open by V, PRE_TOPC:60; :: thesis: A is closed
hence A is closed by TOPS_1:29; :: thesis: verum