Real Analysis - Supremum Infimum Proof I am self teaching analysis and wanted to make sure that the following proof made sense;
Question:
Suppose D is a non empty set and that $f:D\rightarrow$$\mathbb{R}$
and $g:D\rightarrow$$\mathbb{R}$.
Prove that: If for every $x,y\in D$, $f(x)\leq g(y)$ then $f(D)$
is bounded above and $g(D)$ is bounded below. Furthermore $sup$ $f(D)$ $\leq$ $inf$ $g(D)$
Attempt:
Assume there exists a set such as in the question.
Since $f(x)\leq g(y)$ $\forall x,y\in D$, $f(x)$ is bounded above
and $g(y)$ is bounded below.
Now, let $supf(D)=A$ and let $infg(D)=B$. Then $\forall x\in D,$
$f(x)\leq A$ and $\forall y\in D,$ $g(y)\geq B$.
Assume: $\lnot(A\leq B)$ $\Leftrightarrow$ $A>B$ and $A\neq B$
But if $A>B$, then $supf(D)>infg(D)$. 
This means $\exists g(D)\leq supf(D)$ which in turn means $\exists f(D)>g(D)$.
But this is a contradiction as $\forall x,y\in D,$ $f(D)\leq g(D)$.
So it follows $A\leq B$ 
Thank you!
 A: In where you want to argue that $A \le B$, it is quite unclear what is $f(D)$, $g(D)$. $D$ is a set, so $f(D)$ would be understood as a set. But then it is not clear what $f(D) > g(D)$ mean. 
The proof would go like this: assume the contrary that $A >B$. Then there is $C$ so that $A>C>B$. By definition of infimum, there is $y\in D$ so that $C>g(y)$. By the definition of supremum, there is $x\in D$ so that $f(x) >C$. Then we have 
$$f(x) > C> g(y)$$
and this contradicts to your assumption. Thus $A> B$ is impossible and you are done. 
Method 2:
You can argue directly by definition. You know that 
$$f(x) \le g(y)$$
for all $x, y\in D$. Fix $y$. Then $g(y)$ is an upper bound for $\{f(x) : x\in D\}$. So 
$$\sup_{x\in D} f(x) \le g(y).$$
by definition. of supremum. Now this equation implies that the number $\sup_{x\in D} f(x)$ is a lower bound of $\{g(y) : y\in D\}$. Thus 
$$\sup_{x\in D} f(x) \le \inf_{y\in D} g(y).$$
A: I stopped reading when I saw "This means ...". 
Regardless of the notational confusion (the symbol $f(D)$ denotes the range of $f$, which is not a number), you may want to say instead something like "$A > B$ only if there exist some $B < C < A$ and some $x,y \in D$ such that 
$$
B \leq g(x) < C < f(y) \leq A"
$$
and conclude thereof.
