1 Introduction

Various mathematical problems in topology involve instances of the following fundamental question : Given a topological space X and another topological space Y, when does X (topologically) embed in Y? According to the classical Menger-Nöbeling theorem, a compact metric space X of (Lebesgue covering) dimension less than \(\frac{r}{2}\) admits a topological embedding into \([0,1]^r\) (see [17, Theorem 5.2]).

In topological dynamics, the analogous fundamental embedding questions take the following form: Given a group G that acts on two topological spaces X and Y, when does there exist an equivariant embedding of X into Y, namely a continuous function \(f: X \rightarrow Y\) that is a homeomorphism from X onto the image \(f(X) \subseteq Y\) and so that \(f(g(x)) = g(f(x))\) for every \(g \in G\) and every \(f \in X\). In this paper, the topological spaces involved are always assumed to be compact and metrizable. So a continuous function \(f: X \rightarrow Y\) defines a homeomorphism from X onto the image \(f(X) \subseteq Y\) if and only if it is injective. In this paper, by a topological dynamical system we mean a pair (GX), where G is a topological group that acts by homeomorphisms on a compact metrizable space X. When \(Y= ([0,1]^r)^G\) for some group G is a Tychonoff cube and the action of the group G on \(Y= ([0,1]^r)^G\) is the G-shift (see Sect. 2.4) for a precise definition), the existence of an equivariant embedding of X into Y is equivalent to the existence of a continuous injective mapping \(f:X\rightarrow ([0,1]^{d})^G\) for which it holds \(f(gx)_h=f(x)_{hg}\) for all \(x \in X\) and \(g,h \in G\). The problem of equivariantly embedding into such a space Y, known as a (\(G-\)) r-cubical shift has quite a long history and there is a fair amount of literature on this problem, mostly for the case where the group G is generated by a single homeomorphism (that is, \(G= {\mathbb {Z}}\) or \(G= {\mathbb {Z}}/ m{\mathbb {Z}}\) for some \(m \in {\mathbb {N}}\)) or by finitely many commuting homeomorphisms (so that G is a finitely generated abelian group). We review some of this history in the next paragraph.

In [18] Jaworski showed that for any action of the group \(G= {\mathbb {Z}}\) on any finite-dimensional compact metric space X there exists an equivariant embedding of X into \([0,1]^G\), under the assumption that the generator of \({\mathbb {Z}}\) corrsponds to an aperiodic homeomoprhism of X, where a homeomorphism \(T:X \rightarrow X\) is called aperiodic if \(T^{n}x\ne x\) for all \(x\in X\) and nonzero integer n. Later Nerurkar [26] showed that the aperiodicity assumption in Jaworski’s result can be weakened to the assumption that there are at most finitely many periodic points with the same period. Gutman [10] showed that the aperiodicity assumption in Jaworski’s result can be further weakened to the assumption that the set of periodic point in X of period N has dimension strictly less that \(\frac{Nr}{2}\) for all N. An extension of this result for actions of finitely generated abelian groups was achieved by Gutman et al. [13].

Our main result is a generalization of the above results where the acting group is arbitrary. Moreover as elucidated by Theorem  1.4, our result is sharp in a strong sense.

Theorem 1.1

Let (GX) be a topological dynamical system where X is a finite-dimensional compact metric space. Let \(r\in {\mathbb {N}}\). Suppose that for every \(N \in {\mathbb {N}}\) it holds

$$\begin{aligned} \dim (G,X)_N < \frac{rN}{2}, \end{aligned}$$
(1)

where

$$\begin{aligned} (G,X)_N := \left\{ x \in X:~ |G \cdot x| \le N\right\} \text{ and } G\cdot x= \{gx : g \in G \}. \end{aligned}$$

Then a generic continuous function \(f:X \rightarrow [0,1]^r\) induces a G-equivariant topological embedding \(f^{G}:X \rightarrow ([0,1]^r)^G\).

For the definition of generic, see Sect. 2.5.

Theorem 1.1 implies in particular that if a finite group G acts freely on X and \(\dim X < \frac{r}{2}|G|\) then X embeds equivariantly into \((([0,1])^r)^G\). The case where G is the trivial group coincides with the Menger-Nöbeling theorem.

Remark 1.2

Let G be a group which does not have finite index subgroups (e.g. an infinite simple group), then Condition (1) holds for any t.d.s (GX), \(r,N\in {\mathbb {N}}\). Indeed for \(x\in X\), let \({{\,\textrm{Fix}\,}}_G(x)=\{g\in G|\,gx=x\}\). It is easy to see that there is a 1-1 correspondence between (left) cosets of \({{\,\textrm{Fix}\,}}_G(x)\) and Gx. Thus if \(|G \cdot x|<\infty \), then \({{\,\textrm{Fix}\,}}_G(x)\) is of finite index in G. We conclude that for a group G which does not have finite index it holds \( (G,X)_N=\emptyset \) for all \(N\in {\mathbb {N}}\).

Remark 1.3

When G is an infinite sofic group (for instance \(G={\mathbb {Z}}\)), it is not possible to remove the assumption that X is finite dimensional in Theorem 1.1. Although in this case any compact metrizable space X embeds (topologically) in \([0,1])^G\), there is a further obstruction to the existence of an equivariant embedding, namely the mean dimension of (GX). Mean dimension is an isomorphism invariant of topological dynamical systems introduced by Gromov [9]. Heuristically, whereas topological entropy measures the number of bits per unit of time required to describe a point in a system, mean dimension measures the required number of parameters per unit of time. The initial systematic development of mean dimension theory was carried out by Lindenstrauss and Weiss in the seminar paper [25]. We refrain from defining mean dimension here and refer the interested read to [25] and [23]. Lindenstrauss and Tsukamoto formulated a conjecture in [24] regarding sufficient conditions for the existence of an equivariant embedding of a \({\mathbb {Z}}\)-dynamical system in the \({\mathbb {Z}}\)-shift on \(([0,1]^r)^{\mathbb {Z}}\). The conjectured sufficient conditions involve mean dimension and dimensions of periodic points. For finite dimensional \({\mathbb {Z}}\)-systems, the Lindenstrauss and Tsukamoto conjecture reduces to Gutman’s result [10]. Additional cases of the conjecture were established in [11, 12] but in full generality the conjecture is still open. In [14] a general embedding conjecture that generalizes the Lindenstrauss and Tsukamoto conjecture to \({\mathbb {Z}}^k\)-actions \((X,{\mathbb {Z}}^k)\) (\(k\in {\mathbb {N}}\)) first appeared explicitly. In the finite dimensional case, the conjecture is known to hold [13]. Some additional cases of the conjecture were established in [13, 14] but in full generality the conjecture is still open. In contrast to Theorem 1.1, the existing embedding theorems for infinite dimensional systems seem to rely heavily on the group structure of \({\mathbb {Z}}\) or \({\mathbb {Z}}^d\). Even the formulation of the embedding conjecture in [14] does not trivially extend to actions of non-commutative (say amenable) groups. For a free action (GX), it is still unknown having infinite mean dimension (when it is well-defined) is the only additional obstruction for the existence of an equivariant embedding into \(([0,1]^r)^G\) for some \(r \in {\mathbb {N}}\).

Complementing Remark 1.2, we have the following:

Theorem 1.4

(Sharpness of Theorem 1.1) Let \(N,r\in {\mathbb {N}}\). Let G be a group which has a subgroup \(G'\) of index N, then there exists a faithful t.d.s. (GX) so that \(\dim (G,X)_N = \lceil \frac{rN}{2}\rceil \) (thus Condition 1 does not hold ) and for all continuous functions \(f:X \rightarrow [0,1]^r\) the induced map \(f^{G}:X \rightarrow ([0,1]^r)^G\) is not injective.

We deduce Theorem 1.1 from the following theorem, our main auxiliary theorem:

Theorem 1.5

Let XY be compact metrizable spaces and let \(\mathcal {F}= \big (g_1,\ldots ,g_N\big )\) be an N-tuple of continuous injective functions from X to Y. For every \(f:Y \rightarrow [0,1]^r\), let \(f^\mathcal {F}:X \rightarrow ([0,1]^r)^N\) be given by

$$\begin{aligned}f^\mathcal {F}(x)_{i}= f(g_i(x)), ~i \in [N].\end{aligned}$$

For every partition \(\mathcal {P}\) of \(\mathcal {F}\) let

$$\begin{aligned} X_{\mathcal {P}} := \{ x\in X:~ \forall g_{i_1},g_{i_2} \in \mathcal {F},~ g_{i_1}(x)=g_{i_2}(x) ~\Leftrightarrow ~ \mathcal {P}(g_{i_1})=\mathcal {P}(g_{i_1})\}. \end{aligned}$$

Suppose that for every partition \(\mathcal {P}\) of \(\mathcal {F}\) it holds that

$$\begin{aligned} \dim X_{\mathcal {P}} < \frac{r}{2}|\mathcal {P}|. \end{aligned}$$
(2)

Then the set of functions \(f \in C(Y,[0,1]^{r})\) for which \(f^\mathcal {F}:X \rightarrow ([0,1]^{r})^N\) is injective is a dense \(G_\delta \) subset in \(C(Y,[0,1]^{r})\).

In addition to proving Theorem 1.1, our main auxiliary theorem has an important application related to the celebrated Takens embedding theorem. We now provide the necessary background.

Consider an experimentalist observing a physical system modeled by a \({\mathbb {Z}}\)-system (XT). It often happens that what is observed is the values of k measurements \(h(x), h(Tx), \ldots , h(T^{k-1} x)\), for a real-valued observable \(h :X \rightarrow {\mathbb {R}}\). One is led to ask, to what extent the original system can be reconstructed from such sequences of measurements (possibly at different initial points) and what is the minimal number k of delay-coordinates, required for a reliable reconstruction. This question has been treated in the literature by what today is known as Takens-type delay embedding theorems, essentially stating that the reconstruction of (XT) is possible for certain observables h, as long as the measurements \(h(x), h(Tx), \ldots , h(T^{k-1} x)\) are known for all \(x \in X\) and large enough k. Indeed the first result obtained in this area is the Takens delay embedding theorem [39]—for a compact manifold X of dimension d, it is a generic property (w.r.t. Whitney \(C^{2}\)-topology) for pairs (hT), where \(T:X\rightarrow X\) is a \(C^{2}\)-diffeomorphism and \(h:X\rightarrow \mathbb {{R}}\) a \(C^{2}\)-function, that the \((2d+1)\)-delay observation map

$$\begin{aligned}{}[h]_{0}^{2d} :X&\longrightarrow \mathbb {{R}}^{2d+1} \\ x&\longmapsto \big (h(x),h(Tx),\ldots ,h(T^{2d}x)\big ) \end{aligned}$$

is an embedding. The importance of Takens’ result, as evidenced by the great interest it met among mathematical physicists (see e.g. [15, 29, 33]), lies in the fact that the delay-observation framework which it suggested was and still is widely used by experimentalists (see e.g. [16, 22, 37, 38]). There have also appeared various mathematical generalization of the theorem [6, 10, 13, 19, 27, 30,31,32,33,34,35,36]. Furthermore recently a probabilistic point of view has been introduced to the theory [2,3,4].

Note Takens considered a setting where \(T:X\rightarrow X\) and \(h:X\rightarrow X\) are perturbed in order to achieve embedding. The paper [33] introduced a setup where the dynamics is fixed and only the observable is perturbed. Thus in order to achieve embedding, some conditions on periodic points are necessaryFootnote 1. Whereas [33] assumed some regularity conditions both on the dynamics and the observableFootnote 2, the paper [10] was the first to study the problem of delayed embedding for fixed dynamics in the purely topological setting. The main theorem of [10] implies that for a \({\mathbb {Z}}\)-system \(({\mathbb {Z}},X)\) with \(\dim (X)=d\) and \(\dim ({\mathbb {Z}},X)_n<\frac{1}{2}n\) for all \(n\le 2d\), for a generic function \(h\in C(X,[0,1])\), \([h]_{0}^{2d}\) is an embedding. In [13] a generalization to \({\mathbb {Z}}^k\)-systems was stated (without proof): For a subgroup \(A \subset {\mathbb {Z}}^k\) define \(X_A\subset X\) as the space of \(x\in X\) satisfying \(T^a x=x\) for all \(a\in A\). Assume a \({\mathbb {Z}}^k\)-system \(({\mathbb {Z}}^k,X)\) satisfies \(\dim (X)=d\) and \(\frac{\dim (X_A)}{[{\mathbb {Z}}^{k}:A]}<\frac{m}{2}\) for every subgroup A of \({\mathbb {Z}}^{k}\) with \([{\mathbb {Z}}^{k}: A]\le 2d\), then for a generic function \(f\in C(X,[0,1]^{m})\) it holds that

$$\begin{aligned} f_{2d}:X\rightarrow ([0,1]^{m})^{[0,2d]^{k}\cap {\mathbb {Z}}^{k}},\;\;x\mapsto (f(ix))_{i\in [0,2d]^{k}\cap {\mathbb {Z}}^{k}} \end{aligned}$$

is an embedding. Our last result is a generalization of the two above mentioned results to the context of finitely generated group actions.

Theorem 1.6

Let G be a finitely generated group, let \(S \subseteq G\) be a finite generating set for G, and let \(r \ge 1\) be a natural number. Let (GX) be a topological dynamical system with \(\dim (X) < + \infty \) such that for every \(N \in {\mathbb {N}}\) it holds

$$\begin{aligned} \dim (G,X)_N < \frac{rN}{2}.\end{aligned}$$

Let \(S^{\bullet 0} := \{e_G\}\) and given a natural number n, let

$$\begin{aligned} S^{\bullet n} = \left\{ s_1 \cdot \ldots s_n ~:~ s_1,\ldots ,s_n \in S\right\} \text{ and } S^{ \le \bullet n} = \bigcup _{k=0}^n S^{\bullet n} \end{aligned}$$
(3)

Let M be the smallest natural number which satisfies \(M > \frac{2 \dim (X)}{r}\), and let \(F= S^{ \le \bullet (M-1)}\). Then the set of continuous functions \(f:X\rightarrow [0,1]^{r}\) so that

$$\begin{aligned} f^{F}:X\rightarrow ([0,1]^{r})^{F},\;\;x\mapsto (f(gx))_{g\in F} \end{aligned}$$

is an embedding is comeagre in \(C(X,[0,1]^{r})\).

Structure of the paper: Section 2 contains basic definitions. In Sect. 3.1, Theorem  1.1 is proven assuming Theorem 1.5. In Sect. 3.2, Theorem  1.4 is proven. Section 4 contains the proof of Theorem 1.6 assuming Theorem 1.5 as well as Example 4.3 showing that if the group is not finitely generated then the conclusion of Theorem  1.6 does not necessarily hold. Section 5, where Theorem 1.5 is proven, is the main technical part of the article.

2 Preliminaries

2.1 Standing notation

For \(k \in {\mathbb {N}}\) denote

\([k] = \{1,\ldots k\}\) . Let X be a set. Denote

$$\begin{aligned} X^\Delta := X \times X \setminus \Delta _X, \text{ where: } \Delta _X =\{ (x,x) :~ x \in X\} \subseteq X \times X.\end{aligned}$$

Let \(\pi _1,\pi _2:X\times X \rightarrow X\) denote the canonical projections given by \(\pi _j(x_1,x_2)=x_j\) for \(j \in [2]\).

2.2 Dimension

Let X be a metric space. Let \(\alpha \) and \(\beta \) be finite open covers of X.

We say that \(\beta \) refines \(\alpha \), denoted \(\beta \succ \alpha \), if every member of \(\beta \) is contained in a member of \(\alpha \). The join of \(\alpha \) and \(\beta \) is defined as \(\alpha \vee \beta =\{A\cap B|\ A\in \alpha ,B\in \beta \}\). Similarly, one may define the join \(\bigvee _{i=1}^{n} \alpha _{i}\) of any finite collection of open covers \(\alpha _{i}\), \(i=1,\dots , n,\) of X. Assume \(\alpha \) consists of the open sets \(U_{1}, U_{2}\ldots , U_{n}\). Define its order by \({{\,\textrm{ord}\,}}(\alpha )= \max _{x\in X} \sum _{U\in \alpha } 1_{U}(x)-1\) and let \({{\,\textrm{D}\,}}(\alpha )\) stand for the minimum order with respect to all covers \(\beta \) refining \(\alpha \), i.e., \({{\,\textrm{D}\,}}(\alpha )= \min _{\beta \succ \alpha } {{\,\textrm{ord}\,}}(\beta )\). The Lebesgue covering dimension is defined as

$$\begin{aligned} \dim (X)= \sup _{\alpha } {{\,\textrm{D}\,}}(\alpha ), \end{aligned}$$

where the supremum is over all finite open covers of X. In this article dimension always refers to Lebesgue covering dimension. Note that Lebesgue covering dimension can only take values in \({\mathbb {N}}\cup \{0,\infty \}\).

2.3 Dynamical systems

A topological dynamical system (t.d.s.) is a pair (GX) where G is a group equipped with the discrete topologyFootnote 3, (Xd) is a compact metric spaceFootnote 4 and G acts on X such that the action map \(G\times X\rightarrow X\) given by \((g,x)\mapsto gx\) is continuous. A t.d.s. (GX) is also referred to as a G-system or a G-(group) action.

The orbit of x under G is denoted by \(G\cdot x:= \{gx : g \in G \}\). For \(F\subset G\), similarly denote \(F\cdot x:= \{gx : g \in F \}\). The set of periodic points of period not bigger than N of (GX) is denoted by

$$\begin{aligned} (G,X)_N := \left\{ x \in X:~ |G \cdot x| \le N\right\} . \end{aligned}$$

Define for \(x\in X\)

$$\begin{aligned} {{\,\textrm{Fix}\,}}_G(x)=\{g\in G|\,gx=x\}. \end{aligned}$$

The kernel of the action (GX) is the set

$$\begin{aligned} {{\,\textrm{Ker}\,}}(G,X) := \{ g \in G:~ ~\forall x \in X~~ gx =x \}=\bigcap _{x\in X} {{\,\textrm{Fix}\,}}_G(x). \end{aligned}$$

Note \({{\,\textrm{Ker}\,}}(G,X)\) is a normal subgroup of G. A t.d.s. (GX) is called faithful if \({{\,\textrm{Ker}\,}}(G,X)\) is the trivial subgroup.

A morphism between two dynamical systems (GX) and (GY) is given by a continuous mapping \(\varphi :X\rightarrow Y\) which is G-equivariant (\(\varphi (gx)=g\varphi (x)\) for all \(x\in X\) and \(g\in G\)). If \(\varphi \) is an injective morphism, it is called an embedding.

2.4 Cubical shits and orbit maps

For any space Z, the group G acts on the space \(Z^G\) by \(g(y)_h = y_{hg}\) for all \(y \in Z^G\) and \(g,h \in G\). For any space Z, the group G acts on the space \(Z^G\) by \(g(y)_h = y_{hg}\) for all \(y \in Z^G\) and \(g,h \in G\). When \(Z=[0,1]^r\), then this action is referred to as a G-shift. When \(Z=[0,1]^r\), then the system \((([0,1]^{d})^G,{{\,\textrm{shift}\,}})\) is called the (\(G-\)) r-cubical shift. A continuous mapping \(f:X\rightarrow [0,1]^{r}\) induces a continuous G-equivariant mapping \(f^G:(G,X)\rightarrow (G,([0,1]^{r})^G)\) given by \(x\mapsto \big (f(g x)\big )_{g\in G}\), known as the orbit-map.

2.5 Genericity

We denote the space of continuous functions from X to \([0,1]^r\) by \(C(X,[0,1]^r)\). equipped with the topology of uniform convergence. By the Baire category theorem ( [20, Theorem 8.4]) the space \(C(X,[0,1]^{r})\), is a Baire space, i.e., a topological space where any comeagre set is dense. We refer to a property that holds on a comeagre set of \(C(X,[0,1]^{r})\) as generic.

2.6 Partitions

Let \(\mathcal {P}\) be a partition of set S. For every \(s \in S\) denote by \(\mathcal {P}(s)\) the unique element \(P \in \mathcal {P}\) such that \(s \in P\). Let \(\mathcal {P}\) and \({\tilde{\mathcal {P}}}\) be two partitions of the same set. One says \({\tilde{\mathcal {P}}}\) is finer than \(\mathcal {P}\), \({\tilde{\mathcal {P}}} \succeq \mathcal {P}\), if for every \({\tilde{P}} \in {\tilde{\mathcal {P}}}\), there exists \(P \in \mathcal {P}\) such that \({\tilde{P}} \subseteq P\).

2.7 Partition compatible subsets

Definition 2.1

Let XY be compact metrizable spaces and let \(\mathcal {F}= \big (g_1,\ldots ,g_N\big )\) be an N-tuple of continuous functions from X to Y. Suppose \(x\in X\). Define an equivalence relation on \(\mathcal {F}\) by

$$\begin{aligned} g_i\sim _x g_j\, {\mathop {\Leftrightarrow }\limits ^{\triangle }} g_i(x)=g_j(x). \end{aligned}$$

We denote by \(x_\mathcal {F}\) the x-induced partition of \(\mathcal {F}\) the partition of \(\mathcal {F}\) generated by the equivalence classes of \(\sim _x\).

Let \(\mathcal {P}\) be a partition of \(\mathcal {F}\). For \(W\subset X\) define the \((\mathcal {P},\mathcal {F})\)-compatible subset by

$$\begin{aligned} W_{\mathcal {P}} = \left\{ x\in W ~:~ x_\mathcal {F}=\mathcal {P}\right\} . \end{aligned}$$
(4)

Definition 2.1 has a natural generalization to functions of two variables which we now present.

Definition 2.2

Let XY be compact metrizable spaces and let \(g:X \rightarrow Y\) be a function. For \(j \in [2]\), define the function \(g^{(j)}:X \times X \rightarrow Y\) by

$$\begin{aligned} g^{(j)}(x_1,x_2) = g(x_j). \end{aligned}$$

Definition 2.3

Let XY be compact metrizable spaces and let \(\mathcal {F}= \big (g_1,\ldots ,g_N\big )\) be a finite ordered set of continuous functions from X to Y. Define the induced 2N-tuple of continuous functions from \(X\times X\) to Y by

$$\begin{aligned} {\hat{\mathcal {F}}}= \big (g_1^{(1)},g_1^{(2)},g_2^{(1)},g_2^{(2)},\ldots ,g_N^{(1)},g_N^{(2)}\big ) \end{aligned}$$

Let \({\hat{\mathcal {P}}}\) be a partition of \({\hat{\mathcal {F}}}\) and \({\hat{W}}\subset X^\Delta \). Following (4), we may define the \(({\hat{\mathcal {P}}},{\hat{\mathcal {F}}})\)-compatible subset by

$$\begin{aligned} {\hat{W}}_{{\hat{\mathcal {P}}}} = \left\{ (x,y)\in {\hat{W}} ~:~ {(x,y)}_{{\hat{\mathcal {F}}}}={\hat{\mathcal {P}}} \right\} . \end{aligned}$$
(5)

2.8 Generating sets

Given a subset S of a group G and \(n\in {\mathbb {N}}\) we denote by \(S^{-1}\) the set of inverses of elements of S and

$$\begin{aligned} S^{\bullet n} = \{ s_1\cdot \ldots \cdot s_n :~ s_1,\ldots ,s_n \in S\}.\end{aligned}$$

We denote the identity element of G by \(e_G\), and \(S^{\bullet 0} := \{e_G\}\).

Definition 2.4

A subset \(S \subseteq G\) is a generating set for the group G if

$$\begin{aligned} G = \bigcup _{n=1}^\infty \left( S \cup S^{-1} \cup \{e_G\} \right) ^{\bullet n}. \end{aligned}$$

3 Embedding finite-dimensional systems into cubical shifts

3.1 Proof of the main theorem

Proof of Proof of Theorem 1.1, assuming Theorem 1.5

Note one may assume w.l.o.g. that (GX) is faithful by considering the induced t.d.s. \((G/{{\,\textrm{Ker}\,}}(G,X),X)\). If G is a finite group, then one may directly apply Theorem 1.5 with \(X=Y\) and \(\mathcal {F}= G\) to deduce the conclusion.

Assume G is infinite. Note one may assume w.l.o.g. that G is countable. Indeed as (GX) is faithful, there is an injective group homomorphism \(i:G\rightarrow {{\,\textrm{Homeo}\,}}(X)\), where \({{\,\textrm{Homeo}\,}}(X)\) is the group of homeomorphisms of X, which is Polish when equipped with the supremum (uniform) metric ([20, Subsection 9.B (8)]). Thus one may find a dense (w.r.t. the supremum metric) subgroup \(G' < i(G)\), where \(G'\) is countable. In particular for every \(x \in X\), \(|G' \cdot x|= |G \cdot x|\), and so for every \(N \in {\mathbb {N}}\),

$$\begin{aligned}(G,X)_N = \{ x \in X: |G' \cdot x| \le N\}.\end{aligned}$$

Hence, by possibly replacing G by \(G'\), one may assume that G is at most countable.

Choose \(N \in {\mathbb {N}}\) such that \(2\dim (X) < rN\). Let \(\epsilon >0\) and \(F \subset G\) a finite set. A set \(S\subset X\) is called \(\epsilon \)-separated if for every \(s_1\ne s_2\in S\), it holds \(d(s_1,s_2)\ge \epsilon \). For \(K \subset X\) denote by \({{\,\textrm{sep}\,}}_\epsilon (K)\) the maximal cardinality of an \(\epsilon \)-separated set in K. Define

$$\begin{aligned} X^{(F,\epsilon )} = \left\{ x \in X:~ G \cdot x = F \cdot x \text{ or } {{\,\textrm{sep}\,}}_\epsilon (F \cdot x) \ge rN \right\} . \end{aligned}$$

Using the definition of \({{\,\textrm{sep}\,}}_\epsilon (\cdot )\), it is not difficult to see that \(X^{(F,\epsilon )}\) is a closed subset of X. Recall notation (4). We claim that for every partition \(\mathcal {P}\) of F it holds that

$$\begin{aligned} \dim (X^{(F,\epsilon )}_{\mathcal {P}}) <\frac{r}{2}|\mathcal {P}|. \end{aligned}$$

Indeed, if \(|\mathcal {P} | < r N\) then for every \(x \in X^{(F,\epsilon )}_{\mathcal {P}}\) it holds that \(G \cdot x = F \cdot x\), as the condition \({{\,\textrm{sep}\,}}_\epsilon (F \cdot x) \ge rN\) implies that \(|F \cdot x) |\ge rN\) so the cardinality of the partition \(x_\mathcal {F}\) is strictly bigger than \(|\mathcal {P}|\), in particular \(x_\mathcal {F}\ne \mathcal {P}\). Thus in this case \(X^{(F,\epsilon )}_{\mathcal {P}} \subseteq X_{|\mathcal {P}|}\), and so

$$\begin{aligned} \dim (X^{(F,\epsilon )}_{\mathcal {P}}) \le \dim (X_{|\mathcal {P}|}) < \frac{r}{2}|\mathcal {P}|. \end{aligned}$$

Otherwise, \(|\mathcal {P}| \ge r N \) and so

$$\begin{aligned} \dim (X^{(F,\epsilon )}_{\mathcal {P}}) \le \dim (X) < \frac{r}{2}|\mathcal {P}|. \end{aligned}$$

For any finite set \(F \subset G\) and \(\epsilon >0\), by applying Theorem 1.5 with \(\mathcal {F}=F\), \(Y=X\) and \(X= X^{(F,\epsilon )}\), we conclude that the function \(f^F:X^{(F,\epsilon )} \rightarrow ([0,1]^r)^{F}\) is injective for \(f\in \mathcal {C}_{(F,\epsilon )}\) a comeagre subset of \(C(X,[0,1]^r)\).

Let \((F_n)_{n=1}^\infty \) be an increasing sequence of finite subsets of G such that \(\bigcup _{n=1}^\infty F_n = G\). Then \(X= \bigcup _{n=1}^\infty \bigcup _{m=1}^\infty X^{(F_n,\frac{1}{m})}\). Conclude that if \(f\in \bigcap _{n=1}^\infty \bigcap _{m=1}^\infty \mathcal {C}_{(F_n,\frac{1}{m})}\), which is a comeagre set then it induces a G-equivariant topological embedding \(f^{G}:X \rightarrow ([0,1]^r)^G\). \(\square \)

3.2 Sharpness of the main theorem

Proof of Theorem 1.4

Flores (see [8], a more accessible source is [7, Eng78, ß1.11H]) proved that \(C_n\), the union of all faces of dimension less than or equal to n of the \((2n+2)\)-simplex (the convex hull of \(2n + 3\) points in \({\mathbb {R}}^{2n+2}\) being affinely independent) does not embed into \(R^{2n}\). Note \(\dim (C_n) = n\). Let Z be a compact metric space with \(\dim (Z)= \lceil \frac{rN}{2}\rceil \) such that Z does not embed into \([0,1]^{rN}\). Let

$$\begin{aligned} X=(Z\times G/G'){\mathop {\cup }\limits ^{\circ }} \{0,1\}^G, \end{aligned}$$

with G acting trivially on Z, by multiplication on \(G/G'\) and by shift on \(\{0,1\}^G\). Clearly (GX) is faithful. Denote by \(eG'\) the coset of \(G/G'\) containing the identity of G. Denote by \(\textbf{0}\) the element of \(\{0,1\}^G\) consisting only of zeroes. Note that for any continuous function \(f:X \rightarrow [0,1]^r\), the induced map \(f^{G}:X \rightarrow ([0,1]^r)^G\) restricted to \(Z\times \{eG'\}\times \{\textbf{0}\} \) is determined by a continuous map \(F:Z\rightarrow ([0,1]^r)^{G/G'}\equiv [0,1]^{rN}\). As Z does not embed into \([0,1]^{rN}\), the map F is not injective and as a consequence \(f^{G}\) is not injective. Moreover

$$\begin{aligned} Z\times G/G'\times \{\textbf{0}\}\subset (G,X)_N\subset X. \end{aligned}$$

Thus \( \lceil \frac{rN}{2}\rceil =\dim Z\le \dim (G,X)_N \le \dim X= \dim Z= \lceil \frac{rN}{2}\rceil \) which implies \(\dim (G,X)_N = \lceil \frac{rN}{2}\rceil \). \(\square \)

4 Takens Embedding Theorem for finitely generated groups

Proof of Theorem 1.6 assuming Theorem 1.5

Let \(r \ge 1\), (GX) and M be as in the statement of the theorem. Note that by Theorem 1.5 (used for the case \(X=Y\)) it is enough to show that with \(F= S^{ \le \bullet (M-1)}\), for every partition \(\mathcal {P}\) of F it holds

$$\begin{aligned} \dim X_{\mathcal {P}} < \frac{r}{2}|\mathcal {P}|. \end{aligned}$$
(6)

Let \(d = \dim X\). Note that if \(\frac{r}{2}|\mathcal {P}|> d\), equivalently

$$\begin{aligned} |\mathcal {P}|>\frac{2d}{r}, \end{aligned}$$

so inequality (6) holds automatically. Otherwise, \(|\mathcal {P}| \le M-1\) and in particular \(M \ge 2\). Let \(x\in X_{\mathcal {P}}\). From the definition, it follows \(|F\cdot x|=|\mathcal {P}|\le M -1\). By Lemma 4.1 below applied to \(M-1\)

$$\begin{aligned} G\cdot x=F \cdot x. \end{aligned}$$
(7)

We thus have

$$\begin{aligned} X_{\mathcal {P}}\subset (G,X)_{|\mathcal {P}|}, \end{aligned}$$

as \((G,X)_{|\mathcal {P}|}=\{ x \in X:~ |G x| \le |\mathcal {P}|\}\) and if \(x\in X_{\mathcal {P}}\) then \(|G x|=|F x|=|\mathcal {P}|\). Thus

$$\begin{aligned} \dim X_{\mathcal {P}} \le \dim (G,X)_{|\mathcal {P}|}<\frac{r}{2}|\mathcal {P}|, \end{aligned}$$

as desired.

\(\square \)

Lemma 4.1

Let G be a group that acts on a set X, and let \(S \subseteq G\) be a finite generating set, and \(M \in {\mathbb {N}}\). Given a natural number n, recall the definition of \(S^{\le \bullet n}\) by (3), and let \(S^{\le \bullet 0}= \{e_G\}\). If \(x \in X\) and \(|S^{\le \bullet M} \cdot x| \le M\) then \(S^{\le \bullet (M-1)} \cdot x = G \cdot x\).

Proof

Since \(S^{\le \bullet (n-1)} \subseteq S^{\le \bullet n}\) for every n, it follows that

$$\begin{aligned}1=|S^{\le \bullet 0} \cdot x| \le |S^{\le \bullet 1} \cdot x| \le \cdots \le |S^{\le \bullet M} \cdot x| \le M.\end{aligned}$$

It follows by the pigeonhole principle that there exists \(1\le n \le M\) so that

$$\begin{aligned} |S^{\le \bullet (n-1)} \cdot x| = |S^{\le \bullet n} \cdot x|. \end{aligned}$$
(8)

As \(S^{\le \bullet n}=\bigcup _{s\in S}sS^{\le \bullet (n-1)}\), it follows that for every \(s \in S\) it holds

$$\begin{aligned} s (S^{\le \bullet (n-1)} \cdot x) \subseteq S^{\le \bullet (n-1)} \cdot x. \end{aligned}$$
(9)

Note that the map \(s\cdot :G\rightarrow G\) given by \(g \mapsto s\cdot g\) is an injective map for every \(s \in S\). By Eq. (9), when restricted to \(S^{\le \bullet (n-1)} \cdot x\) it is a self-map of a finite set. Thus by Eq. (8), it follows that \(s (S^{\le \bullet (n-1)} \cdot x) = S^{\le \bullet (n-1)} \cdot x\) for all \(s \in S\). Hence we also have \(s^{-1} (S^{\le \bullet (n-1)} \cdot x) = S^{\le \bullet (n-1)} \cdot x\) for all \(s \in S\). From this it follows that \(S^{\le \bullet (n-1)} \cdot x\) is a G-invariant subset of X that contains x, hence it must contain the G-orbit \(G \cdot x\). Since \(S^{\le \bullet (n-1)} \cdot x \subseteq G \cdot x\), it follows that we have equality. Since \(S^{\le \bullet (n-1)} \subseteq S^{\le \bullet M-1} \subseteq G\), it holds

$$\begin{aligned} G\cdot x= S^{\le \bullet (n-1)}\cdot x \subseteq S^{\le \bullet (M-1)} \cdot x \subseteq G \cdot x, \end{aligned}$$

So \(S^{\le \bullet (M-1)} \cdot x= G \cdot x\) as desired. \(\square \)

Remark 4.2

From Theorem 1.6 it follows that for any natural numbers \(d,r \in {\mathbb {N}}\) and finitely generated group G there exists an integer \(N_{d,r}= N_{d,r}(G)\in {\mathbb {N}}\) and a finite set \(F_{d,r}=F_{d,r}(G) \subseteq G\) of size at most \(N_{d,r}\) so that for any topological dynamical system (GX) with \(\dim X \le d\) the set of continuous functions \(f:X\rightarrow [0,1]^{r}\) so that

$$\begin{aligned} f^{F_{d,r}}:X\rightarrow ([0,1]^{r})^{F_{d,r}},\;\;x\mapsto (f(gx))_{g\in F_{d,r}} \end{aligned}$$

is an embedding is comeagre in \(C(X,[0,1]^{r})\). Indeed, Theorem 1.6 shows that for a group G generated by a finite set S, one may take \(N_{d,r}(G)=| S^{\le \bullet M}|\) with \(M = \lfloor \frac{2d}{r} \rfloor \), defined by (3). When \(r=1\), we have that G is a cyclic group so up to group isomorphism either \(G= {\mathbb {Z}}\) or \(G= {\mathbb {Z}}/m {\mathbb {Z}}\) for some natural number m. In this case Theorem 1.6 recovers the result of [10], where it was proven that \(F=\{0,1,2,\ldots ,2d\}\) is sufficient. The lower bound \(r \cdot N_{d,r}(G) \ge 2d+1\) holds for any \(d,r \in {\mathbb {N}}\) and any group G, as evidenced by considering a d-dimensional space X which does not embed in \({\mathbb {R}}^{2d}\) (see the proof of Theorem 1.4 in Sect. 3.2), thus we conclude that the optimal (minimal) value of \(N_{d,r}({\mathbb {Z}})\) is \(\lfloor \frac{2d}{r}\rfloor \)+1. It is interesting to find the minimal value possible for \(N_{d,r}(G)\) for other finitely generated groups G beyond \({\mathbb {Z}}\) . For example for \(G={\mathbb {Z}}^2\) and \(S=\{(1,0),(0,1)\}\), the proof gives \(N_{d,r}({\mathbb {Z}}^2)=\frac{\lfloor \frac{2d}{r}+2 \rfloor \lfloor \frac{2d}{r}+3 \rfloor }{2}\). One wonders how far this is from the minimal value possible.

We present an example showing that if the group is not finitely generated then the conclusion of Theorem Theorem 1.6 does not necessarily hold.

Example 4.3

Let \(1=r_3>r_4>r_5\ldots \) be a sequence of positive numbers with \(\lim _{i\rightarrow \infty } r_i=0\).

Let \(S_i\) be the circle of radius \(r_i\) around the origin in the plane. Let X be the compact (one-dimensional) metric space

$$\begin{aligned} X=\bigcup _{i=3}^\infty S_i \cup \{(0,0)\}\subset {\mathbb {R}}^2. \end{aligned}$$

Let \(G=F_\infty \), the free group with a non finite countable number of generators. Denote \(G=\langle g_i\rangle _{i=1}^\infty \). We define the action of G on X by specifying the action of each generator: the element \(g_i\) rotates \(S_i\) by \(2\pi /i\) and acts as identity otherwise. Note that \((G,X)_1=(G,X)_2=\{(0,0)\}\). Note that for \(N\ge 3\), \((G,X)_N\) is a finite union of circles \(S_i\) and the origin. Thus for every \(N \in {\mathbb {N}}\) it holds

$$\begin{aligned} 1= \dim (G,X)_N < \frac{1}{2}N. \end{aligned}$$

However for every finite \(F\subset G\), for every continuous functions \(f:X\rightarrow [0,1]\) the map

$$\begin{aligned} f^{F}:X\rightarrow [0,1]^{F},\;\;x\mapsto (f(gx))_{g\in F} \end{aligned}$$

is not an embedding as one may find a circle \(S_i\) on which it equals \(f_{|S_i}\).

5 The main auxiliary theorem

5.1 Overview of the proof

Given a set \({\hat{Z}} \subseteq X^\Delta \), denote

$$\begin{aligned} \mathcal {G}_\mathcal {F}({\hat{Z}}) := \{ f \in C(Y,[0,1]^r)~:~ f^{\mathcal {F}}(x_1) \ne f^{\mathcal {F}}(x_2) ~ \forall (x_1,x_2) \in {\hat{Z}}\}. \end{aligned}$$

Lemma 5.1

Let \({\hat{Z}} \subset X^\Delta \) be a compact set. Then the set \(\mathcal {G}_\mathcal {F}({\hat{Z}}) \subset C(Y,[0,1]^r)\) is open.

Proof

Fix \(f \in \mathcal {G}_\mathcal {F}({\hat{Z}})\). Since \({\hat{Z}}\) is compact, it follows that there exists \(\epsilon >0\) such that for all \((x_1,x_2) \in {\hat{Z}}\), the distance between \(f^{\mathcal {F}}(x_1)\) and \(f^{\mathcal {F}}(x_2)\) is at least \(\epsilon \). It follows that the ball of radius \(\epsilon /2\) around f in \(C(Y,[0,1]^r)\) is contained in \(\mathcal {G}_\mathcal {F}({\hat{Z}})\). Q.E.D. \(\square \)

Lemma 5.2

(cf. [10, Lemma 3.3]) Suppose there exists a countable collection of compact sets \({\hat{Z}}_1,\ldots , {\hat{Z}}_n ,\ldots \subset \hat{X}\), such that \(\hat{X} = \bigcup _{n=1}^\infty {\hat{Z}}_n\) and so that for every \(n \in {\mathbb {N}}\) the set \(\mathcal {G}_\mathcal {F}({\hat{Z}}_n)\) is dense. Then the set of continuous functions \(f \in C(Y,[0,1]^{r})\) for which \(f^\mathcal {F}:X \rightarrow ([0,1]^{r})^\mathcal {F}\) is injective is a dense \(G_\delta \) subset of \(C(Y,[0,1]^r)\).

Proof

Given \(f \in C(Y,[0,1]^r)\) observe that \(f^{\mathcal {F}}:X \rightarrow ([0,1]^r)^{\mathcal {F}}\) is injective if and only if \(f^{\mathcal {F}}(x_1) \ne f^{\mathcal {F}}(x_2)\) for every \((x_1,x_2) \in X^\Delta \), Since \(X^\Delta = \bigcup _{n=1}^\infty {\hat{Z}}_n\) it follows that

$$\begin{aligned} \left\{ f \in C(Y,[0,1]^r):~ f^{\mathcal {F}} \text{ is } \text{ injective } \right\} = \bigcap _{n=1}^\infty \mathcal {G}_\mathcal {F}({\hat{Z}}_n).\end{aligned}$$

By assumption \(\mathcal {G}_\mathcal {F}({\hat{Z}}_n)\) is dense for every n. By Lemma 5.1\(, \mathcal {G}_\mathcal {F}({\hat{Z}}_n)\) is open. By the Baire category theorem, it follows that \(\bigcap _{n=1}^\infty \mathcal {G}_\mathcal {F}({\hat{Z}}_n)\) is a dense \(G_\delta \) subset of \(C(Y,[0,1]^r)\). \(\square \)

Given Lemma 5.2, to conclude the proof of Theorem 1.5, it suffices to find a countable cover of \(X^\Delta \) by compact sets \({\hat{Z}}_1,{\hat{Z}}_2,\ldots \subset X^\Delta \), so that for every \(n \in {\mathbb {N}}\) the set \(\mathcal {G}_\mathcal {F}({\hat{Z}}_n)\) is dense.

5.2 Coherent sets

Let \((X,d),(Y,d')\) be compact metric spaces and let \(\mathcal {F}= \big (g_1,\ldots ,g_N\big )\) be a finite ordered set of continuous injective functions from X to Y. Observe that \(X^\Delta = \bigcup _{{\hat{\mathcal {P}}}}X^\Delta _{{\hat{\mathcal {P}}}}\), where the union is a finite union over partitions of \({\hat{\mathcal {F}}}\).

Definition 5.3

A set \({\hat{Z}} \subseteq X^\Delta \) is said to be \(\mathcal {F}\)-coherent if there exists a partition \({\hat{\mathcal {F}}}\) such that \({\hat{Z}} \subseteq X^\Delta _{{\hat{\mathcal {P}}}}\) and so that for every \((i_1,j_1),(i_2,j_2) \in [N] \times [2]\) such that \({\hat{\mathcal {P}}}(g_{i_1}^{(j_1)}) \ne {\hat{\mathcal {P}}}(g_{i_2}^{(j_2)})\) it holds \(g_{i_1}^{(j_1)}({\hat{Z}}) \cap g_{i_2}^{(j_2)}({\hat{Z}}) = \emptyset \).

Lemma 5.4

Let \({\hat{\mathcal {P}}}\) be a partition of \({\hat{\mathcal {F}}}\) Then the set \(X^\Delta _{{\hat{\mathcal {P}}}}\) is a countable union of compact \(\mathcal {F}\)-coherent sets.

Proof

For \((i_1,j_1), (i_2,j_2) \in [N] \times [2]\), denote

$$\begin{aligned} X^{\Delta ,=}_{(i_1,j_1), (i_2,j_2)} = \left\{ (x_1,x_2) \in X^\Delta :~ g_{i_1}(x_{j_1})= g_{i_2}(x_{j_2})\right\} , \\ X^{\Delta ,\ne }_{(i_1,j_1), (i_2,j_2)}= \left\{ (x_1,x_2) \in X^\Delta :~ g_{i_1}(x_{j_1}) \ne g_{i_2}(x_{j_2})\right\} . \end{aligned}$$

Given a partition \({\hat{\mathcal {P}}}\) of \([N] \times [2]\) denote:

$$\begin{aligned} I^{=} = \left\{ \left( (i_1,j_1),(i_2,j_2)\right) \in \left( [N] \times [2]\right) ^2: \mathcal {P}(i_1,j_1) = \mathcal {P}(i_2,j_2) \right\} . \end{aligned}$$

and

$$\begin{aligned} I^{\ne } =\left\{ \left( (i_1,j_1),(i_2,j_2)\right) \in \left( [N] \times [2]\right) ^2: \mathcal {P}(i_1,j_1) \ne \mathcal {P}(i_2,j_2) \right\} \end{aligned}$$

Note

$$\begin{aligned} X^{\Delta }_{{\hat{\mathcal {P}}}} = \left( \bigcap _{ (i_1,j_1),(i_2,j_2) \in I^{=}} X^{\Delta ,=}_{(i_1,j_1), (i_2,j_2)}\right) \bigcap \left( \bigcap _{ (i_1,j_1),(i_2,j_2) \in I^{\ne }} X^{\Delta ,\ne }_{(i_1,j_1), (i_2,j_2)}\right) . \end{aligned}$$

Define for \(n \in {\mathbb {N}}\) and \((i_1,j_1), (i_2,j_2) \in [N] \times [2]\)

$$\begin{aligned} X^{\Delta ,n}_{(i_1,j_1), (i_2,j_2)} = \left\{ (x_1,x_2) \in X^\Delta :~ d(x_1,x_2) \ge \frac{1}{n} \text{ and } g_{i_1}(x_{j_1})= g_{i_2}(x_{j_2})\right\} , \end{aligned}$$

and

$$\begin{aligned} X^{\Delta ,+n}_{(i_1,j_1), (i_2,j_2)} = \left\{ (x_1,x_2) \in X^\Delta :~ d(x_1,x_2) \ge \frac{1}{n} \text{ and } d(g_{i_1}(x_{j_1}) , g_{i_2}(x_{j_2})) \ge \frac{1}{n} \right\} . \end{aligned}$$

Note that each of the sets \(X^{\Delta ,n}_{(i_1,j_1), (i_2,j_2)}\) and \(X^{\Delta ,+n}_{(i_1,j_1), (i_2,j_2)}\) is compact. Also

$$\begin{aligned} X_{(i_1,j_1), (i_2,j_2)}^{\ne } = \bigcup _{n=1}^\infty X_{(i_1,j_1), (i_2,j_2)}^{+n} \text{ and } X_{(i_1,j_1), (i_2,j_2)}^{=} = \bigcup _{n=1}^\infty X_{(i_1,j_1), (i_2,j_2)}^{n}.\end{aligned}$$

Thus \(X^\Delta _{{\hat{\mathcal {P}}}}\) is a countable union of compact sets. We write:

$$\begin{aligned} X^\Delta _{{\hat{\mathcal {P}}}}=\bigcup _{i=1}^\infty {\hat{K}}_i. \end{aligned}$$

Next, we find for every \((x,y) \in X^\Delta _{{\hat{\mathcal {P}}}}\) a relatively open set \((x,y)\in U_{(x,y)}\subset X^\Delta _{{\hat{\mathcal {P}}}}\) such that \(\overline{U}_{(x,y)}\cap X^\Delta _{{\hat{\mathcal {P}}}}\) is \(\mathcal {F}\)-coherent. As \(X\times X\) is a hereditarily Lindelöf spaceFootnote 5, \(X^\Delta _{{\hat{\mathcal {P}}}}\) is a Lindelöf space and therefore one may find a countable open subcover consisting of such sets \(X^\Delta _{{\hat{\mathcal {P}}}}=\bigcup _{j=1}^\infty U_{(x_j,y_j)}.\) As a subset of an \(\mathcal {F}\)-coherent set is also an \(\mathcal {F}\)-coherent set, one concludes that

$$\begin{aligned} X^\Delta _{{\hat{\mathcal {P}}}}=\bigcup _{i=1}^\infty \bigcup _{j=1}^\infty ({\hat{K}}_i\cap \overline{U}_{(x_j,y_j)}) \end{aligned}$$

is a countable union of compact \(\mathcal {F}\)-coherent sets.

Finally let us construct \(U_{(x_1,x_2)}\) for a given \((x_1,x_2)\in X^\Delta _{{\hat{\mathcal {P}}}}\). Indeed, let \(\epsilon >0\) be smaller than the minimal distance between two distinct elements of \(\{g_i(x_j): ~i \in [N],~ j \in [2]\}\). By the continuity of the G-action, one may find a relatively open set \(U_{(x_1,x_2)}\subset X^\Delta _{{\hat{\mathcal {P}}}}\) with \({\textbf{x}}=(x_1,x_2)\in U_{(x_1,x_2)}\) such that for every \({\textbf{z}}=(z_1,z_2) \in U_{(x_1,x_2)}\) and every \(i \in [N]\) and \(j \in [2]\),

$$\begin{aligned} d'(g_i^{(j)}({\textbf{x}}),g_i^{(j)}({\textbf{z}})) \le \frac{\epsilon }{3}. \end{aligned}$$

By the triangle inequality, for every \({\textbf{z}}=(z_1,z_2),{\tilde{\textbf{z}}}=({\tilde{z}}_1,{\tilde{z}}_2) \in \overline{U}_{(x_1,x_2)}\) and every \((i_1,j_1),(i_2,j_2) \in [N] \times [2]\) such that \({\hat{\mathcal {P}}}(i_1,j_1) \ne {\hat{\mathcal {P}}}(i_2,j_2)\) it holds

$$\begin{aligned} d'(g_{i_1}^{(j_1)}({\textbf{z}}),g_{i_2}^{(j_2)}({\tilde{\textbf{z}}})) \ge d'(g_{i_1}^{(j_1)}({\textbf{x}}), g_{i_2}^{(j_2)}({\textbf{x}})) - d'(g_{i_1}^{(j_1)}({\textbf{x}}),g_{i_1}^{(j_1)}({\textbf{z}}))-d'(g_{i_2}^{(j_2)}({\textbf{x}}),g_{i_2}^{(j_2)}({\tilde{\textbf{z}}})),\end{aligned}$$

which implies

$$\begin{aligned} d'(g_{i_1}^{(j_1)}({\textbf{z}}),g_{i_2}^{(j_2)}({\tilde{\textbf{z}}})) \ge \frac{1}{3}\epsilon .\end{aligned}$$

Thus \(\overline{U}_{(x_1,x_2)}\cap X^\Delta _{{\hat{\mathcal {P}}}}\) is \(\mathcal {F}\)-coherent \(\square \)

5.3 Main auxiliary lemma

In view of Lemmas 5.2 and  5.4, in order to prove Theorem 1.5 it is enough to prove the following lemma.

Lemma 5.5

Let (Xd), \((Y,d')\) be compact metrizable spaces and let \(\mathcal {F}= \big (g_1,\ldots ,g_N\big )\) be a finite ordered set of continuous injective functions from X to Y. Assume that for every partition \(\mathcal {P}\) of \(\mathcal {F}\) the inequality (2) holds. Let \({\hat{\mathcal {P}}}\) be a partition of \({\hat{\mathcal {F}}}\) and let \({\hat{Z}} \subseteq X^\Delta _{{\hat{\mathcal {P}}}}\) be a compact \(\mathcal {F}\)-coherent set. Then \(\mathcal {G}_\mathcal {F}({\hat{Z}}_n)\) is a dense subset of \(C(Y,[0,1]^r)\).

To prove Lemma 5.5 we distinguish between two different types of partitions \({\hat{\mathcal {P}}}\) as follows:

Definition 5.6

A partition \({\hat{\mathcal {P}}}\) of \([N] \times [2]\) is said to be intersective if there exists \(i_1,i_2 \in [N]\) such that \({\hat{\mathcal {P}}} (i_1,1)= {\hat{\mathcal {P}}}(i_2,2)\). Otherwise, \({\hat{\mathcal {P}}}\) is said to be non-intersective.

Lemma 5.7

Let \({\hat{\mathcal {P}}}\) be a partition of \({\hat{\mathcal {F}}}\) identified with \([N] \times [2]\) such that \(X^\Delta _{{\hat{\mathcal {P}}}} \ne \emptyset \). Then:

  1. (1)

    For every \(i \in [N]\) it holds that \({\hat{\mathcal {P}}}(i,1) \ne {\hat{\mathcal {P}}}(i,2)\).

  2. (2)

    If \({\hat{\mathcal {P}}}\) is an intersective partition, then there exists a homeomorphism \(T:\pi _1(X^\Delta _{{\hat{\mathcal {P}}}}) \rightarrow \pi _2(X^\Delta _{{\hat{\mathcal {P}}}})\) such that for every \(i_1\ne i_2 \in [N] \) satisfying \({\hat{\mathcal {P}}}(i_1,1)={\hat{\mathcal {P}}}(i_2,2)\) and \(x \in \pi _1(X^\Delta _{{\hat{\mathcal {P}}}})\), it holds \(g_{i_1}(x)= g_{i_2}(T(x))\).

Proof

  1. (1)

    Suppose that for some \(i \in [N]\) it holds that \({\hat{\mathcal {P}}}(i,1) = {\hat{\mathcal {P}}}(i,2)\). As \(X^\Delta _{{\hat{\mathcal {P}}}} \ne \emptyset \), one may find \( (x_1,x_2) \in X^\Delta _{{\hat{\mathcal {P}}}}\). Then \(x_1 \ne x_2\) and \(g_{i}(x_1) = g_i(x_2)\), contradicting the injectivity of \(g_i\).

  2. (2)

    Let \({\hat{\mathcal {P}}}\) be an intersective partition, and let \(i_1\ne i_2 \in [N]\) with \({\hat{\mathcal {P}}}(i_1,1) = {\hat{\mathcal {P}}}(i_2,2)\). Then in particular \(g_{i_1}(\pi _1(X^\Delta _{{\hat{\mathcal {P}}}}))=g_{i_2}(\pi _2(X^\Delta _{{\hat{\mathcal {P}}}}))\). Since \(g_{i_1},g_{i_2}\) are injective continuous functions on X, they induce hoemomorphisms between X and \(g_{i_1}(X),g_{i_2}(X) \subseteq Y\) respectively. Then \(T:= g_{i_2}^{-1}\circ g_{i_1}\mid _{\pi _1(X^\Delta _{{\hat{\mathcal {P}}}})}\) is a homeomorphism between \(\pi _1(X^\Delta _{{\hat{\mathcal {P}}}})\) and \(\pi _2(X^\Delta _{{\hat{\mathcal {P}}}})\). Now suppose \(i_1',i_2' \in [N]\) also satisfy \({\hat{\mathcal {P}}}(i_1',1)={\hat{\mathcal {P}}}(i_2',2)\). Choose any \(x_1 \in \pi _1(X^\Delta _{{\hat{\mathcal {P}}}})\). Our goal is to show that \(g_{i_1'}(x_1)= g_{i_2'}(T(x_1))\). By definition, \(x_1 \in \pi _1(X^\Delta _{{\hat{\mathcal {P}}}})\) implies that there exists \(x_2 \in \pi _2(X^\Delta _{{\hat{\mathcal {P}}}})\) such \((x_1,x_2) \in X^\Delta _{{\hat{\mathcal {P}}}}\). The fact that \((x_1,x_2) \in X^\Delta _{{\hat{\mathcal {P}}}}\) implies that \(g_{i_1}(x_1)=g_{i_2}(x_2)\) and also \(g_{i_1'}(x_1)=g_{i_2'}(x_2)\). The condition \(g_{i_1}(x_1)=g_{i_2}(x_2)\) is equivalent to \(T(x_1)=x_2\). So indeed \(g_{i_1'}(x_1)= g_{i_2'}(T(x_1))\).

\(\square \)

The key tool from dimension theory that is used in the proof of Lemma 5.5 is a result known as “Ostrand’s theorem”, which we now recall:

Theorem 5.8

(Ostrand’s theorem, [28]) A compact metric space X satisfies \(\dim (X) < n\) if and only if for every \(\epsilon >0\) and \(k \ge 0\) there exist \(n+k\) families \(\mathcal {C}_1,\ldots ,\mathcal {C}_{n+k}\), such that each \(\mathcal {C}_i\) consists of pairwise disjoint closed subsets of X of diameter at most \(\epsilon \), and so that every element of X is covered by at least \(k+1\) elements of \(\bigcup _{j=1}^{n+k} \mathcal {C}_j\).

The statement here is equivalent but not identical to the original one in [28, Theorem 1], where it has been used to extend previous results of Kolmogorov and Arnold on Hilbert’s 13th problem [1, 21]. See [5, Theorem 2.4] for another application of Ostrand’s theorem.

Definition 5.9

Let \(f:X \rightarrow {\mathbb {R}}\) be a function and \(\epsilon >0\). Denote by \( \delta _f: (0,\infty ) \rightarrow [0,\infty ]\) the function given by:

$$\begin{aligned} \delta _f(\epsilon ) := \sup \left\{ \delta ' \ge 0 :~ \forall x_1,x_2 \in X,\ d(x_1,x_2) \le \delta ' \rightarrow |f(x_1)-f(x_2)| \le \epsilon \right\} . \end{aligned}$$

Clearly, \(\delta _f(\epsilon )\) is finite for any bounded \(f:X \rightarrow {\mathbb {R}}\). If \(f:X \rightarrow {\mathbb {R}}\) is continuous, then (by compactness of X) \(\delta _f(\epsilon ) >0\) for any \(\epsilon >0\).

Lemma 5.10

Let Y be a compact metric space, and let \(f_1,\ldots ,f_r \in C(Y,[0,1])\) and \(\epsilon >0\) be given. Let \(\mathcal {C}_1,\ldots ,\mathcal {C}_r\) be sets of subsets of Y, where each \(\mathcal {C}_\ell \) is a set of pairwise disjoint closed subsets of Y, each having diameter smaller than \(\delta _{f_\ell }(\epsilon /2)\). Then there exists functions \({\tilde{f}}_1,\ldots ,{\tilde{f}}_r \in C(Y,[0,1])\) such that:

  1. (a)

    \(\Vert {\tilde{f}}_\ell - f_\ell \Vert _\infty \le \epsilon \) for all \(\ell \in [r]\)

  2. (b)

    For every \(\ell \in [r]\), \(C,C' \in \mathcal {C}_\ell \) \(x \in C\), and \(x'\in C'\), if \(C \ne C'\) then \({\tilde{f}}_\ell (x)\ne {\tilde{f}}_\ell (x')\).

  3. (c)

    For every \(\ell _1,\ell _2 \in [r]\) with \(\ell _1 \ne \ell _2\) and every \(x_1 \in \bigcup \mathcal {C}_{\ell _1}\), \(x_2 \in \bigcup \mathcal {C}_{\ell _2}\) it holds \({\tilde{f}}_{\ell _1}(x_1) \ne {\tilde{f}}_{\ell _2}(x_2)\).

Proof

By the definition of \(\delta _{f_\ell }(\epsilon /2)\), for every \(\ell \in [d]\) and every \(C \in \mathcal {C}_\ell \) it holds that the diameter of \(f_\ell (C)\) is at most \(\epsilon /2\). For every \(\ell \in [r]\) choose a function \(v_\ell :\mathcal {C}_\ell \rightarrow [0,1]\) so that:

(\(\alpha \)):

The distance between \(v_\ell (C)\) and \(f_\ell (C)\) is at most \(\epsilon /2\) for every \(\ell \in [r]\) and every \(C \in \mathcal {C}_\ell \).

(\(\beta \)):

\(v_\ell :\mathcal {C}_\ell \rightarrow [0,1]\) is injective for every \(\ell \in [r]\).

(\(\gamma \)):

For every \(\ell _1,\ell _2 \in [r]\) with \(\ell _1 \ne \ell _2\) \(v_{\ell _1}(\mathcal {C}_{\ell _1}) \cap v_{\ell _2}(\mathcal {C}_{\ell _2}) = \emptyset \).

Such a function \(v_\ell :\mathcal {C}_\ell \rightarrow [0,1]\) exists because each \(\mathcal {C}_\ell \) is finite.

For every \(\ell \in [r]\), let \({\hat{f}}_\ell :\bigcup \mathcal {C}_\ell \rightarrow [0,1]\) be defined by \({\hat{f}}= \sum _{C \in \mathcal {C}_\ell }v_\ell (C) 1_{C}\). Since \(\mathcal {C}\) is a family of pairwise disjoint sets, each \({\hat{f}}_\ell \) is locally constant, hence continuous. Because the distance between \(v_\ell (C)\) and \(f_\ell (C)\) is at most \(\epsilon /2\) for every \(\ell \in [r]\) and every \(C \in \mathcal {C}_\ell \) and the diameter of \(f_\ell (C)\) is at most \(\epsilon /2\), it follows that \(|f_\ell (x) - {\hat{f}}_\ell (x)| \le \epsilon \) for all \(\ell \in [r]\). By the Tietze extension theorem, each \({\hat{f}}_\ell \) can be extended to a continuous function \({\tilde{f}}_\ell \in C(Y,[0,1])\) so that \(\Vert {\tilde{f}}_\ell - f_\ell \Vert \le \epsilon \), so property (a) is satisfied. Property (b) for \({\tilde{f}}_\ell \) follows directly from (\(\beta \)), and property (c) follows directly from (\(\gamma \)).

\(\square \)

We use the following ad-hoc combinatorial lemma:

Lemma 5.11

Let \(V_1,V_2,W\) be finite sets such that \(|V_1| \ge |V_2|\), and let \(F_1:W \rightarrow V_1\), \(F_2:W \rightarrow V_2\) be surjective functions. Suppose \(V_1^* \subseteq V_1\), \(V_2^* \subseteq V_2\) satisfy \(|V_1^*| > \frac{|V_1|}{2}\) and \(|V_2^*| > \frac{|V_2|}{2}\). Then at least one of the following holds:

  1. (A)

    There exists \(w \in W\) such that \(F_1(w) \in V_1^*\) and \(F_2(w) \in V_2^*\).

  2. (B)

    There exists \(w,w' \in W\) such that \(F_2(w)=F_2(w')\) , \(F_1(w) \ne F_1(w')\) and \(F_1(w),F_1(w') \in V_1^*\) .

Proof

As \(F_1:W \rightarrow V_1\) is surjective, there exists an injective function \(\psi :V_1 \rightarrow W\) such that \(F_1(\psi (v_1))=v_1\) for all \(v_1 \in V_1\). Let \(W^* = \psi (V_1^*)\). By injectivity of \(\psi \), \(|W^*| = |V_1^*|\). Using \(|V_1^*| > \frac{|V_1|}{2}\) and \(|V_1| \ge |V_2|\) we conclude that \(|W^*| > |V_2| /2\). Now \(|V_2 \setminus V_2^*| < \frac{|V_2|}{2}\), so \(|V_2 \setminus V_2^*| <|W^*|\). If \(F_2(W^*) \cap V_2^* \ne \emptyset \) we are in case (A). Otherwise, \(F_2(W^*) \subseteq V_2 \setminus V_2^*\), and by the inequality \(|V_2 \setminus V_2^*| <|W^*|\) it follows that the restriction of \(F_2\) to \(W*\) is not injective. This implies that there exist \(w,w' \in W^*\) such that \(w \ne w'\) and \(F_2(w)=F_2(w')\). Since \(F_1\) is injective on \(W^*\) by construction, and \(F_1(W^*) = V_1^*\), it follows that \(F_1(w) \ne F_1(w')\) and \(F_1(w),F_1(w') \in V_1^*\) , so we are in case (B). \(\square \)

Lemma 5.12

Let \(V_1,V_2,W\) be finite sets, let Y be an arbitrary set, and let \(F_1:W \rightarrow V_1\), \(F_2:W \rightarrow V_2\), \(\phi _1:V_1 \rightarrow Y\), \(\phi _2:V_2 \rightarrow Y\) be functions, and \(V_1^* \subseteq V_1\), \(V_2^* \subseteq V_2\). Further, suppose that the restrictions of \(\phi _1\) and \(\phi _2\) to \(V_1^*\) and \(V_2^*\) respectively, are both injective and that \(\phi _1(F_1(w)) \ne \phi _2(F_2(w))\) for every \(w \in F_1^{-1}(V_1^*) \cap F_2^{-1}(V_2^*)\), and that at least one of the statements (A) and (B) from Lemma 5.11 hold. Then \(\phi _1 \circ F_1 \ne \phi _2 \circ F_2\).

Proof

Statement (A) from Lemma 5.11 implies that that there exists \(w \in F_1^{-1}(V_1^*) \cap F_2^{-1}(V_2^*)\), so by assumption for such w it holds \(\phi _1(F_1(w)) \ne \phi _2(F_2(w))\), and so in this case \(\phi _1 \circ F_1 \ne \phi _2 \circ F_2\).

Now suppose statement (B) from Lemma 5.11 holds. Namely, we assume that there exists \(w,w' \in W\) such that \(F_2(w)=F_2(w')\), \(F_1(w) \ne F_1(w')\) and \(F_1(w),F_1(w') \in V_1^*\). By assumption, \(\phi _1\) is injective on \(V_1^*\). So \(\phi _1(F_1(w)) \ne \phi _1(F_1(w'))\). But \(F_2(w)=F_2(w')\) implies \(\phi _2(F_2(w))=\phi _2(F_2(w'))\), so in this case we again conclude that \(\phi _1 \circ F_1 \ne \phi _2 \circ F_2\). \(\square \)

We are now ready to prove Lemma 5.5.

Proof of Lemma 5.5

Let \({\hat{\mathcal {P}}}\) be a partition of \( {\hat{\mathcal {F}}}\) identified with \([N] \times [2]\), and let \({\hat{Z}} \subseteq \hat{X}_{{\hat{\mathcal {P}}}}\) be a compact \(\mathcal {F}\)-coherent set. Let \(f =\left( f_1,\ldots ,f_r\right) \in C(Y,[0,1]^r)\) and \(\epsilon >0\) be arbitrary. Our goal is to find \({\tilde{f}} \in \mathcal {G}_\mathcal {F}({\hat{Z}})\) such that \(\Vert {\tilde{f}} -f\Vert _\infty < \epsilon \). Let

$$\begin{aligned} \delta : = \min _{ \ell \in [r]} \frac{1}{2}\delta _{f_\ell }(\epsilon /2).\end{aligned}$$

By the compactness of X and the continuity of the maps \(g_i:X \rightarrow Y\) one may find \(\eta >0\) such that for all \(i \in [N]\) and \(x,x' \in X\) satisfying \(d(x,x') < \eta \) it holds \(d'(g_i(x),g_i(x'))< \delta \). For \(j \in [2]\), let \(Z_j:= \pi _j ({\hat{Z}})\) denote the projection of \({\hat{Z}} \subseteq X \times X\) into the j’th copy of X. For \(j \in [2]\) let \(\mathcal {P}_j\) denote the partition of [N] defined by \(\mathcal {P}_j(i_1)=\mathcal {P}_j(i_2)\) iff \({\hat{\mathcal {P}}}(i_1,j)={\hat{\mathcal {P}}}(i_2,j)\), and let \(M_j=|\mathcal {P}_j|\) for \(j \in [2]\). Assume without loss of generality that \(|M_1| \ge |M_2|\). Then it holds \(Z_j \subseteq X_{\mathcal {P}_j}\) and so by the inequality (2), \(\dim (Z_j) < \frac{r}{2}M_j\) for \(j \in [2]\).

For \(j \in [2]\), write \(\mathcal {P}_j = \{P_1^{(j)},\ldots ,P_{M_j}^{(j)}\}\). Then for every \(j \in [2]\) and \(t \in [M_j]\) there exists a function \({\tilde{g}}_{t,j} \in C(Z_j,Y)\) such that \(g_i\mid _{Z_j} = {\tilde{g}}_{t,j}\) for every \(i \in P_{t}^{(j)}\). By Ostrand’s theorem and the condition \(\dim (Z_2) < \frac{r}{2}M_2\), one may find families of sets

$$\begin{aligned}\mathcal {C}^{(2)}_{t,\ell } \text{ for } t \in [M_2], \ell \in [r],\end{aligned}$$

such that each \(\mathcal {C}^{(2)}_{t,\ell }\) is a family of pairwise disjoint closed subsets of \(Z_2\) having diameter smaller than \(\eta \), and so that every \(x \in Z_2\) is covered by at least \(\left( M_2 - \dim (Z_2) +1\right) > \frac{r}{2}M_2\) elements of \(\bigcup _{ t \in [M_2], \ell \in [r]}\mathcal {C}^{(2)}_{t,\ell }\). For every \(t \in [M_2]\) and \(\ell \in [r]\) define:

$$\begin{aligned}{\tilde{\mathcal {C}}}^{(2)}_{t,\ell } := \left\{ {\tilde{g}}_{t,2}(C):~ C \in \mathcal {C}^{(2)}_{t,\ell }\right\} .\end{aligned}$$

As \({\hat{Z}} \subseteq X^\Delta _{{\hat{\mathcal {P}}}}\) is \(\mathcal {F}\)-coherent, it holds that \({\tilde{g}}_{t,2}(Z_2) \cap {\tilde{g}}_{t',2}(Z_2) = \emptyset \) for every \(t \ne t'\) \(t,t' \in [M_2]\). It follows that for each \(\ell \in [r]\) it holds that \(\bigcup _{t \in [M_2]} {\tilde{\mathcal {C}}}^{(2)}_{t,\ell }\) is a collection of pairwise disjoint closed subsets of Y. By the choice of \(\eta \), the diameter of each of these sets is less than \(\delta \).

The next step of the proof splits into two cases:

  • Case 1: The partition \({\hat{\mathcal {P}}}\) is non-intersective. In this case, by Ostrand’s theorem and the condition \(\dim (Z_1) < \frac{r}{2}M_1\), one may find families of sets

    $$\begin{aligned}\mathcal {C}^{(1)}_{t,\ell } \text{ for } t \in [M_1], \ell \in [r],\end{aligned}$$

    such that each \(\mathcal {C}^{(1)}_{t,\ell }\) is a family of pairwise disjoint closed subsets of \(Z_1\) having diameter smaller than \(\eta \), and so that every \(x \in Z_1\) is covered by at least \(\left( M_1 - \dim (Z_1) +1\right) > \frac{r}{2}M_1\) elements of \(\bigcup _{ t \in [M_1], \ell \in [r]}\mathcal {C}^{(1)}_{t,\ell }\). For every \(t \in [M_1]\) and \(\ell \in [r]\) define:

    $$\begin{aligned} {\tilde{\mathcal {C}}}^{(1)}_{t,\ell } := \left\{ {\tilde{g}}_{t,1}(C):~ C \in \mathcal {C}^{(1)}_{t,\ell }\right\} .\end{aligned}$$

    As \({\hat{Z}} \subseteq X^\Delta _{{\hat{\mathcal {P}}}}\) is \(\mathcal {F}\)-coherent and \({\hat{\mathcal {P}}}\) is non-intersective it holds that \({\tilde{g}}_{t,1}(Z_1) \cap {\tilde{g}}_{t',1}(Z_1) = \emptyset \) for every \(t \ne t'\) \(t,t' \in [M_1]\) and also \({\tilde{g}}_{t_1,1}(Z_1) \cap {\tilde{g}}_{t_2,2}(Z_2) = \emptyset \) for every \(t_1 \in [M_1]\) and \(t_2 \in [M_2]\). For every \(\ell \in [r]\) let

    $$\begin{aligned} {\tilde{\mathcal {C}}}_\ell := \bigcup _{t \in [M_1]}{\tilde{\mathcal {C}}}^{(1)}_{t,\ell } \cup \bigcup _{t \in [M_2]} {\tilde{\mathcal {C}}}^{(2)}_{t,\ell } .\end{aligned}$$

    Then by the discussion above \({\tilde{\mathcal {C}}}_\ell \) is a collection of pairwise disjoint compact subsets of Y having diameter less than \(\delta \).

  • Case 2: The partition \({\hat{\mathcal {P}}}\) is intersective. Let \(I \subseteq [M_2]\) denote the set of indices \(t_2\in [M_2]\) which corresponds to the “intersecting” partition elements of \(\mathcal {P}_2\). Namely, whenever \(i \in [N]\) satisfies \(\mathcal {P}_2(i) = P_{t_2}^{(2)}\) then there exists \(i' \in [N]\) such that \({\hat{\mathcal {P}}}(i,2)={\hat{\mathcal {P}}}(i',1)\).

    Thus there exists an injective function \(\zeta : I \rightarrow [M_1]\) such that \({\tilde{g}}_{t_2,2}(x_2)={\tilde{g}}_{\zeta (t_2),1} (x_1)\) for every \((x_1,x_2) \in {\hat{Z}}\). By Lemma 5.7 in this case there exists a homeomorphism \(T:Z_1 \rightarrow Z_2\) such that \({\tilde{g}}_{t_2,2} \circ T = {\tilde{g}}_{\zeta (t_2),1}\) for every \(t_2 \in I\). In particular, in this case, \(\dim Z_1 = \dim Z_2\). By our assumption \(|M_1| \ge |M_2|\). So one may extend \(\zeta \) in an arbitrary fashion to an injective function \(\zeta :[M_2] \rightarrow [M_1]\). For every \(t \in \zeta ([M_2])\) let

    $$\begin{aligned} \mathcal {C}^{(1)}_{t,\ell } = \left\{ T^{-1}(C):~ C \in \mathcal {C}^{(2)}_{t,\ell }\right\} .\end{aligned}$$

    For each \(t \in [M_1] \setminus \zeta ([M_2])\) let \(\mathcal {C}^{(1)}_{t,\ell }\) be an arbitrary finite collection of pairwise disjoint closed subsets of \(Z_1\) having diameter smaller than \(\eta \).

    For every \(t \in [M_1]\) and \(\ell \in [r]\) define:

    $$\begin{aligned}{\tilde{\mathcal {C}}}^{(1)}_{t,\ell } := \left\{ {\tilde{g}}_{t,1}(C):~ C \in \mathcal {C}^{(1)}_{t,\ell }\right\} .\end{aligned}$$

    Note that \({\tilde{\mathcal {C}}}^{(1)}_{\zeta (t),\ell } = {\tilde{\mathcal {C}}}^{(2)}_{t,\ell }\) for every \(t \in I\).

    For every \(\ell \in [r]\) let

    $$\begin{aligned}{\tilde{\mathcal {C}}}_\ell := \bigcup _{t \in [M_1] \setminus \zeta ([M_2])}{\tilde{\mathcal {C}}}^{(1)}_{t,\ell } \cup \bigcup _{t \in [M_2]} {\tilde{\mathcal {C}}}^{(2)}_{t,\ell } .\end{aligned}$$

    As in case 1, \({\tilde{\mathcal {C}}}_\ell \) is a collection of pairwise disjoint compact subsets of Y having diameter less than \(\delta \).

By the choice of \(\delta \), using Lemma 5.10, there exists functions \({\tilde{f}}_1, \ldots ,{\tilde{f}}_{r}:Y \rightarrow [0,1]\) such that

  1. (a)

    \(\Vert {\tilde{f}}_\ell - f_\ell \Vert _\infty \le \epsilon \) for all \(\ell \in [r]\)

  2. (b)

    For every \(\ell \in [r]\), \(C,C' \in {\tilde{\mathcal {C}}}_\ell \) \(x \in C\), and \(x'\in C'\), if \(C \ne C'\) then \({\tilde{f}}_\ell (x)\ne {\tilde{f}}_\ell (x')\).

  3. (c)

    For every \(\ell _1,\ell _2 \in [r]\) with \(\ell _1 \ne \ell _2\) and every \(x_1 \in \bigcup \mathcal {C}_{\ell _1}\),\(x_2 \in \bigcup \mathcal {C}_{\ell _2}\) it holds \({\tilde{f}}_{\ell _1}(x_1) \ne {\tilde{f}}_{\ell _2}(x_2)\).

To complete the proof, we show that \({\tilde{f}} \in \mathcal {G}_\mathcal {F}({\hat{Z}})\). To prove that \({\tilde{f}} \in \mathcal {G}_\mathcal {F}({\hat{Z}})\), we need to show that for every \((x_1,x_2) \in {\hat{Z}}\) there exists \(i \in [N]\) and \(\ell \in [r]\) such that

$$\begin{aligned} {\tilde{f}}_\ell (g_i(x_1)) \ne {\tilde{f}}_\ell (g_i(x_2)).\end{aligned}$$

Choose any \((x_1,x_2) \in {\hat{Z}}\).

For \(j \in [2]\), denote \(V_j = [M_j] \times [r] \times \{j\}\), and

$$\begin{aligned}V_j^* = \{ (t,\ell ,j) \in [M_j] \times [r] \times \{j\}:~ x_j \in \mathcal {C}^{(j)}_{t,\ell }\}.\end{aligned}$$

Denote \(W:= [N] \times [r]\). Define functions \(F_j:W \rightarrow V_j\) by

$$\begin{aligned} F_j(i,\ell ) = (t,\ell ) ~\Leftrightarrow ~ (i,j) \in P_t^{(j)},~ j \in [2],~t\in [M_j], i \in [N],~ \ell \in [r].\end{aligned}$$

Direct inspection reveals that the assumptions of Lemma 5.11 are satisfied with \(V_1,V_2\),\(V_1^*,V_2^*\), \(F_1:W \rightarrow V_1\) and \(F_2:W \rightarrow V_2\) as above. For each \(j \in [2]\) define \(\phi _j:V_j \rightarrow Y\) by

$$\begin{aligned} \phi _j(t,\ell ) = {\tilde{f}}_\ell ({\tilde{g}}_{t,j}(x_j)) \text{ for } \ell \in [r],~ j \in [2],~ t \in [M_j]. \end{aligned}$$

Then the restrictions of \(\phi _1\) and \(\phi _2\) to \(V_1^*\) and \(V_2^*\) respectively, are both injective by the properties (b) and (c) of the functions \({\tilde{f}}_\ell \). Lemma 5.7 implies that \({\hat{\mathcal {P}}}(i,1) \ne {\hat{\mathcal {P}}}(i,2)\) for any \(i \in [N]\). So \(\phi _1(F_1(w)) \ne \phi _2(F_2(w))\) for every \(w \in F_1^{-1}(V_1^*) \cap F_2^{-1}(V_2^*)\), by injectivity of each of the functions \(v_\ell \).

By Lemma 5.12 it holds that \(\phi _1 \circ F_1 \ne \phi _2 \circ F_2\). This precisely implies that \({\tilde{f}}^{\mathcal {F}} (x_1) \ne {\tilde{f}}^{\mathcal {F}}(x_2)\), completing the proof.

\(\square \)