# A density lemma for families of sequences indexed by the unit interval

Suppose for every $$x \in [0, 1]$$, we have a subset $$S_x$$ of the natural numbers with asymptotic density $$1$$ such that if $$n \in S_x$$, there is an open neighbourhood $$U$$ of $$x$$ (depending on $$x$$ and $$n$$) such that $$n \in S_y$$ for all $$y \in U$$.

Question:

For any $$\varepsilon > 0$$ can I find a subset $$M$$ of $$[0, 1]$$ with $$\mu(M) > 1 - \varepsilon$$, and a subset $$K \subset \mathbb N$$ of positive upper density satisfying the following condition?

• For all $$x \in M$$, there exists some $$N > 0$$ such that $$K \cap [N, \infty)$$ is a subset of $$S_x \cap [N, \infty)$$.

A word on motivation: This question arose in trying to prove this result on sequences of “almost equicontinuous” functions. The result as stated turns out to be false as shown by Mateusz Kwaśnicki in the comments and Iosif Pinelis in his answer, but I believe if this lemma is true, I can get a subsequence that converges in measure to some function $$f$$, not necessarily continuous.

Define $$S_x=\{n\colon \langle n!x\rangle>\frac 1n\}$$, where $$\langle \cdot\rangle$$ is the fractional part of $$\cdot$$. Another way to think of this is you can (essentially uniquely) write a number as $$x=\sum_{n=2}^\infty \frac{a_n(x)}{n!},$$ where $$a_n(x)\in\{0,\ldots,n-1\}$$. This is the expansion of $$x$$ where the first digit is base 2, the next digit is base 3 etc. $$S_x$$ is the set of places where $$x$$ does not have a zero. Notice that if $$x$$ is chosen uniformly with respect to Lebesgue measure, then the random variables $$a_n(x)$$ are uniform and independent on $$\{0,\ldots,n-1\}$$. So we see that $$S_x$$ has full density for almost all $$x$$.
Now if $$K$$ is a subset of $$\mathbb N$$ of positive density, the probability that $$a_n(x)\ne 0$$ for each $$n\in K$$ is $$\prod_{n\in K}\frac{n-1}n=\prod_{n\in K}(1-\tfrac 1n).$$ Since $$K$$ has positive density, that probability is 0.
In particular, for any $$M$$ of positive measure, any $$K$$ of full density and any $$N$$, $$K\cap [N,\infty)$$ still has positive density, so we may apply the above to $$K\cap [N,\infty)$$ to see that the set of $$x$$'s in $$M$$ where $$K\subset S_x$$ has measure 0.
• Hmm I think there might be a big difference between $S_x$ having full density for almost all $x$, versus for every $x$ though. Do you think it matters? May 26, 2021 at 7:12
• @NateRiver : I just deleted my comment about redefining $S$ for the bad $x$’s. That violates the openness condition. I think I can see a way to get both, but there’s a little work needed. May 26, 2021 at 15:06
• Yes it does seem that the condition I gave (that $K$ is eventually equal to $S_x$) is too strong. Maybe I need a different lemma. May 27, 2021 at 0:52