Let $x \in \Bbb R$. Prove that $x = \sup\{q \in \Bbb Q: q \lt x\}$.
Proof 1:
Let $x \in \Bbb R$ and let $S=\{q \in \Bbb Q: q \lt x\}$.
Since $\Bbb Q$ is dense in $\Bbb R$, there exists an $r \in \Bbb Q$ such that: $$q \lt r \lt x$$
Since $x$ is an upper bound and $r \gt q$ with $r \in S$, $x$ must be the least upper bound.
Proof 2:
Let $x \in \Bbb R$ and let $S=\{q \in \Bbb Q: q \lt x\}$.
Suppose $y = \sup S$. We want to show that $y=x$.
Suppose $ y \gt x$. By the density of $\Bbb Q$ in $\Bbb R$, there exists an $r \in \Bbb Q$ such that:$$x \lt r \lt y$$ We said $y$ is the least upper bound but $r \lt y$, which is a contradiction.
Suppose $y \lt x$. By the density of $\Bbb Q$ in $\Bbb R$, there exists an $r \in \Bbb Q$ such that:$$y \lt r \lt x.$$
We said $y$ is the least upper bound, but $r \in S$, which is a contradiction to $y$ being the least upper bound.
$\therefore$ We must have that $y=x=\sup S$.
Are both these proofs correct? Which one is better/ more precise?
What is $q$? You need to state "Let $q\in S$".
Why? This shows that $q$ is not an upper bound. You must show that no number (whether or not is $S$) less than $x$ can be an upper bound. You must show if $y < x$ then there is a rational $q$ so that $y < q < x$ and so $q \in S$ so $y$ can not be an upper bound.
But you have to show $x$ is an upper bound.
Actually you never stated that $x$ is an upper bound. But it is. As for every $q \in S$, $q< x$.
Fix those two things and this is the better proof. It's a straight definition.
How do you know $\sup S$ exists. Is $S$ non-empty? Is $S$ bounded above. Both those must be shown.
A contradiction of what? Real numbers less then $y$ exist.
Are you claiming that $r$ is an upper bound of $S$? That would be a contradiction. But why are you concluding $r$ is an upper bound of $S$?
(You can claim it as $r> x$ would imply for all $q \in S$ that $q < x < r$.)
That works but... Why introduce $y$ and then fit it to $x$. Just work with finding $\sup S$ directly.
====
FWIW, my solution: