GLB=greatest lower bound
LUB=least upper bound
Give one example of a set such that the GLB and LUB exist but there exists at least one subset which has no GLB and LUB.
[Math] Find a set which has GLB and LUB but there exists at least one subset which has no GLB and LUB
boolean-algebrareal-analysis
Related Solutions
Your proof is mostly OK, except for the fact that it's not a proof of your original statement.
You are trying to prove that any set with greatest lower bounds automatically has least upper bounds. In your proof, you fix an arbitrary subset $B$ of a set $S$ with greatest lower bounds, and then show that a completely different set $A$ has a least upper bound. Instead, you need to show that $B$ has least upper bounds. Let's see how we can alter your proof so that it proves your original statement.
Let $B$ be a nonempty subset of $S$ that is bounded below.
This is (almost) a great place to start. If you're trying to prove something about all objects in a class, it is always good to start by fixing an arbitrary one. But here, you want to show that any non-empty bounded above subset of $S$ has a least upper bound, so you should be fixing $B$ to be a non-empty bounded above subset of $S$.
Let $a\in A$ be the set of all lower bounds of $B$.
First of all, I think you meant to say 'Let $A$ be the set of all lower bounds of $B$'. But even this is not what you want to do. Fixing $A$ to be the set of lower bounds of $B$ can't help you at all, since the only interesting thing you can say about $A$ is that it has a greatest element ($\inf B$), which is equivalent to $B$ having a greatest lower bound. You certainly can't apply the greatest lower bound property to $A$ - you don't even know that $A$ is bounded and $\inf A$, if it exists, is certainly unrelated to $B$.
At some point, you have to apply the greatest lower bound property to some set $C\subset S$, since you can't conclude that $S$ has the least upper bound property if you don't know that it has the greatest lower bound property (e.g., $\mathbb Q$ does not have the greatest lower bound property), but you have to apply it to a set that you know has a greatest lower bound; i.e., a set that is bounded below. Furthermore, it's going to have to be a set of elements that are $\ge$ the elements of $B$; otherwise, it'll have nothing to do with upper bounds of $B$ at all.
The solution, of course, is to fix $C$ to be the set of upper bounds for $B$. Now we're trying to show that $C$ has a least element.
There also exists an element $b\in B$ for all $a$ such that $a\le b$, so $A$ is bounded above (by $b$).
First of all, we aren't interested in saying that $A$ (or $C$) is bounded above, since being bounded above doesn't tell us anything. Being bounded below, of course, tells us that a set has a greatest lower bound. So we want to show that $C$ is bounded below. Secondly, it is ambiguous whether you mean that there is some $b$ that works for all $A$ or whether there is a separate $b(a)$ for each $a$. Both are true, but only the first implies your conclusion.
I'd prefer to write, 'Fix an arbitrary $b\in B$. Then for each $c\in C$, $c$ is an upper bound for $B$ so, in particular, $b\le c$. So $C$ is bounded below by $b$.'
Since $S$ satisfies the greatest lower bound property, $\inf \hspace{2 pt} B = \alpha$ exists for all $a$ such that $a \leq \alpha \leq b$.
This is where you started to go off the rails. Knowing that $B$ has a greatest lower bound can tell you nothing about whether it has a least upper bound. For example, the set $\{3,3.1,3.14,3.141,3.1415,3.14159,\dots\}$ has a greatest lower bound but no least upper bound in $\mathbb Q$.
I think I've given you enough clues for you to finish the proof on your own. For reference, here is my proof of the statement:
Let $B$ be a non-empty subset of $S$ that is bounded above, and let $C$ be the set of all upper bounds for $B$. Fix $b\in B$; then, for each $c\in C$, $c$ is an upper bound for $B$ so, in particular, $b\le c$. So $C$ is bounded below by $b$, which means that it has a greatest lower bound $\gamma$. Since every $b\in B$ is a lower bound for $C$, $\gamma\ge b$ for each $b\in B$. So $\gamma$ is an upper bound for $B$, and is clearly the least upper bound since it is a lower bound for the set of upper bounds. $\Box$
The g.l.b. and l.u.b. from analysis that you mention are with respect to the usual partial order (in fact, total order) $\leq$. Indeed, we have $2 \leq 3 \leq 4 \leq 6$, so the g.l.b. w.r.t. $\leq$ is $2$ and the l.u.b. is $6$.
The problem at hand specifies a different partial order, namely $\preceq$ (or $\mid$). In this case, we have, for example, neither $3 \preceq 4$ nor $4 \preceq 3$. The only elements $x \in X$ such that $2 \preceq x$, $3 \preceq x$, $4 \preceq x$, and $6 \preceq x$ are $12$ and $24$, and $12 \preceq 24$, so $12$ is a l.u.b. for $\{2, 3, 4, 6\}$. (Like you note, $12$ is not an element of that subset!)
On the set $\Bbb Z_+$ of positive integers, again endowed with the divisibility partial order, the g.l.b. of a finite set of integers $A \subset \Bbb Z_+$ is, by definition, the greatest common divisor of the elements of $A$, and likewise the l.u.b. of $A$ is the least common multiple.
Best Answer
Consider the set $\{42\}$. It has a greatest lower bound and a least upper bound (both of which are $42$), but its subset $\varnothing$ has neither.