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;
reserve n for non zero Nat;
reserve n for non zero Nat;
reserve n for Nat,
        X for set,
        S for Subset-Family of X;
reserve n for Nat,
        S for Subset-Family of REAL;

theorem Th44:
  for n being non zero Nat, x being Subset of REAL n,
      a,b being Element of REAL n st for t being Element of REAL n holds
    (t in x iff
     (for i being Nat st i in Seg n holds t.i in ]. a.i, b.i .]))
  holds
  x is Element of Product(n,the_set_of_all_left_open_real_bounded_intervals)
  proof
    let n be non zero Nat, x be Subset of REAL n,
    a,b be Element of REAL n;
    assume
A1: for t be Element of REAL n holds
    t in x iff
    (for i be Nat st i in Seg n holds t.i in ].a.i,b.i.]);
    defpred P[object,object] means ex n be Nat st
    $1 = n & $2 = ].a.n,b.n.];
A2: for i be Nat st i in Seg n ex d be Element of
    the_set_of_all_left_open_real_bounded_intervals st P[i,d]
    proof
      let i be Nat;
      assume i in Seg n;
      set d = ].a.i,b.i.];
      take d;
      d in the set of all ].a,b.] where a,b is Real;
      hence d is Element of the_set_of_all_left_open_real_bounded_intervals;
      thus P[i,d];
    end;
    ex g being FinSequence of the_set_of_all_left_open_real_bounded_intervals
      st len g = n & for i be Nat st i in Seg n holds P[i,g/.i]
      from FINSEQ_4:sch 1(A2);
    then consider g be FinSequence of
      the_set_of_all_left_open_real_bounded_intervals
    such that
A3: len g = n and
A4: for i be Nat st i in Seg n holds P[i,g/.i];
A5: for i be Nat st i in Seg n holds g.i = ].a.i,b.i.]
    proof
      let i be Nat;
      assume
A6:   i in Seg n;
      then P[i,g/.i] by A4;
      then consider m be object such that
A7:   m = i and
A8:   g/.m = ].a.m,b.m.];
      i in dom g by A6,A3,FINSEQ_1:def 3;
      hence thesis by A7,A8,PARTFUN1:def 6;
    end;
    ex g be Function st x = product g &
    g in product(Seg n --> the_set_of_all_left_open_real_bounded_intervals)
    proof
      take g;
      thus x = product g
      proof
        for t be object holds t in x iff
        ex h be Function st t = h & dom h = dom g &
        for u be object st u in dom g holds h.u in g.u
        proof
          let t be object;
          hereby
            assume
A9:         t in x;
            then reconsider t1 = t as Element of REAL n;
A10:        dom t1 = Seg n by FINSEQ_1:89;
            now
              thus dom t1 = dom g by A10,A3,FINSEQ_1:def 3;
              thus for u be object st u in dom g holds t1.u in g.u
              proof
                let u be object;
                assume
                u in dom g; then
A11:            u in Seg n by A3,FINSEQ_1:def 3;
                then t1.u in ].a.u,b.u.] by A9,A1;
                hence t1.u in g.u by A11,A5;
              end;
            end;
            hence ex h be Function st t = h & dom h = dom g &
            for u be object st u in dom g holds h.u in g.u;
          end;
          hereby
            given h be Function such that
A12:        t = h and
A13:        dom h = dom g and
A14:        for u be object st u in dom g holds h.u in g.u;
A15:        for i be Nat st i in Seg n holds h.i in ].a.i,b.i.]
            proof
              let i be Nat;
              assume
A16:          i in Seg n;
              then i in dom g by A3,FINSEQ_1:def 3;
              then h.i in g.i by A14;
              hence h.i in ].a.i,b.i.] by A16,A5;
            end;
            dom h = dom (Seg n --> REAL) & for u be object st
              u in dom (Seg n --> REAL) holds h.u in (Seg n --> REAL).u
            proof
              dom h = Seg n by A13,A3,FINSEQ_1:def 3;
              hence dom h = dom (Seg n --> REAL) by FUNCOP_1:13;
              hereby
                let u be object;
                assume
A17:            u in dom (Seg n --> REAL); then
A18:            u in Seg n;
                h.u in ].a.u,b.u.] & ].a.u,b.u.] c= REAL by A17,A15;
                then h.u in REAL & u in dom g by A18,A3,FINSEQ_1:def 3;
                hence h.u in (Seg n--> REAL).u by FUNCOP_1:7,A17;end;
              end;
              then h in product(Seg n --> REAL) by CARD_3:9;
              then reconsider h as Element of REAL n by Th7;
              h in x by A15,A1;
            hence t in x by A12;
          end;
        end;
        hence thesis by CARD_3:def 5;
      end;
      thus g in product(Seg n -->
                          the_set_of_all_left_open_real_bounded_intervals)
      proof
A19:    dom g = Seg n & dom (Seg n -->
          the_set_of_all_left_open_real_bounded_intervals) = Seg n
            by A3,FINSEQ_1:def 3,FUNCOP_1:13;
        for x be object st x in dom (Seg n -->
          the_set_of_all_left_open_real_bounded_intervals)
        holds g.x in (Seg n -->
                        the_set_of_all_left_open_real_bounded_intervals).x
        proof
          let x be object;
          assume
A20:      x in dom (Seg n --> the_set_of_all_left_open_real_bounded_intervals);
          then g.x = ].a.x,b.x.] by A5;
          then g.x in the_set_of_all_left_open_real_bounded_intervals &
          (Seg n --> the_set_of_all_left_open_real_bounded_intervals).x =
            the_set_of_all_left_open_real_bounded_intervals by A20,FUNCOP_1:7;
          hence thesis;
        end;
        hence thesis by A19,CARD_3:9;
      end;
    end;
    hence thesis by Def2;
  end;
