reserve
  x, y for object,
  i, n for Nat,
  r, s for Real,
  f1, f2 for n-element real-valued FinSequence;
reserve e, e1 for Point of Euclid n;

theorem Th26:
  n <> 0 implies for PP being Subset-Family of TopSpaceMetr Euclid n st
  PP = product_prebasis (Seg n --> R^1) holds PP is quasi_prebasis
  proof
    assume
A1: n <> 0;
    set E = Euclid n;
    set T = TopSpaceMetr E;
    let PP be Subset-Family of T;
    set J = Seg n --> R^1;
    set C = Carrier J;
    set S = Seg n;
    reconsider S as non empty finite set by A1;
    assume
A2: PP = product_prebasis (Seg n --> R^1);
A3: REAL n = Funcs(Seg n,REAL) by FINSEQ_2:93;
A4: dom C = Seg n by PARTFUN1:def 2;
A5: Funcs(Seg n,REAL) = product C by Th25;
    defpred P[set,object] means ex e being Point of E st e = $1 &
    $2 = OpenHypercubes(e);
A6: for i being Element of T ex j being object st P[i,j]
    proof
      let i be Element of T;
      reconsider j = i as Point of E;
      take OpenHypercubes(j),j;
      thus thesis;
    end;
    consider NS being ManySortedSet of T such that
A7: for x being Point of T holds P[x,NS.x] from PBOOLE:sch 6(A6);
     now
       let x be Point of T;
       reconsider y = x as Point of E;
       P[y,NS.y] by A7;
       hence NS.x is Basis of x;
     end;
     then reconsider NS as Neighborhood_System of T by TOPGEN_2:def 3;
     take B = Union NS;
     let b be object;
            reconsider bb=b as set by TARSKI:1;
     assume b in B;
     then consider Z being set such that
A8:  b in Z and
A9:  Z in rng NS by TARSKI:def 4;
     consider x being object such that
A10:  x in dom NS and
A11:  NS.x = Z by A9,FUNCT_1:def 3;
     reconsider x as Point of E by A10;
A12: dom x = Seg n by FINSEQ_1:89;
     P[x,NS.x] by A7;
     then consider m being non zero Element of NAT such that
A13:  b = OpenHypercube(x,1/m) by A8,A11;
     deffunc A(object) = product(C+*($1,R^1(].x .$1-1/m,x .$1+1/m.[)));
     defpred R[set] means not contradiction;
     set Y = {A(q) where q is Element of S : R[q]};
A14: Y is finite from PRE_CIRC:sch 1;
     Y c= bool the carrier of T
     proof
       let s be object;
       assume s in Y;
       then consider q being Element of S such that
A15:    s = A(q);
       A(q) c= the carrier of T
       proof
         let z be object;
         set f = C+*(q,R^1(].x .q-1/m,x .q+1/m.[));
         assume z in A(q);
         then consider g being Function such that
A16:      z = g and
A17:      dom g = dom f and
A18:      for d being object st d in dom f holds g.d in f.d by CARD_3:def 5;
A19:      dom f = dom C by FUNCT_7:30;
         then reconsider g as FinSequence by A4,A17,FINSEQ_1:def 2;
         rng g c= REAL
         proof
           let b be object;
           assume b in rng g;
           then consider a being object such that
A20:        a in dom g and
A21:        g.a = b by FUNCT_1:def 3;
A22:        g.a in f.a by A17,A18,A20;
           per cases;
           suppose a = q;
             then f.a = R^1(].x .q-1/m,x .q+1/m.[) by A17,A19,A20,FUNCT_7:31;
             hence thesis by A21,A22;
           end;
           suppose a <> q;
             then
A23:          f.a = C.a by FUNCT_7:32;
             ex R being 1-sorted st R = J.a & C.a = the carrier of R
             by A20,A17,A19,PRALG_1:def 15;
             hence thesis by A21,A22,A23,A20,A17,A19,FUNCOP_1:7;
           end;
         end;
         then g is FinSequence of REAL by FINSEQ_1:def 4;
         then
A24:      g is Element of REAL* by FINSEQ_1:def 11;
         n in NAT by ORDINAL1:def 12;
         then len g = n by A4,A17,A19,FINSEQ_1:def 3;
         hence thesis by A16,A24;
       end;
       hence thesis by A15,ZFMISC_1:def 1;
     end;
     then reconsider Y as Subset-Family of T;
A25: Y c= PP
     proof
       let z be object;
       assume
A26:   z in Y;
       then consider i being Element of S such that
A27:   z = A(i);
       J.i = R^1;
       hence thesis by A2,A5,A26,A3,A27,WAYBEL18:def 2;
     end;
     consider N being object such that
A28:  N in S by XBOOLE_0:def 1;
A29: A(N) in Y by A28;
     then
A30: Intersect Y = meet Y by SETFAM_1:def 9;
A31: dom Intervals(x,1/m) = dom x by Def3;
A32:
      now
        let i be Element of S;
        set f = C+*(i,R^1(].x .i-1/m,x .i+1/m.[));
        thus product Intervals(x,1/m) c= product f
        proof
          let d be object;
          assume d in product Intervals(x,1/m);
          then consider d1 being Function such that
A33:       d = d1 and
A34:       dom d1 = dom Intervals(x,1/m) and
A35:       for a being object st a in dom Intervals(x,1/m) holds
          d1.a in Intervals(x,1/m).a by CARD_3:def 5;
A36:      dom f = dom C by FUNCT_7:30;
          now
            let k be object;
            assume
A37:        k in dom f;
            then
A38:        Intervals(x,1/m).k = ].x .k-1/m,x .k+1/m.[ by A36,A12,Def3;
A39:        d1.k in Intervals(x,1/m).k by A35,A31,A12,A36,A37;
            per cases;
            suppose k = i;
              hence d1.k in f.k by A38,A39,A37,A36,FUNCT_7:31;
            end;
            suppose k <> i;
              then
A40:          f.k = C.k by FUNCT_7:32;
A41:           ex R being 1-sorted st R = J.k & C.k = the carrier of R
              by A37,A36,PRALG_1:def 15;
              d1.k in REAL by A38,A39;
              hence d1.k in f.k by A40,A41,A37,A36,FUNCOP_1:7;
            end;
          end;
          hence d in product f by A33,A4,A34,A31,A12,A36,CARD_3:9;
        end;
      end;
      bb = Intersect Y
      proof
        now
          let M be set;
          assume M in Y;
          then ex i being Element of S st M = A(i);
          hence bb c= M by A13,A32;
        end;
        hence bb c= Intersect Y by A30,A29,SETFAM_1:5;
        let q be object;
        assume
A42:     q in Intersect Y;
        then reconsider q as Function;
A43:     dom q = Seg n by A42,FINSEQ_1:89;
        now
          let a be object such that
A44:       a in dom Intervals(x,1/m);
A45:       Intervals(x,1/m).a = ].x .a-1/m,x .a+1/m.[ by A44,A31,Def3;
          set f = C+*(a,R^1(].x .a-1/m,x .a+1/m.[));
          A(a) in Y by A44,A31,A12;
          then
A46:       q in A(a) by A42,SETFAM_1:43;
          then
A47:       dom q = dom f by CARD_3:9;
          then
A48:       q.a in f.a by A43,A44,A31,A12,A46,CARD_3:9;
          dom f = dom C by FUNCT_7:30;
          hence q.a in Intervals(x,1/m).a
          by A45,A48,A43,A44,A31,A12,A47,FUNCT_7:31;
        end;
        hence thesis by A13,A43,A31,A12,CARD_3:9;
      end;
      hence thesis by A25,A14,CANTOR_1:def 3;
    end;
