Let $X$ be a locally convex topological vector space over $\mathbb{R}$, $a,b\in X$, and let $Y$ be a closed, subspace of $X$, such that: $$Y\cap\left\{(1-t)a+tb: \ t\in\mathbb{R}\right\}=\emptyset.$$
Prove that there exists a continuous, linear functional $f\in X$, such that $\min\left\{f(a),f(b)\right\}=2015$ and $f(Y)=\left\{0\right\}$.
My idea is to use the theorem on analytic separation of convex sets.
$X$ is a topological vector space. Denote $A:=\left\{(1-t)a+tb: \ t\in\mathbb{R}\right\}$. Then we have $\emptyset\neq A,Y\subset X$, both convex and disjoint (by assumptions). $A$ is closed.
I also need a compactness of $Y$ (I don't know how to get it). Since $X$ is locally convex, then there exists $f\in X^*$ and $\alpha,\beta\in\mathbb{R}$, such that $f(Y)<\alpha <\beta< f(A)$ and this would give as statment.
But if this is not true that $Y$ is compact and we can't apply above theorem, please tell me the other way to solution.