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 Th47:
  for n being non zero Nat,
      s being Tuple of n,the_set_of_all_right_open_real_bounded_intervals holds
    ex a,b being Element of REAL n st
    for i being Nat st i in Seg n holds s.i = [.a.i,b.i.[
  proof
    let n being non zero Nat,
        s be Tuple of n,the_set_of_all_right_open_real_bounded_intervals;
    s in Funcs(Seg n,the_set_of_all_right_open_real_bounded_intervals) by Th9;
    then consider f be Function such that
A1: s = f and
A2: dom f = Seg n and
    rng f c= the_set_of_all_right_open_real_bounded_intervals by FUNCT_2:def 2;
    defpred P[object,object] means ex f be Element of [:REAL,REAL:] st
    f = $2 & s.$1 = [.(f`1),(f`2).[;
A3: for i be Nat st i in Seg n ex d be Element of [:REAL,REAL:] st P[i,d]
      proof
        let i be Nat;
        assume i in Seg n;
        then s.i in rng s by A1,A2,FUNCT_1:3;
        then s.i in the set of all [.a,b.[ where a,b is Real;
        then consider a,b be Real such that
A4:     s.i = [.a,b.[;
        a in REAL & b in REAL by XREAL_0:def 1;
        then reconsider d = [a,b] as Element of [:REAL,REAL:]
          by ZFMISC_1:def 2;
        take d;
        s.i = [.(d`1),(d`2).[ by A4;
        hence thesis;
      end;
    consider f being FinSequence of [:REAL,REAL:] such that
A5: len f = n and
A6: for i being Nat st i in Seg n holds P[i,f/.i] from FINSEQ_4:sch 1(A3);
    reconsider f as n-element FinSequence of [:REAL,REAL:]
      by A5,CARD_1:def 7;
    consider z be Element of [:REAL n,REAL n:] such that
A7: for i being Nat st i in Seg n holds
    (z`1).i = (f/.i)`1 & (z`2).i = (f/.i)`2 by Th13;
    reconsider a = z`1,b = z`2 as Element of REAL n;
    take a,b;
    thus for i being Nat st i in Seg n holds s.i = [. a.i,b.i .[
    proof
      let i be Nat;
      assume i in Seg n;
      then a.i = (f/.i)`1 & b.i = (f/.i)`2 & P[i,f/.i] by A6,A7;
      hence s.i = [.a.i,b.i.[;
    end;
  end;
