reserve n   for Nat,
        r,s for Real,
        x,y for Element of REAL n,
        p,q for Point of TOP-REAL n,
        e   for Point of Euclid n;

theorem Th15:
  RAT n is dense Subset of TOP-REAL n
  proof
    RAT n is Subset of REAL n by NUMBERS:12,Th5;
    then reconsider RATN = RAT n as Subset of TOP-REAL n by EUCLID:22;
    for Q be Subset of TOP-REAL n st Q <> {} & Q is open holds RATN meets Q
    proof
      let Q be Subset of TOP-REAL n;
      assume that
A1:   Q <> {} and
A2:   Q is open;
      consider q be object such that
A3:   q in Q by A1,XBOOLE_0:def 1;
      the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
      then reconsider Q0=Q as Subset of TopSpaceMetr Euclid n;
      reconsider q0 = q as Point of Euclid n by A3,EUCLID:67;
      Q0 is open by A2,Th10;
      then consider m being non zero Element of NAT such that
A6:   OpenHypercube(q0,1/m) c= Q0 by A3,EUCLID_9:23;
      set OH = OpenHypercube(q0,1/m), f = Intervals(q0,1/m);
A7:   dom f = dom q0 by EUCLID_9:def 3;
A8:   for x be object st x in dom f holds ex k be Element of RAT st k in f.x
      proof
        let x be object;
        assume
A9:     x in dom f;
        reconsider FF = ].q0.x - (1/m),q0.x + (1/m).[ as open Subset of R^1
           by BORSUK_5:39;
A10:    q0.x - (1/m) < q0.x by XREAL_1:44;
        q0.x < q0.x + (1/m) by XREAL_1:29;
        then q0.x - (1/m) < q0.x + (1/m) by A10,XXREAL_0:2;
        then FF <> {} & FF is open by XXREAL_1:33;
        then FF meets RAT by TOPGEN_1:51,TOPS_1:45;
        then consider k be object such that
A11:    k in FF & k in RAT by XBOOLE_0:3;
        take k;
        thus thesis by A11,A9,A7,EUCLID_9:def 3;
      end;
      q in TOP-REAL n by A3;
      then q in REAL n by EUCLID:22;
      then reconsider q1 = q as FinSequence of REAL by FINSEQ_2:131;
A12:  dom q1 = Seg n by A3,FINSEQ_1:89;
      defpred P[object,object] means $2 in f.$1 & $2 is Element of RAT;
A13:  for x be Nat st x in Seg n ex y be object st P[x,y]
      proof
        let x be Nat;
        assume x in Seg n;
        then consider k be Element of RAT such that
A14:    k in f.x by A8,A7,A12;
        take k;
        thus thesis by A14;
      end;
      consider p be FinSequence such that
A15:  dom p = Seg n and
A16:  for k be Nat st k in Seg n holds P[k,p.k] from FINSEQ_1:sch 1(A13);
A17:  p is n-element
      proof
        Seg len p = dom p by FINSEQ_1:def 3;
        hence thesis by A15,FINSEQ_1:6,CARD_1:def 7;
      end;
      p is Tuple of n,RAT
      proof
        p is FinSequence of RAT
        proof
          rng p c= RAT
          proof
            let x be object;
            assume x in rng p;
            then consider x0 be object such that
A18:        x0 in dom p and
A19:        x = p.x0 by FUNCT_1:def 3;
            p.x0 in f.x0 & p.x0 is Element of RAT by A16,A18,A15;
            hence x in RAT by A19;
          end;
          hence thesis by FINSEQ_1:def 4;
        end;
        hence thesis by A17;
      end;
      then
A20:  p in RAT n by FINSEQ_2:131;
      p in OH
      proof
        p in product Intervals(q0,1/m)
        proof
          now
            let x be object;
            assume x in dom f;
            then x in Seg n by A7,FINSEQ_1:89;
            hence p.x in f.x by A16;
          end;
          hence thesis by A15,A7,A12,CARD_3:9;
        end;
        hence thesis;
      end;
      hence thesis by A6,A20,XBOOLE_0:3;
    end;
    hence thesis by TOPS_1:45;
  end;
