reserve m,n,i,i2,j for Nat,
  r,r1,r2,s,t for Real,
  x,y,z for object;
reserve p,p1,p2,p3,q,q1,q2,q3,q4 for Point of TOP-REAL n;
reserve u for Point of Euclid n;
reserve R for Subset of TOP-REAL n;
reserve P,Q for Subset of TOP-REAL n;

theorem Th64:
  for A being Subset of TOP-REAL n, a being Real st A={q:
  |.q.|=a} holds A` is open & A is closed
proof
  let A be Subset of TOP-REAL n, a be Real;
  assume
A1: A={q: |.q.|=a};
  reconsider a as Real;
A2: the TopStruct of TOP-REAL n = TopSpaceMetr(Euclid n) by EUCLID:def 8;
  then reconsider P1=A` as Subset of TopSpaceMetr(Euclid n);
  for p being Point of Euclid n st p in P1 ex r be Real st r>0 &
  Ball(p,r) c= P1
  proof
    let p be Point of Euclid n;
    reconsider q1=p as Point of TOP-REAL n by TOPREAL3:8;
    assume p in P1;
    then not p in A by XBOOLE_0:def 5;
    then
A3: |.q1.|<>a by A1;
    now
      per cases;
      case
A4:     |.q1.|<=a;
        set r1=(a- |.q1.|)/2;
        |.q1.|<a by A3,A4,XXREAL_0:1;
        then
A5:     a- |.q1.|>0 by XREAL_1:50;
        Ball(p,r1) c= P1
        proof
          let x be object;
          assume
A6:       x in Ball(p,r1);
          then reconsider p2=x as Point of Euclid n;
          reconsider q2=p2 as Point of TOP-REAL n by TOPREAL3:8;
          dist(p,p2)<r1 by A6,METRIC_1:11;
          then
A7:       |.q2-q1.|<r1 by JGRAPH_1:28;
          now
            assume q2 in A;
            then
A8:         ex q st q=q2 & |.q.|=a by A1;
            |.q2-q1.| >=|.q2.|- |.q1.| by TOPRNS_1:32;
            then r1>r1+r1 by A7,A8,XXREAL_0:2;
            then r1-r1>r1 by XREAL_1:20;
            hence contradiction by A5;
          end;
          hence thesis by XBOOLE_0:def 5;
        end;
        hence thesis by A5,XREAL_1:139;
      end;
      case
A9:     |.q1.|>a;
        set r1=(|.q1.|-a)/2;
A10:    |.q1.|-a>0 by A9,XREAL_1:50;
        Ball(p,r1) c= P1
        proof
          let x be object;
          assume
A11:      x in Ball(p,r1);
          then reconsider p2=x as Point of Euclid n;
          reconsider q2=p2 as Point of TOP-REAL n by TOPREAL3:8;
          dist(p,p2)<r1 by A11,METRIC_1:11;
          then
A12:      |.q1-q2.|<r1 by JGRAPH_1:28;
          now
            assume q2 in A;
            then
A13:        ex q st q=q2 & |.q.|=a by A1;
            |.q1-q2.| >=|.q1.|- |.q2.| by TOPRNS_1:32;
            then r1>r1+r1 by A12,A13,XXREAL_0:2;
            then r1-r1>r1 by XREAL_1:20;
            hence contradiction by A10;
          end;
          hence thesis by XBOOLE_0:def 5;
        end;
        hence thesis by A10,XREAL_1:139;
      end;
    end;
    hence thesis;
  end;
  then P1 is open by TOPMETR:15;
  hence A` is open by A2,PRE_TOPC:30;
  hence thesis by TOPS_1:3;
end;
