  reserve n,m,i for Nat,
          p,q for Point of TOP-REAL n,
          r,s for Real,
          R for real-valued FinSequence;

theorem Th5:
  (for i st i in Seg n /\ dom R holds R.i >= 0)
     implies p in ClosedHypercube(p,R)
proof
  assume
A1: for i st i in Seg n /\ dom R holds R.i >= 0;
  now
    let i;
    assume
A2:   i in Seg n;
A3: now
      per cases;
        suppose i in dom R;
          then i in Seg n /\ dom R by A2,XBOOLE_0:def 4;
          hence R.i >= 0 by A1;
        end;
        suppose not i in dom R;
          hence R.i >=0 by FUNCT_1:def 2;
        end;
    end;
    then
A4: p.i +R.i >= p.i by XREAL_1:40;
    p.i - R.i <= p.i by A3,XREAL_1:43;
    hence p.i in [. p.i - R.i,p.i+R.i .] by A4,XXREAL_1:1;
  end;
  hence thesis by Def2;
end;
