TITLE: Proof of greatest element of a non-empty set
QUESTION [6 upvotes]: I am working from Elliott Mendelson's "Number Systems and the Foundations of Analysis," which I am thoroughly enjoying thus far.
The proof I am struggling with comes at the end of a section on order relations in the chapter on natural numbers:
By a greatest element of a set $B \subseteq P$ we mean an object $z$ such that $z\in B$ and $(\forall u)(u\in B \implies u \leq z)$.
If $\emptyset \neq A \subseteq P$ and $A$ is bounded above (that is, $(\exists w)(\forall u)(u \in A \implies u \leq w)$), then $A$ has a greatest element. (Hint: Let $B = \{w: (\forall u)(u\in A \implies u \leq w)\}$. By hypothesis, $B \neq \emptyset$. Apply the least number principle.)
The hint basically prescribes how to satisfy the requirement of a greatest element possessing the property that there exists some $z$ such that $(\forall u)(u\in A \implies u \leq z)$. In particular, define $B$ as given in the hint; since $A$ is bounded above, $B$ is non-empty. Since $B$ is, in turn, non-empty, it possesses a least element by the least number principle. This least element of $B$ is clearly the "$z$" referred to above, i.e., the greatest element of $A$. I have been struggling for quite a while with demonstrating that this "$z$" is, indeed, contained in $A$. I have attempted the method of proof by contradiction considering the alternative case that $z \notin A$, but can't seem to figure a means to arrive at a contradiction. I've also considered induction proofs as a means of reaching a contradiction, but likewise can't reach any contradictions. Can anyone provide an extra tip or approach to explore, please?

REPLY [3 votes]: Here is a write-up which I think only uses concepts up to that point in the book:
Let $z$ be the smallest element of $B$.
Assume $\forall a \in A \; (a \not = z)$.
This means $a<z$.
Now notice that $z \not = 1$ since $A$ is not empty.
This means $z = S(w)$ for some $w$. (Theorem 1.1 in that chapter of the book).
But this says
$$a < S(w) = z$$
meaning
$$a \leq w < z$$
so $w \in B$ and $z$ is not minimal.