# Interval of Totally Ordered Set is Convex It has been suggested that this page or section be merged into Interval of Ordered Set is Convex. (Discuss)

## Theorem

Let $\left({S, \preccurlyeq}\right)$ be an ordered set.

Let $I \subseteq S$ be an interval in $S$.

Then $I$ is convex.

## Proof

There are a number of cases to investigate.

### Open Interval

Let $I = \left({a \,.\,.\, b}\right)$ be an open interval:

$I = \left\{ {x \in S: a \prec x \prec b}\right\}$

Let $s, t, x \in I$ such that $s \prec x \prec t$.

Then by definition:

$a \prec s \prec x$

and:

$x \prec t \prec b$

and so:

$a \prec x \prec b$

and $x \in I$.

Thus we have:

$\forall s, t, x, \in I: s \prec x \prec t \implies x \in I$

and $I$ is convex by definition.

$\Box$

### Left Half-Open Interval

Let $I = \left({a \,.\,.\, b}\right]$ be a left half-open interval:

$I = \left\{ {x \in S: a \prec x \preceq b}\right\}$

Let $s, t, x \in I$ such that $s \prec x \prec t$.

Then by definition:

$a \prec s \prec x$

and:

$x \prec t \preceq b$

and so:

$a \prec x \preceq b$

and $x \in I$.

Thus we have:

$\forall s, t, x, \in I: s \prec x \prec t \implies x \in I$

and $I$ is convex by definition.

$\Box$

### Right Half-Open Interval

Let $I = \left[{a \,.\,.\, b}\right)$ be a right half-open interval:

$I = \left\{ {x \in S: a \preceq x \prec b}\right\}$

Let $s, t, x \in I$ such that $s \prec x \prec t$.

Then by definition:

$a \preceq s \prec x$

and:

$x \prec t \prec b$

and so:

$a \preceq x \prec b$

and $x \in I$.

Thus we have:

$\forall s, t, x, \in I: s \prec x \prec t \implies x \in I$

and $I$ is convex by definition.

$\Box$

### Closed Interval

Let $I = \left[{a \,.\,.\, b}\right]$ be a closed interval:

$I = \left\{ {x \in S: a \preceq x \preceq b}\right\}$

Let $s, t, x \in I$ such that $s \prec x \prec t$.

Then by definition:

$a \preceq s \prec x$

and:

$x \prec t \preceq b$

and so:

$a \preceq x \preceq b$

and $x \in I$.

Thus we have:

$\forall s, t, x, \in I: s \prec x \prec t \implies x \in I$

and $I$ is convex by definition.

$\blacksquare$