# Proof concerning compactly generated spaces

I lately looked up the definition of being a compactly generated space on Wikipedia:

Definition: A topological space $X$ is compactly generated if it satisfies the following condition: A subspace $A$ is closed in $X$ if and only if $A \cap K$ is closed in $K$ for all compact subspaces $K \subset X$.

In the second sentence it says: "Equivalently, one can replace closed with open in this definition". I tried to show that this is actually equivalent, but I did not succeed. Bascially you have:

$A$ open $\iff$ $(X\backslash A)$ closed $\iff \forall K$ compact: $K \cap (X\backslash A)$ closed

What one would need is pulling the set difference out, namely:

$\forall K$ compact: $K \cap (X\backslash A)$ closed $\iff \forall K$ compact: $X\backslash(K \cap A)$ closed $\iff \forall K$ compact: $K \cap A$ open.

But is the first equivalence true? I could not find a justification for it, probably I am not seeing a simple argument here.

You don't need that first equivalence. $K\cap(X\setminus A)$ is closed in $K$ iff
$$K\setminus\Big(K\cap(X\setminus A)\Big)=K\cap A$$ is open in $K$.