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?



Exhaustions of product subsets by smaller product subsets
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.


