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;
reserve n       for Nat,
        a,b,c,d for Element of REAL n;

theorem Th51:
  for n being non zero Nat,e being Point of Euclid n
  holds ex a being Element of REAL n st a = e &
  OpenHypercube(e,r) = OpenHyperInterval(a - (n|-> r),a + (n|-> r))
  proof
    let n be non zero Nat, e be Point of Euclid n;
    reconsider a = e as Element of REAL n;
    reconsider p = e as Point of TOP-REAL n by EUCLID:67;
    consider e0 be Point of Euclid n such that
A1: p = e0 and
A2: OpenHypercube(e0,r) = OpenHypercube(p,r) by TIETZE_2:def 1;
    take a;
    thus a = e;
A3: OpenHypercube(e,r) c= OpenHyperInterval(a - (n |-> r),a + (n |-> r))
    proof
      let x be object;
      assume
A4:   x in OpenHypercube(e,r);
      then reconsider y = x as Element of REAL n;
      for i be Nat st i in Seg n holds y.i in ].(a-(n|->r)).i,(a+(n|->r)).i.[
      proof
        let i be Nat;
        assume
A5:     i in Seg n;
A6:     (a - (n|->r)).i = a.i - (n|->r).i by RVSUM_1:27 .= a.i - r
          by A5,FINSEQ_2:57;
        (a + (n|->r)).i = a.i + (n|->r).i by RVSUM_1:11 .= a.i + r
          by A5,FINSEQ_2:57;
        hence thesis by A5,A6,A1,A2,A4,TIETZE_2:4;
      end;
      hence thesis by Def4;
    end;
    OpenHyperInterval(a - (n|->r),a + (n|->r)) c= OpenHypercube(e,r)
    proof
      let x be object;
      assume
A7:   x in OpenHyperInterval(a-(n|->r),a+(n|->r));
      then reconsider q = x as Element of TOP-REAL n by EUCLID:22;
      now
        let i be Nat;
        assume
A8:     i in Seg n;
        consider y being Element of REAL n such that
A9:     x = y and
A10:    (for i being Nat st i in Seg n holds
          y.i in ].(a-(n|->r)).i,(a+(n|->r)).i.[) by A7,Def4;
A11:    (a - (n|->r)).i = a.i - (n|->r).i by RVSUM_1:27
                       .= a.i - r by A8,FINSEQ_2:57;
        (a + (n|->r)).i = a.i + (n|->r).i by RVSUM_1:11
                       .= a.i + r by A8,FINSEQ_2:57;
        hence q.i in ].p.i-r,p.i+r.[ by A11,A8,A9,A10;
      end;
      hence thesis by A1,A2,TIETZE_2:4;
    end;
    hence thesis by A3;
  end;
