Proof
(related to Proposition: Compact Subset of Real Numbers Contains its Maximum and its Minimum)
 Let $A$ be a nonempty compact subset of the real numbers $\mathbb R$.
 We have to show that $\max(A)\in A$ and $\min(A)\in A$.
 According to the HeineBorel theorem, \(A\) is bounded and closed.
 Because $A$ is a nonempty bounded subset of real numbers, it has an upper bound and a lower bound.
 Because real numbers have the supremum and the infimum property, every nonempty subset, which has a upper and an lower bound, has also a supremum and an infimum.
 Thus, also $A$ has a supremum and an infimum.
 Therefore there exist convergent real sequences $(x_k)_{k\in\mathbb N}$ and $(y_k)_{k\in\mathbb N}$ with \(x_k\in A\) and $y_k\in A$ for all $k\in\mathbb N$ and \(\lim x_k=\sup(A)\), $\lim y_k=\inf(A)$.
 In any metric space, a closed set (like $A$ is) can be characterized by the limit of its sequences as follows: if there is a convergent sequence of points $(x_k)_{k\in\mathbb N}$ contained in $A$, $A$ will also contain its limit.
 Real numbers are a metric space.
 It follows that $\sup(A)\in A$ and $\inf(A)\in A$.
 By definition of maximum and minimum, it follows that $\max(A)\in A$ and $\min(A)\in A$.
∎
Thank you to the contributors under CC BYSA 4.0!
 Github:

References
Bibliography
 Forster Otto: "Analysis 2, Differentialrechnung im \(\mathbb R^n\), Gewöhnliche Differentialgleichungen", Vieweg Studium, 1984