$X$ is locally compact, show that $A$ is open in $X$ iff $A\cap K$ is open in $K$ for all $K$ compact in $X$. I've been trying to prove that if $X$ is locally compact, then $A$ is open in $X$ iff $A\cap K$ is open in $K$ for all $K$ compact in $X$.
The definition that I've been using is that $X$ is locally compact iff every point $x$ has a compact neighborhood basis.
One implication is obvious, but for the second one I've been trying to use that $x\in A$ has a neighborhood basis $B$ of compact, so that $x\in A\cap K$ for all $K\in B$, and that it is open in $K$ so $(A\cap K)^\circ=A\cap K=A^\circ\cap K$ (the interior operetor is applied in the topological space $K$), so $x\in A^\circ$, and then $A$ is open, but I think that the equality $$
(A\cap K)^\circ=A\cap K=A^\circ\cap K
$$
does not hold.
Is this proof right? If not, please any hints would be very helpfull.
Thanks in advance.
 A: Hint: Notice that for every compact $K$ we have $A\cap K^{\circ}$  open in $K^{\circ}$, and therefore an open subsaet of $X$. Now $X= \cup_{K} K^{\circ}$ so $A = \cup_K ( A\cap K^{\circ}) $ is open.
A: Let $X$ be locally compact and $A \subset X$ such that for all compact $K\subset X$, $A \cap K$ is open in $K$. Let $x \in A$, we wish to show there is some neighborhood $x \in U$ such that $U \subset A$. As $X$ is locally compact we a guaranteed a compact $N_x$ such that $x \in N_x^\circ$, the interior. As $N_x$ is compact, $A \cap N_x$ is open in $N_x$, that is there exists an open set $O$ with $O \cap N_x = A \cap N_x$. Then we have: 
$$O \cap N_x^\circ \subset O \cap N_x =A \cap N_x \subset A $$
As $x \in O \cap N_x^\circ \subset A$ and as $O \cap N_x^\circ$ is the intersection of open sets we have found the desired neighborhood and conclude $A$ must be open.
A: No, this is not correct. It is not true in general that the interior of $A\cap K$ in $K$ is equal to (or is a subset of) $A^\circ\cap K$. For instance, take $X=\mathbb{R}^2$, $K=\{(a,0)\in X\,|\,a\in[0,1]\}$ and $A=K$. Then the interior of $A\cap K$ in $K$ is $K$, but $A^\circ\cap K=\emptyset\cap K=\emptyset$.
