Least Upper Bound (Supremum) in an Ordered Set

Suprema and Infima (Sups and Infs) Lie at the Heart of Real Analysis. The Range of Cos(n) is an Interesting Example.

Study Help for Baby Rudin, Part 1.3

A way to visualize the least upper bound (supremum) of a set which is bounded above.
For an ordered set S and M\subseteq S which is bounded above, the supremum of M, when it exists in S, is also called the least upper bound of M in S.

Which property separates the field of real numbers from the field of rational numbers (or any other proper subfield of the real numbers)? We will ultimately see that it is the so-called Completeness Property, which is related to the concept of the least upper bound (supremum) of an ordered set.

The concept of a least upper bound, or supremum, of a set E only makes sense when E is a subset of an ordered set S (see Study Help for Baby Rudin, Part 1.2 to learn about ordered sets). When every nonempty subset of S which is bounded above has a least upper bound (with respect to the order <), we say that S has the least-upper-bound, or “completeness”, property.

The ordered field of rational numbers \Bbb{Q} does not have the least-upper-bound property. As we saw in Study Help for Baby Rudin, Part 1.1, the set A=\left\{p\in \Bbb{Q}\ |\ p>0\mbox{ and }p^{2}<2\right\} is bounded above (for example, by the number 2) while the set B=\left\{p\in \Bbb{Q}\ |\ p>0\mbox{ and }p^{2}>2\right\} is bounded below (for example, by the number 1). In fact, A\cup B=\Bbb{Q}\cap (0,\infty), with every element of B being an upper bound of A. But A has no smallest upper bound in \Bbb{Q} because A has no largest element and because B has no smallest element.

This article will focus mostly on the content on page 4 of Baby Rudin to expand on these ideas. We will also take the opportunity to explain a couple important concepts from logic. These are the concepts of the negation of a definition and the contrapositive of an implication.

Finally, we will study an interesting example involving the cosine function.

Definition of Bounded Above and Least Upper Bound (Supremum)

Assume that S is an ordered set in all that follows. This means there is an (total) order relation < defined on S satisfying the trichotomy law and the transitivity law. As stated in the previous post, given a,b\in S, we will also write a\leq b if a<b or a=b. Furthermore, b>a is equivalent to a<b and b\geq a is equivalent to a\leq b.

First, we should define when an element \beta\in S is an upper bound of a set E\subseteq S.

Definition: Let E\subseteq S. An element \beta\in S is an upper bound of E if x\leq \beta for all x\in E. In other words, if x\in E\implies x\leq \beta (x belonging to E implies that x is less than or equal to \beta).

For example, if S=\Bbb{Z} (the ring of integers) and E=\left\{x\in \Bbb{Z}\ |\ x<0\right\}=\left\{\ldots,-3,-2,-1\right\}, then -1 and 0 are both examples of upper bounds of E (in S). In fact, \beta\in \Bbb{Z} is an upper bound of E if and only if \beta \geq -1. Note that we are assuming S=\Bbb{Z} has the “standard” order along a number line. This will be our ongoing assumption with \Bbb{Z}, \Bbb{Q}, and \Bbb{R} in all future posts.

Logical Negation

This definition provides us with our first opportunity in this article to describe one of the two concepts from logic mentioned above: the negation of a definition.

Informally, the negation of a statement is its “opposite”. In the present case, we can define what it means for \beta\in S to NOT be an upper bound of E\subseteq S by negating the definition above.

Take the implication x\in E\implies x\leq \beta. We can use the universal quantifier \forall (“for all”) to write this implication in a way that is easier to “negate”. That way is: \forall\ x\in E,\ x\leq \beta. To negate this definition, change the universal quantifier \forall to an existential quantifier \exists (“there exists”). Also, change the direction of the inequality.

In other words, an element \beta\in S is not an upper bound of E exactly when: \exists\ x\in E,\ x>\beta. In words: “there exists and element of E that is bigger than \beta“. This should make good sense when you draw a number line as a way to imagine an ordered set.

We can define a “dual” concept of a lower bound for a subset of S. It is a good exercise for you to write out an appropriate definition and its logical negation on your own.

When Is a Set Bounded Above?

Now we can define what it means for a set to be bounded above.

Definition: Let E\subseteq S. We say that E is bounded above (in S) if there exists an upper bound for E (in S). In other words, if there exists \beta\in S such that x\leq \beta\ \forall\ x\in E.

For example, E=\left\{x\in \Bbb{Z}\ |\ x<0\right\} is bounded above in the ring \Bbb{Z}. Of course, E is also bounded above in the rational field \Bbb{Q} and in the real field \Bbb{R}.

As another example, E=\left\{\frac{1}{n}\ |\ n\in \Bbb{N}\right\}=\left\{1,\frac{1}{2},\frac{1}{3},\ldots\right\} is bounded above (in both \Bbb{Q} and \Bbb{R}). Any number greater than or equal to 1 is an upper bound of E. (Here, and in future posts, \Bbb{N}=\left\{1,2,3,\ldots\right\} represents the set of natural (counting) numbers.)

Of course, there is also the dual concept what it means for a set to be bounded below.

Least Upper Bound (Supremum) and Logical Contrapositive of an Implication

The key concept of a least upper bound (supremum) is defined at the top of page 4 in Baby Rudin.

Definition: Suppose S is an ordered set and E\subseteq S. Assume that E is bounded above. An element \beta\in S is the least upper bound (supremum) of E if:

  1. \beta is an upper bound of E.
  2. If \gamma<\beta, then \gamma is not an upper bound of E. In other words, if \gamma<\beta, then \exists\ x\in E such that \gamma<x.

When this is true, we write \beta=\sup(E). We also say “beta is the supremum of E“, or “beta is the sup of E“.

Condition (2) is in the form of a logical implication: if P, then Q (symbolically, P\Longrightarrow Q, read as “P implies Q“), where P and Q represent the statements “\gamma<\beta” and “\exists\ x\in E such that \gamma<x“, respectively.

As a logical implication, we can form its contrapositive: if \lnot Q, then \lnot P (\lnot Q\Longrightarrow \lnot P, read as “not Q implies not P“), where \lnot is the “negation operator”. In the case of the definition above, the contrapositive becomes if \gamma is an upper bound of E, then \beta\leq \gamma: i.e., \beta is indeed the “least upper bound” of E.

The contrapositive of an implication is a new implication that is logically equivalent to the original implication. In other words, they have the same “truth value”. They are either both true or both false in any given situation. Thus, the contrapositive provides an alternative way of viewing the definition.

Two Examples: The Supremum of a Closed Interval and Its Interior (an Open Interval)

Consider an example on the real number line \Bbb{R} (under the standard order, of course). Suppose E=[a,b]=\left\{x\in \Bbb{R}\ |\ a\leq x\leq b\right\}, the closed interval from a to b. We claim that \sup(E)=b, the right endpoint of the interval.

To see why, note first that b is certainly an upper bound of E, by definition of E. This fulfills condition (1) of the definition of a least upper bound (supremum).

But what about condition (2)? Is it easier to prove the original version or its contrapositive? In this case, they are both relatively straightforward to prove, though the contrapositive is a bit “quicker”.

For the original version, start by assuming that \gamma<b. We must show that there exists x\in E=[a,b] such that \gamma<x (i.e., \gamma is not an upper bound of E). We can think in terms of cases here: if \gamma<a, then we can take x=a\in E. On the other hand, if a\leq \gamma<b, then x=\frac{\gamma+b}{2}\in E will work (technically this takes proof, but we take it as intuitive in this post).

For the contrapositive, start by assuming that \gamma is an upper bound of E=[a,b]. This gives us the conclusion we seek right away: by definition, this means that b\leq \gamma since b\in E=[a,b].

If we take out the endpoints of E, we get a new set E^{\circ}, called the interior of E, which is the open interval E^{\circ}=(a,b)=\left\{x\in \Bbb{R}\ |\ a<x<b\right\}. It turns out that \sup(E^{\circ})=b as well, in spite of the fact that E^{\circ} has no largest element.

The fact that b is an upper bound of E^{\circ} is again trivial. For the proof of condition (2), the second argument (of the contrapositive) from two paragraphs above no longer works because b\not\in E^{\circ}. Instead, we would have to use the first argument from three paragraphs above and use the facts that \gamma<a<x=\frac{a+b}{2}<b in the first case, and a\leq \gamma<x=\frac{\gamma+b}{2}<b in the second case.

In any case (mild pun intended), we make the important observation that: sometimes the supremum of a set is an element of the set and sometimes it is not.

Remember this fact for the future!

The Least Upper Bound (Supremum) of a Set is Unique (Proof by Contradiction)

The definition of least upper bound (supremum) of a set is constructed in such a way to guarantee that, if it exists, it is unique. To see why, use a proof by contradiction.

To see why, suppose to the contrary that E has at least two different suprema, call two of them \beta_{1} and \beta_{2}. Since \beta_{1}\not=\beta_{2}, the Law of Trichotomy (see https://infinityisreallybig.com/2021/01/19/definitions-of-ordered-set-and-ordered-field/) implies that \beta_{1}<\beta_{2} or \beta_{2}<\beta_{1}. Since these are arbitrary symbols, we can, without loss of generality (WLOG), assume that \beta_{1}<\beta_{2}.

But now, the fact that \beta_{2} is a least upper bound of E implies that \beta_{1} is no longer an upper bound of E, which is a contradiction to the definition of \beta_{1} being a least upper bound of E as well. (This argument is an example of something that is so trivial it is actually a bit confusing.)

This contradiction implies that our original assumption that E has at least two distinct suprema must be false. Therefore, E either has a unique supremum or no supremum at all. In other words, if \sup(E) exists, it must be unique.

Greatest Lower Bound (Infimum) of a Set That is Bounded Below

There is a dual concept of the (unique, when it exists) greatest lower bound, or infimum (or “inf”, for short) of a set E\subseteq S that is bounded below. We write (and say) \alpha=\inf(E) if: (1) \alpha is a lower bound of E and (2) If \alpha<\gamma, then \gamma is not a lower bound of E. In other words, if \alpha<\gamma, then \exists\ x\in E such that x<\gamma.

It is also worth emphasizing that a set which is not bounded above in S will not have a supremum in S, while a set that is not bounded below in S will not have an infimum in S.

More Examples of Sups and Infs

Before we consider our final example, here is a list of examples for you to think about and verify on your own as exercises. Think of these all as being subsets of the ordered field \Bbb{R}. Find and prove the values of \sup(E) and \inf(E) for all these exercises:

  1. E is the set of all reciprocals of the positive integers E=\left\{\frac{1}{n}\ |\ n=1,2,3,\ldots\right\}.
  2. Now E is the set from #1 formed by a union with a special singleton set E=\left\{\frac{1}{n}\ |\ n=1,2,3,\ldots\right\}\cup \left\{0\right\}.
  3. E is the set of all “oscillating reciprocals” of the positive integers E=\left\{\frac{(-1)^{n}}{n}\ |\ n=1,2,3,\ldots\right\}.
  4. Take E to be an arbitrary finite set of real numbers. WLOG, you may assume you have indexed these numbers in order a_{1}<a_{2}<\cdots<a_{n}.
  5. E is the image (“range”) of the squaring function on a closed interval of the real number line E=\left\{x^{2}\ |\ 0\leq x\leq 2\right\}.
  6. Now E is the image of the same squaring function but on the corresponding open interval (interior of the previous one) E=\left\{x^{2}\ |\ 0<x<2\right\}.
  7. Here E is the image of the same squaring function on a half-open/half-closed interval E=\left\{x^{2}\ |\ -1\leq x<2\right\}.
  8. Finally, E is the image of the cosine function on an open interval of the real number line E=\left\{\cos(x)\ |\ 0<x<\pi\right\}.

You may also find the following video that I made to be helpful:

Examples of Least Upper Bounds (Suprema)

An Interesting and Non-Trivial Example. Find the Values of the Sup and Inf of Set of Outputs of the Cosine Function for Positive Integer Inputs

The answers to #8 above, when E=\left\{\cos(x)\ |\ 0<x<\pi\right\}, are \sup(E)=1 and \inf(E)=-1. But what happens when the inputs of the cosine function are positive integers instead?

In particular, let E=\left\{\cos(n)\ |\ n=1,2,3,\ldots\right\}=\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}. What are the values of \sup(E) and \inf(E) here? Note that this set is not an interval or a finite set. Also note that, compared to most of the exercises above, it is a “complicated” infinite set.

In fact, the real numbers in E are all irrational (this takes proof). If we approximate the first five of them (as n increases), we get \cos(1)=0.5403023059\ldots, \cos(2)=-0.4161468365\ldots, \cos(3)=-0.9899924966\ldots, \cos(4)=-0.6536436209\ldots, and \cos(5)=0.2836621855\ldots.

If you compute enough of these numbers (hundreds, if not thousands of them), you may start to suspect that \sup(E)=1 and \inf(E)=-1. This is in spite of the fact that \cos(n) never equals 1 or -1 for n\in \Bbb{N}=\left\{1,2,3,\ldots\right\}.

In fact, if you make a graph of these values along a number line, the points even seem to “densely” fill up the entire closed interval [-1,1] (there is actually a precise technical meaning for the concept of such a dense set). In actuality, E=\left\{\cos(n)\ |\ n\in \Bbb{N}\right\} is only a “countably infinite” set of irrational numbers in [-1,1]. However, such a set can indeed get “arbitrarily close” to any number, rational or irrational, in [-1,1]. This includes the endpoints -1 and 1.

The least upper bound (supremum) of the range of cos(n) for n = 1, 2, 3, ... is the number one (the number 1).
This animation shows he values of \cos(n) for n=1,2,3,\ldots,200. You can see that they are “densely filling” seemingly the entire interval [-1,1]. In actuality, these values only give a “countably infinite” set of irrational numbers in [-1,1].
Further Evidence that \sup\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}=1

What would it mean for \sup\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}=1? First, it would mean that 1 is an upper bound of E=\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}. But that is obviously true since -1\leq \cos(x)\leq 1 for all x\in \Bbb{R}.

It would also mean that, given \gamma<1, \gamma is not an upper bound of E=\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}.

Stated in a more typical way, given any \epsilon>0, no matter how small, 1-\epsilon is not an upper bound of E=\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}.

For example, if \epsilon=0.01, how big does n need to be so that 1-\epsilon=1-0.01=0.99<\cos(n). A bit of experimentation reveals that n=25 is the smallest positive integer that works: \cos(25)\approx 0.9912028119.

If \epsilon=0.0001 so that 1-\epsilon=0.9999, it turns out that n=333 is the smallest positive integer that works. We get \cos(333)\approx 0.9999610928.

And if \epsilon=0.000000001=10^{-9} so that 1-\epsilon=0.999999999, then (with the help of a computer program) it turns out that n=103993 is the smallest positive integer that works. We get \cos(103993)\approx 0.9999999998.

We could keep going. This is evidence that helps us believe that \sup\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}=1, but it is certainly no proof.

Proof that \sup\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}=1

We can prove that \sup\left\{\cos(n)\ |\ n\in \Bbb{N}\right\}=1, but it is a bit tricky. In fact, we need some definitions and facts from Real Analysis that are found later in Baby Rudin. The list below consists of the things we need.

  1. We need the so-called Archimedean Property of the real numbers. This says that, given two real numbers x and y with x>0, then there exists a positive integer n such that nx>y. In fact, there is also a smallest such positive integer n that makes this inequality true (this last fact is based on the “Well-Ordering Principle”, which we take as an axiom).
  2. We need the so-called Pigeonhole principle. Informally, this says that if n “objects” (numbers) are put in m “containers” (sets), where n>m, then at least one container must contain more than one object.
  3. And we need the definition of continuity at a point, the fact that the cosine function is continuous everywhere, and the fact that \cos\left(0\right)=1. Because of all this, we can say that, given any \epsilon>0, there exists a number \delta>0 such that if |x|=\left|x-0\right|<\delta, then |\cos(x)-1|<\epsilon. Informally, we can make \cos(x) as close as we like to 1 if we take x sufficiently close to 0.

Here now are the details of the proof. It is a very typical kind of proof encountered in real analysis, though it is a bit trickier than most exercises beginning students can handle.

Proof:

Let \epsilon>0 be given. We must show that there is some n\in \Bbb{N} such that 1-\cos(n)<\epsilon.

Since \cos(x) is continuous at x=0 and \cos\left(0\right)=1, we can choose a number \delta>0 such that |\cos(x)-1|<\epsilon whenever |x|=\left|x-0\right|<\delta. Since \cos(x)\leq 1 for all x\in \Bbb{R}, the inequality |\cos(x)-1|<\epsilon can also be written as 1-\cos(x)<\epsilon.

Next, choose a positive integer N\in \Bbb{N} so that \frac{1}{N}<\frac{\delta}{2\pi} (here is where we need the Archimedean Property). For each m=1,2,3,\ldots,N+1, let \theta_{m}=m\mbox{ mod}(2\pi). In other words, \theta_{m}=2\pi\left(\frac{m}{2\pi}-\lfloor \frac{m}{2\pi}\rfloor\right), where \lfloor\ \rfloor represents the greatest integer (floor) function. For example, x_{100}\approx 2\pi(15.915494-15)\approx 5.75222 and x_{1000}\approx 2\pi(159.154943-159)\approx 0.97354. Note that, interpreted as angles measured in radians, m and \theta_{m} are equivalent (they differ by an integer multiple of 2\pi). In particular, this means that \cos(m)=\cos\left(\theta_{m}\right).

There are N+1 distinct numbers in the list \theta_{1}, \theta_{2},\ldots,\theta_{N+1} (it takes proof to show that these are distinct — I’ll leave it for you to check). These numbers, by definition, are all in the interval [0,2\pi)=\left\{x\in \Bbb{R}\ |\ 0\leq x<2\pi\right\}.

Furthermore, there are N intervals in the list \left[0,\frac{2\pi}{N}\right),\left[\frac{2\pi}{N},\frac{4\pi}{N}\right),\ldots, \left[\frac{2\pi(N-2)}{N},\frac{2\pi(N-1)}{N}\right),\left[\frac{2\pi(N-1)}{N},2\pi\right). These intervals are disjoint and cover the interval [0,2\pi) (and they all have length \frac{2\pi}{N}<\delta).

Therefore, by the Pigeonhole Principle, at least one of these intervals contains at least two values from the list of N+1 distinct numbers. Say \theta_{a} and \theta_{b} are two distinct numbers that have the property that \theta_{a}, \theta_{b}\in \left[\frac{2\pi c}{N},\frac{2\pi(c+1)}{N}\right) for some specific a,b\in \left\{1,2,3,\ldots,N+1\right\} (say, with a<b) and some specific c\in\left\{0,1,2,\ldots,N-1\right\}.

This means that |\theta_{b}-\theta_{a}|<\frac{2\pi}{N}<\delta. Let d=|\theta_{b}-\theta_{a}|=\min\left\{(b-a)\mbox{ mod}(2\pi),(a-b)\mbox{ mod}(2\pi)\right\}.

Let n=b-a\in \Bbb{N}. Then, \left|\theta_{n}\right|=\left|\theta_{n}-0\right|=|\theta_{b}-\theta_{a}|=d<\delta. Thus, 1-\cos\left(\theta_{n}\right)<\epsilon.

Since \cos(n)=\cos\left(\theta_{n}\right), we have 1-\cos(n)<\epsilon as well, as desired. Q.E.D.

Understanding the Proof By Example

If you had a hard time understanding this proof, do not be discouraged. Keep working at it! It takes time to get used to these kinds of proofs. That is a large part of the challenge of Real Analysis.

To help you understand it, it is helpful to work through the proof for a particular value of \epsilon>0. For example, take \epsilon=0.01=10^{-2}. If you use your calculator to solve the equation \cos(x)=1-\epsilon=0.99 for solutions near x=0, you will find approximate solutions x\approx \pm 0.141539. This means that we can take, for example, \delta=0.14.

Based on this value of \delta, the smallest value of N\in \Bbb{N} such that \frac{1}{N}<\frac{\delta}{2\pi}\approx 0.0223 is N=45. This makes each of the intervals in the proof have length \frac{2\pi}{N}\approx 0.139626.

It then turns out that \theta_{1}=1 and \theta_{45}\approx 1.0177 are such that \left|\theta_{45}-\theta_{1}\right|\approx 0.0177<\frac{2\pi}{N}. In other words, a=1 and b=45.

This implies that we can take n=b-a=45-1=44. Note that \cos(44)\approx \cos(0.0177)\approx 0.999843. In other words, 1-\cos(44)\approx 0.000157<0.01=\epsilon.