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
  OpenHyperInterval(a,b) c= LeftOpenHyperInterval(a,b) &
  OpenHyperInterval(a,b) c= RightOpenHyperInterval(a,b) &
  LeftOpenHyperInterval(a,b) c= ClosedHyperInterval(a,b) &
  RightOpenHyperInterval(a,b) c= ClosedHyperInterval(a,b)
  proof
    thus OpenHyperInterval(a,b) c= LeftOpenHyperInterval(a,b)
    proof
      let x be object;
      assume x in OpenHyperInterval(a,b);
      then consider y be Element of REAL n such that
A1:   x = y and
A2:   for i be Nat st i in Seg n holds y.i in ].a.i,b.i.[ by Def4;
      now
        let i be Nat;
        assume i in Seg n;
        then y.i in ].a.i,b.i.[ & ].a.i,b.i.[ c= ].a.i,b.i.] by A2,XXREAL_1:21;
        hence y.i in ].a.i,b.i.];
      end;
      hence thesis by A1,Def5;
    end;
    thus OpenHyperInterval(a,b) c= RightOpenHyperInterval(a,b)
    proof
      let x be object;
      assume x in OpenHyperInterval(a,b);
      then consider y be Element of REAL n such that
A3:   x = y and
A4:   for i be Nat st i in Seg n holds y.i in ].a.i,b.i.[ by Def4;
      now
        let i be Nat;
        assume i in Seg n;
        then y.i in ].a.i,b.i.[ & ].a.i,b.i.[ c= [.a.i,b.i.[ by A4,XXREAL_1:22;
        hence y.i in [.a.i,b.i.[;
      end;
      hence thesis by A3,Def6;
    end;
    thus LeftOpenHyperInterval(a,b) c= ClosedHyperInterval(a,b)
    proof
      let x be object;
      assume x in LeftOpenHyperInterval(a,b);
      then consider y be Element of REAL n such that
A5:   x = y and
A6:   for i be Nat st i in Seg n holds y.i in ].a.i,b.i.] by Def5;
      now
        let i be Nat;
        assume i in Seg n;
        then y.i in ].a.i,b.i.] & ].a.i,b.i.] c= [.a.i,b.i.] by A6,XXREAL_1:23;
        hence y.i in [.a.i,b.i.];
      end;
      hence thesis by A5,Def3;
    end;
    thus RightOpenHyperInterval(a,b) c= ClosedHyperInterval(a,b)
    proof
      let x be object;
      assume x in RightOpenHyperInterval(a,b);
      then consider y be Element of REAL n such that
A7:   x = y and
A8:   for i be Nat st i in Seg n holds y.i in [.a.i,b.i.[ by Def6;
      now
        let i be Nat;
        assume i in Seg n;
        then y.i in [.a.i,b.i.[ & [.a.i,b.i.[ c= [.a.i,b.i.] by A8,XXREAL_1:24;
        hence y.i in [.a.i,b.i.];
      end;
      hence thesis by A7,Def3;
    end;
  end;
