# Exhaustions of product subsets by smaller product subsets

Let $$X$$ be a compact metric space, $$A,B\subset X$$ be subsets and $$f\colon X\times X\to \mathbb{R}$$ a continuous function that is strictly positive on $$A\times B$$. Do there exist increasing sequences of subsets $$A_1\subseteq A_2\subseteq \dots$$ and $$B_1\subseteq B_2\subseteq \dots$$ such that:

• $$A=\bigcup_{n\in\mathbb{N}}A_n$$ and $$B=\bigcup_{n\in\mathbb{N}}B_n$$;
• for every $$n\in\mathbb{N}$$, the restriction of $$f$$ to $$A_n\times B_n$$ is bounded away from zero?

We can also rephrase the question as follows. Let $$X,A,B$$ as before and let $$C\subset X\times X$$ be a closed subset such that $$(A\times B)\cap C= \emptyset$$. Do there exist increasing sequences of compact sets $$K^A_1\subseteq K^A_2\subseteq \dots$$ and $$K^B_1\subseteq K^B_2\subseteq \dots$$ such that:

• $$A\subseteq\bigcup_{n\in\mathbb{N}}K^A_n$$ and $$B\subseteq\bigcup_{n\in\mathbb{N}}K^B_n$$;
• $$(K^A_n\times K^B_n)\cap C = \emptyset$$ for every $$n\in\mathbb{N}$$?

If true, this sounds like a useful lemma and I would not be surprised if it already appeared somewhere else. I need this fact (or something similar) to reduce some statement about operators on product spaces to the compact case, but I thus far failed to find a proof or a counterexample. Any suggestion?

Take $$A,B$$ complementary dense subsets of $$X$$ (say, rationals and irrationals in $$[0,1]$$). $$d(a,b)$$ is strictly positive on $$A\times B$$.
Suppose $$A$$ increasing join of the $$A_n$$, dually $$B_n$$, with positive distance between $$A_n,B_n$$ i.e. between their closures $$A'_n,B'_n$$.
Then Baire assures that for one $$n$$ (and then the successive ones), $$A'_n$$ (or $$B'_n$$) contains a open set. By density, it contains a point $$b$$, which must be in some $$B_m$$, and so for index $$j$$ greater than $$n,m$$ $$A'_j,B'_j$$ i.e. $$A_j,B_j$$ cannot have positive distance.
Corollary: in any partition as above, at least one set cannot be $$\sigma$$-compact.