I couldn’t find a simple proof of this supposedly simple fact after searching online for quite some time. It took me more time than I expected to finally convince myself, hence it seems worthwhile noting the proof.

**Statement**: Given a function

And given subsets and of R

**Proof**: Let

Thus, for any , is the minimum value of over all values of . Also let be the value of that is associated with that minimum value of . Note there can be multiple such values in which case we can pick any one of them, e.g., the smallest.

This means

Similarly, define and to be the maximum value of over all and the value of that gives that maximum value.

This means

** Claim 1**:

This follows from the fact that

** Claim 2**:

Again, this follows from the fact that

** Claim 3**:

Given any x and y, by claim 1

And by claim 2

Thus, by claim 3

The picture below is purely for illustration and might help visualize the proof of claim 3.