Compact subsets for a given topology I am currently studying topology in real analysis and have a problem that I'm stuck on and really don't understand completely.
Question: 
Consider the topology $ \tau$  = {$\emptyset$ ,$\mathbb{R}$}  $\cup$  {$ (a,\infty$)}$_{a \in \mathbb{R}}$  in  $\mathbb{R}$
i) What are the compact subsets of ($\mathbb{R},\tau$}? 
I understand that a set is compact if every open cover has a finite subcover. So would the compact subsets of ($\mathbb{R},\tau$} just be the $\emptyset $?  As any open interval in $\mathbb{R} $ {$(a,\infty)$} does not have a finite subcover.  Not too sure if this is the correct... Am i wrong here?
ii) What is an example of a function $f : \mathbb{R} \rightarrow \mathbb{R} $ that is continuous wrt the topology in both the domain and co-domain such that
\begin{align}
 f(x) \leq -x      
\end{align}
$\forall x \in \mathbb{R} $  or does such a function even exist?
Couldn't I just take the $f(x) = -x-1$ , then $-x-1 \leq -x$   or is this completely wrong?
I am new to topology and don't really have a strong understanding here, any help would be appreciated.
 A: i) Every finite subset of any topological space is compact. You seem to be thinking that “subset” is the same thing as “an element of $\tau$”. Not true.
ii) There is no such function. Note that $f^{-1}\bigl((a,\infty)\bigr)=\{x\in\mathbb R\mid f(x)>a\}$. But, if $x\in f^{-1}\bigl((0,\infty)\bigr)$, then $-x\geqslant f(x)>a$. So, $f^{-1}\bigl((a,\infty)\bigr)$ consists only of numbers smaller than $-a$ and therefore it can only belong to $\tau$ if it is empty. But if you take $a>f(0)$, then it is clear that $0\in f^{-1}\bigl((0,\infty)\bigr)$ and therefore $f^{-1}\bigl((0,\infty)\bigr)\neq\emptyset$.
A: The question is about compact subsets of $\Bbb R$, not compact subsets from the topology $\tau$, as you seem to think.
If a set $A$ has a minimum $m$ and we have an open cover of $A$ then some set $(a,\infty)$ from that open cover must contain $m$ and then that open set then contains all of $A$: $$x \in A \implies a < m \le x \implies x \in (a, \infty)$$ 
So sets with a minimum are compact: every open cover has a finite (one-element even) subcover.
On the other hand, if $A$ is non-empty and has no minimum, then either $m= \inf A$ is finite or $-\infty$. In the former case define $a_n = m+\frac{1}{n}$, in the latter $a_n = -n$ and then note that $\{(a_n, \infty): n \in \Bbb N)\}$ is an open cover of $A$ without a finite subcover.
So $A \subseteq (\Bbb R, \tau)$ is compact iff $\min A \in A$ exists.
