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 Th27:
  for PP being Subset-Family of TopSpaceMetr Euclid n st
  PP = product_prebasis (Seg n --> R^1) holds PP is open
  proof
    let PP be Subset-Family of TopSpaceMetr Euclid n;
    set J = Seg n --> R^1;
    set C = Carrier J;
    set T = TopSpaceMetr Euclid n;
    set E = Euclid n;
    assume
A1: PP = product_prebasis (Seg n --> R^1);
    let x be Subset of T;
    assume x in PP;
    then consider i being set, R being TopStruct, V being Subset of R
    such that
A2: i in Seg n and
A3: V is open and
A4: R = J.i and
A5: x = product (C +* (i,V)) by A1,WAYBEL18:def 2;
A6: dom C = Seg n by PARTFUN1:def 2;
A7: now
       let i be set;
       let e, y be Point of E;
       let r be Real;
       assume
A8:    y in Ball(e,r);
       set O = ].e.i-r, e.i+r.[;
       set G = C +* (i,O);
A9:    dom y = Seg n by FINSEQ_1:89;
A10:    dom G = dom C by FUNCT_7:30;
       now
         let a be object;
         assume
A11:      a in dom G;
         per cases;
         suppose
A12:        a = i;
A13:        y.i = e.i + (y.i-e.i);
A14:       dom e = Seg n by FINSEQ_1:89;
           dom(y-e) = dom y /\ dom e by VALUED_1:12;
           then
A15:        (y-e).i = y.i-e.i by A9,A14,A11,A12,A10,VALUED_1:13;
           |.(y-e).i.| < r by A8,Th10;
           then y.i in O by A15,A13,FCONT_3:3;
           hence y.a in G.a by A12,A10,A11,FUNCT_7:31;
         end;
         suppose a <> i;
           then
A16:        G.a = C.a by FUNCT_7:32;
A17:        ex R being 1-sorted st R = J.a & C.a = the carrier of R
           by A11,A10,PRALG_1:def 15;
           y.a in REAL by XREAL_0:def 1;
           hence y.a in G.a by A16,A11,A10,A17,FUNCOP_1:7;
         end;
       end;
       hence y in product G by A10,A6,A9,CARD_3:9;
     end;
     set F = C +* (i,V);
A18:  R = R^1 by A2,A4,FUNCOP_1:7;
     for e being Element of E st e in x
     ex r being Real st r > 0 & Ball(e,r) c= x
     proof
       let e be Element of E;
       assume
A19:    e in x;
A20:    dom F = dom C by FUNCT_7:30;
       then
A21:    e.i in F.i by A2,A6,A19,A5,CARD_3:9;
A22:    F.i = V by A2,A6,FUNCT_7:31;
       then consider r being Real such that
A23:    r > 0 and
A24:    ].e.i-r, e.i+r.[ c= V by A3,A18,A21,FRECHET:8;
       take r;
       thus r > 0 by A23;
       let y be object;
       assume
A25:    y in Ball(e,r);
       then reconsider y as Point of E;
       set O = ].e.i-r, e.i+r.[;
       set G = C +* (i,O);
A26:    dom G = dom C by FUNCT_7:30;
A27:    y in product G by A25,A7;
       now
         let a be object;
         assume
A28:      a in dom G;
         per cases;
         suppose a = i;
           hence G.a c= F.a by A24,A22,A26,A28,FUNCT_7:31;
         end;
         suppose a <> i;
           then G.a = C.a & F.a = C.a by FUNCT_7:32;
           hence G.a c= F.a;
         end;
       end;
       then product G c= product F by A20,CARD_3:27,FUNCT_7:30;
       hence thesis by A27,A5;
     end;
     then x in the topology of T by PCOMPS_1:def 4;
     hence thesis by PRE_TOPC:def 2;
   end;
