This is the question statement: Let $Y$ be a totally ordered set such that every non-empty subset of $Y$ has both a minimum and a maximum. Show that $Y$ is finite.
I am pretty confused as to how do I even approach this question. Any help would be nice.
edit: Please provide any hints/help considering the fact that this is my first rigorous mathematical course, and I have started from scratch, the ZFC axioms. So, please only use definitions of totally ordered sets, max/min element etc.
Let $y\in Y$. If $y$ is the maximum of $Y$, let $\phi(y) = y$. If not, let $\phi(y) := \min \{x \in Y \ \vert \ y < x\}$.
Let $z_0$ be the minimum of $Y$. Define, inductively, the sequence $(z_n)_{n \in \mathbb{N}}$ by $\forall n, \ z_{n+1} = \phi(z_n)$.
Consider $Z := \{z_n \ \vert \ n \in \mathbb{N}\}$.