My text book says
A set K ⊆ R is compact if every sequence in K has a subsequence that converges to a limit that is also in K.
Wondering how to formalize this statement, my trial was this.
($\forall$$a_n$$\in K$) ($\forall$$\epsilon$>0)($\exists$M$\in$N)($\forall$k≥M) |$a_{n_k}$ - $\alpha$ | < $\epsilon$ & $\alpha$ $\in$ K
But, I'm not confident of quantifying sequence.
So, what is an adequate formalization?
To rewrite the condition in text, for all sequences in K, there exists a subsequence, with limit in K. In symbols that's $\forall (a_n) \in K, \exists (i_n), \lim a_{i_n} \in K$ and that's all. You may also want to expand what $\lim \in K$ means. This is the usual $\exists \alpha \in K, \forall \varepsilon, \exists N, \forall n > N, |a_{i_n}-\alpha| < \varepsilon$.
The nice thing about maths is that it's all plug and play. You can start writing the definition of compactness using high level concepts such as a limit. You can later replace the limit with its definition just by renaming the variables it uses.