Prime ends in metric spaces and quasiconformal-type mappings

By using the inner diameter distance condition we define and investigate new, in such a generality, class F\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {F}}$$\end{document} of homeomorphisms between domains in metric spaces and show that, under additional assumptions on domains, F\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {F}}$$\end{document} contains (quasi)conformal, bi-Lipschitz and quasisymmetric mappings as illustrated by examples. Moreover, we employ a prime ends theory in metric spaces and provide conditions allowing continuous and homeomorphic extensions of mappings in F\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {F}}$$\end{document} to topological closures of domains, as well as homeomorphic extensions to the prime end boundary. Domains satisfying the bounded turning condition, locally and finitely connected at the boundary and the structure of prime end boundaries for such domains play a crucial role in our investigations. We apply our results to show the Koebe theorem on arcwise limits for mappings in F\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal {F}}$$\end{document}. Furthermore, relations between the Royden boundary and the prime end boundary are presented. Our work generalizes results due to Carathéodory, Näkki, Väisälä and Zorič.


Introduction
where ⊂ X and ⊂ Y are bounded domains in complete doubling quasiconvex metric spaces X and Y . See Definition 13 and Sect. 4 for details and further remarks. According to our best knowledge, class F has not been studied before in such a general setting. We illustrate the above definition in Examples 2-5, where we show that, under additional assumptions on domains, conformal, quasiconformal, bi-Lipschitz and quasisymmetric mappings belong to class F. Among the boundary properties of domains employed in our studies let us mention the local and finite connectedness at the boundary, also collardness, qc-flatness, uniformity and the bounded turning condition, see Preliminaries.
The essential role in our studies is played by the prime ends theory for domains in metric spaces developed recently in [1,15], as an extension conditions are stated in terms of prime ends. We recall basic definitions for prime ends in Sect. 3. Further properties of prime ends such as the structure of the prime end boundary for domains finitely (locally) connected at the boundary are recalled in Sect. 5 where they are applied, see Theorems 1-2 and Corollary 1. In the same section we prove the key lemma of the paper, Lemma 3. The result shows that mappings in class F map chains of sets to chains and preserve equivalency of chains, giving rise to the corresponding properties for (prime) ends. Moreover, for a mapping in F and a target domain finitely connected at the boundary it holds that a preimage of a singleton prime end is a singleton, that is both prime ends have singleton impressions (see Definition 10 (3)). Using Lemma 3 we establish the following three types of extension results for homeomorphisms in F: (1) An extension to a continuous map between closures of domains (Theorem 3).
In particular, if a domain satisfies the bounded turning condition and a domain is finitely connected at the boundary, then f ∈ F( , ) extends continuously to a mapping F : → , cf. Corollary 2.
(2) An extension to a homeomorphism between closures of domains (Theorem 4).
(3) An extension to a homeomorphism between the topological and the prime end boundaries (Theorem 5). As corollaries we retrieve results for qc-mappings: a counterpart of Theorem 4.2 in Näkki [42] in quasiconformally collared domains, see Corollary 3 and an extension result for target domains finitely connected at the boundary due to Väisälä [52, Section 3.1], see Corollary 4.
Last section is devoted to studies of two applications of extension results: in Sect. 6.1 we present a variant of the Koebe theorem, see Theorem 6. Namely, we show that mappings in class F between domains locally and finitely connected at the boundary, respectively, have arcwise limits along end-cuts. Section 6.2 brings on stage another type of an abstract boundary, the Royden boundary. Upon stating the necessary definitions we recall an extension criterion for quasiconformal mappings expressed in terms of fibers, see Theorem 7. Then we show that for Euclidean domains finitely connected at the boundary fibers over a given boundary point correspond to prime ends with impressions at this point, see Theorem 8. As a corollary, we obtain an upper estimate for a number of components of fibers in the Royden compactification for John domains, see Corollary 6.

Preliminaries
Let (X , d X ) denote a metric space X with a distance function d X (sometimes denoted in our work also as d, if the considered space X is fixed or clearly follows from the context of the discussion). Let further ⊂ X stand for an open bounded connected domain in X . Unless stated otherwise, in what follows we will study only bounded domains. By a curve in X we understand a continuous mapping γ : [a, b] → X . The length of γ is denoted by l(γ ) and we say that γ is rectifiable if l(γ ) < ∞. Every rectifiable curve admits the so-called arc-length parametrization, see e.g. Section 5.1 in Heinonen-Koskela-Shanmugalingam-Tyson [23].
Let γ be a curve in . We define its diameter as follows: where the supremum is taken over all points x, y ∈ γ . We say that a metric space (X , d X ) satisfies the set of assumptions (A) if the following hold.

Assumptions (A)
(1) (X , d X ) is a complete doubling metric space.
The first assumption on space X implies, among other properties, that X is proper, i.e. closed and bounded sets in X are compact. The second allows us to infer that if ⊂ X is an open connected set, then is rectifiably connected and, thus pathconnected, see Lemmas 4.37 and 4.38 in Björn-Björn [8]. Unless stated otherwise, all metric spaces considered from now on satisfy Assumptions (A).
The following metrics will play an important role in the paper, as they are used in the definition of chain and (prime) ends (see Definitions 10 and 11) and in the definition of the main class of mappings studied in the paper, see Definition 13.

Definition 1 We define the inner diameter distance d inn on by
where the infimum is taken over all rectifiable curves γ joining x, y ∈ such that γ ⊂ .
The definition of d inn naturally extends to the distance between two sets E, F ⊂ denoted dist inn (E, F).
The above metric is more commonly called relative diameter distance, sometimes known as internal/intrinsic diameter distance. Clearly, under our assumptions, d inn is a metric on . One can also define the similar distance function, the so-called Mazurkiewicz metric between points x and y by taking the infimum of diameters of all connected sets in containing x, y, cf. Definition 8.10 in [1]. Let us denote such metric by d M . See also Björn-Björn-Shanmugalingam [9,10] for further studies on Mazurkiewicz distance and its role in the geometry of sets and nonlinear potential theory on metric spaces, see also Mazurkiewicz [37]. The following relations between the aforementioned metrics hold for all x, y ∈ : In particular, if d inn (x, y) = 0, then d M (x, y) = 0 and d X (x, y) = 0.
Definition 2 (Bounded turning condition) We say that a complete metric space (X , d X ) satisfies the L-bounded turning condition for some L ≥ 1, if for all x, y ∈ X there exists a continuum K containing x and y such that diamK ≤ Ld X (x, y).
Let us comment on the above definition.

Remark 1
(1) The spaces satisfying the L-bounded turning condition are also known as Llinearly connected spaces or LLC(1), cf. e.g. Hakobyan-Herron [19,Sections 2.B,4.B] and MacKay [34]. (2) It turns out that in Definition 2 one may assume that K is an arc, at the cost of possibly increasing L by an arbitrarily small amount, see e.g. [34]. (3) A domain satisfying the bounded turning condition is locally connected. Moreover, such a domain is locally connected at every point of its boundary, see e.g. discussion in [19].

Boundary of domains in metric spaces
In what follows we will study the boundary behavior of mappings. For this reason, we gather the necessary definitions of various types of boundary points and related domains. Since definitions and examples below rely or are related to the notion of the curve modulus, we will first recall it, see e.g. Väisälä [50,Chapter 6] for discussion in the Euclidean setting and Heinonen-Koskela [22] and Heinonen [20,Chapter 7] for the definitions and applications of the modulus in metric measure spaces. Let be a family of curves in a domain ⊂ X and let 1 ≤ p < ∞. Then the p-modulus of curve family is defined as follows: where μ is a Borel regular measure in metric space X , whereas F( ) stands for the set of admissible functions. Namely, a nonnegative Borel function : for every locally rectifiable γ ∈ . If F( ) is empty, then by convention we define Mod p = ∞. This happens if contains a constant curve. Among fundamental properties of the p-modulus we mention that it defines an outer measure on the set of all curves in X .
Let ⊂ X be a domain and let E, F ⊂ . By Mod p (E, F, ) we denote the modulus of the curve family (E, F, ) consisting of all rectifiable curves γ in which join E and F, i.e. one of the endpoints of γ belongs to E, the other to F and γ \ (E ∪ F) ⊂ .

Definition 3
We say that a domain in a metric measure space (X , d X ) equipped with a Q-regular measure is quasiconformally flat(QC-flat for short) at x ∈ ∂ if for any pair of connected subsets E, In order to illustrate the definition let us mention that a locally Q-Loewner uniform domain is QC-flat at every boundary point as follows from Fact 2.12 in Herron [24].
Next, we define a class of quasiconformally collared domains which plays an important role in the studies of the boundary behavior of quasiconformal mappings, see Väisälä [50,Chapter 17], Näkki [42] in the Euclidean setting and [3, Section 3.3] for the studies in Heisenberg group H 1 .

Definition 4
Let ⊂ R n be a domain and let x ∈ ∂ . We say that is quasiconformally collared at x (collared for short) if there exists a neighborhood U of x (in R n ) and a homeomorphism g from U ∩ onto {x ∈ R n : |x| < 1, x n ≥ 0} such that g restricted to U ∩ is quasiconformal.
Notice that by Topology g maps U ∩ ∂ to a (n − 1)-dimensional ball in R n .
The following class of domains is crucial from the point of view of extension results studied below, as well as, from the perspective of prime ends theory, as it turns out that prime end boundaries have particularly simple structure in such domains, see Theorem 1 below and discussion following it, see also Sections 10 and 11 in [1].

Definition 5
We say that ⊂ X is finitely connected at a point x ∈ ∂ if for every r > 0 there exists a bounded open set U in X containing x such that x ∈ U ⊂ B(x, r ) and U ∩ has has only finitely many components. If is finitely connected at every boundary point, then we say it is finitely connected at the boundary.
In particular, if U ∩ has exactly one component, then we say that is locally connected at x ∈ ∂ .
If a domain satisfies Definition 5 at every boundary point, then we say that is, respectively, finitely (locally) connected at the boundary. Example 1 (domains finitely and locally connected at the boundary) The following domains are finitely connected at the boundary: (1) John domains in complete metric spaces, see [1,Theorem 11.3] (2) Weakly linearly locally connected domains in R n (WLLC domains), see Herron-Koskela [ [50,Theorem 17.10] in Euclidean setting; see also Definition 3.9 and Observation 3.2 in [3] in the setting of H 1 .

Quasiconformal mappings and their counterparts in metric spaces
Our studies for mappings largely grow from the similar studies for (quasi)conformal mappings. For the rudimentary properties of quasiconformal mappings we refer to e.g. [50] in Euclidean setting and [22] in the metric setting. Relations between several definitions of quasiconformal mappings in metric measure spaces, including conditions implying their equivalence, are presented e.g. in Koskela-Wildrick [30] and Williams [49]. Below we employ the following definition.

Definition 6
Let (X , d X ) be a Q-regular metric measure space (Q > 1) and , ⊂ X be domains (not necessarily bounded). A homeomorphism f : → is called K f -quasiconformal in if there exists a constant K f ≥ 1 such that for any family of curves in we have If X = R n and K f = 1, then f is conformal.
In next definition we present another generalization of quasiconformal mappings in metric spaces, the so-called quasisymmetric mappings. The concept was introduced by Ahlfors-Buerling [6] in the context of the boundary behavior of planar quasiconformal mappings and in the metric spaces by Tukia-Väisälä [48]. We remark that among examples of quasisymmetric mappings there are bi-Lipschitz mappings, and quasiconformal mappings between domains in R n can be characterized as locally quasisymmetric, see Heinonen [20,Theorems 11.14 and 11.19] and Section 4 in Heinonen-Koskela [22].
such that the following condition holds for all triples a, b, x of distinct points in X : We refer to [20,22] for further properties of quasisymmetric mappings and to [30] for a survey of relations between quasisymmetricity and various definitions of quasiconformal maps (in particular, see Theorem 4.3 in [30] In order to see these mappings in the wider context, let us recall that in Euclidean setting, an orientation preserving bi-Lipschitz map is a map of bounded length distortion (the so-called BLD-map), and thus quasiregular. See Chapter 14.78 in Heinonen-Kilpeläinen-Martio [21] and further references therein. Furthermore, in the setting of metric spaces, one observes that an L-bi-Lipschitz map is η-quasisymmetric with η(t) = L 2 t (cf. Definition 7), see e.g. Chapter 10 in Heinonen [20].

Prime ends in metric spaces
The first theory of prime ends is due to Carathéodory [11] who studied prime ends in simply-connected domains in the plane. For a comprehensive introduction to Carathéodory's prime ends we refer to Chapter 9 of a book by Collingwood-Lohwater [13]. Subsequently, the theory has been developing to include more general domains in the plane and in higher dimensional Euclidean spaces, e.g. Freudenthal [16], Kaufman [27], Mazurkiewicz [38], and more recently Epstein [14] and Näkki [42]. The latter one defines prime ends based on the notion of modulus, and therefore, suitable to investigate the quasiconformal mappings in R n (cf. [3] for a related to [42] prime ends theory in the Heisenberg group H 1 ).
In this paper we study the following types of ends and prime ends in a more general setting of metric spaces recently proposed in [1,15]. In order to introduce basic definitions, it is enough to assume that (X , d X ) is a complete doubling metric space. The construction of (prime) ends consists of number of auxiliary definitions. First, we define acceptable sets.
Let X be a bounded domain in X , i.e. a bounded nonempty connected open subset of X that is not the whole space X itself.

Definition 9
We call a bounded connected set E an acceptable set if E ∩∂ = ∅.
By discussion in [1], we know that boundedness and connectedness of an acceptable set E implies that E is compact and connected. Furthermore, E is infinite, as otherwise we would have E = E ⊂ . Therefore, E is a continuum. Recall that a continuum is a connected compact set containing at least two points.

Definition 10
We call a sequence {E k } ∞ k=1 of acceptable sets a chain if it satisfies the following conditions: The impression ∞ k=1 E k ⊂ ∂ . We remark that the impression is either a point or a continuum, since {E k } ∞ k=1 is a decreasing sequence of continua. Furthermore, Properties 1 and 2 above imply that E k+1 ⊂ IntE k . In particular, IntE k = ∅.
Our definition of a chain differs from that in Definition 4.2 in [1] as now we use the Mazurkiewicz distance instead of the underlying metric. Such a modification is convenient since class F of mappings is defined in terms of the related inner diameter distance, also due to relations (1). Furthermore, in what follows we will often study paths and their behavior under homeomorphisms in class F, also we will appeal to constructions involving paths and continua containing them. Let us also emphasize that such a modification does not affect results from [1], cf. Definition 2.3 in Estep-Shanmugalingam [15] and the discussion following it for comparison between the above definition and Definition 4.2 in [1]. In general, there are more chains and ends in the sense of the above definition than in [1] (see Definition 11 below), and thus a priori a prime end in the setting of [1] need not be prime in our sense. We further note, that results in [1] employed below, which use the analog of condition (2) in Definition 10 for d instead of dist M are, in fact, based on the positivity of the Mazurkiewicz distance. Nevertheless, upon appealing to results from [1], we comment about consequences of the difference between definitions here and in [1].
(2) Two chains are said to be equivalent if they divide each other. The impression of an end is independent of the choice of representative chain, see [1,Section 4]. Note also that if a chain . Therefore, the relation of division extends in a natural way from chains to ends, defining a partial order on ends.

Definition 12
We say that an end [E k ] is a prime end if it is not divisible by any other end. The collection of all prime ends is called the prime end boundary and is denoted ∂ P .
Similarly, the collection of all prime ends with singleton impressions is denoted ∂ SP .
For the convenience of readers further results describing accessible points and the structure of prime ends in domains (locally) finitely connected at the boundary are presented in Sect. 5, where they are applied.

The class F of mappings
The following class of mappings is the central subject of our studies. Recall the set of assumptions (A) in Preliminaries and also our longstanding assumption that the domains studied in the paper are bounded.

Definition 13
Let (X , d X ) and (Y , d Y ) be metric spaces both satisfying assumptions (A). We say that a homeomorphism f from a domain ⊂ X onto a domain ⊂ Y belongs to class F( , ) if for any two connected sets E, F it holds that In the definition above we provide a minimal set of assumptions on the underlying domains. However, in further studies and examples illustrating this class of mappings we need to impose various additional conditions on the geometry of domains. This is the case, for instance, when one wants to check when all quasiconformal mappings between two given domains belong to class F, see examples below and Remark 6.
Similar class of mappings was introduced and studied in the Euclidean setting in the context of extension properties of homeomorphisms by Zorič [53] (with the inner distance metric called in [53], the Mazurkiewicz metric). However, in [53] one studies only the case of homeomorphisms between a ball and its image under given homeomorphism. Moreover, the results of [53] heavily rely on the discussion of similar extension results for quasiconformal mappings between a Euclidean ball and its image.
Class F contains several well-known classes of mappings as shown by the following examples. We present them in both Euclidean and metric settings and use various techniques to determine when a homeomorphism belongs to F. When discussing the Euclidean case we may assume without the loss of the generality that R n is equipped with the Lebesgue measure, denoted by μ.
Indeed, let E, F ⊂ B n be connected such that dist inn (E, F) = 0. Then it also holds that d(E, F) = 0. Thus, there exists x ∈ E ∩ F and we need to consider two cases: x ∈ Int B n and x ∈ ∂ B n .
In the first case Mod n (E, F, B n ) = ∞, as (E, F, B n ) contains a constant curve. Condition (2) in Definition 6 implies that Mod n ( f (E), f (F), ) = ∞ which together with the injectivity of f in turn again imply that ( f (E), f (F), ) contains a constant curve. Hence, dist inn ( f (E), f (F)) = 0. The similar reasoning gives us implication in the opposite direction.
On the other hand, if x ∈ ∂ B n , then since B n is QC-flat, we have by Definition 3 that Mod n (E, F, B n ) = ∞. By quasiconformality of f we have that

bi-Lipschitz mappings) Let f be a bi-Lipschitz mapping between domains and
in metric spaces such that and are linearly connected (cf. Definitions 2 and 8).
The proof is analogous to the one in part a). Using the above notation, linear connectedness of is used in order to infer from It turns out that the above example can be generalized to include the case of a target domain ⊂ R n finitely connected at the boundary. We present it separately, since the argument differs from the above.

Example 3 Let
= B n ⊂ R n and ⊂ R n be a domain finitely connected at the boundary. Then, every quasiconformal map f ∈ F(B n , ).
In order to show this let us assume, that with the notation of Example 2(a), it holds that dist inn (E, F) = 0, for connected sets E, F ⊂ B n as in Definition 13. If (E ∩ F) ∩ = ∅, then, as above, by injectivity of f we immediately obtain that dist inn ( f (E), f (F)) = 0. Let us, therefore, assume that E and F intersect only at the boundary of . Then, as in the previous example by QC-flatness of B n , we obtain that Let us suppose on the contrary, that dist inn ( f (E), f (F)) > 0. By the assumption f (E) intersects with f (F) only at ∂ . Therefore, Theorem 7.1 in [50] leads to the estimate: Here μ( ) < ∞, since is a domain and hence bounded (see the beginning of Preliminaries) while μ is here assumed to be the Lebesgue measure (see the discussion before Example 2).
This gives us an immediate contradiction with (3), and so also in this case we get In order to prove the opposite implication, let us choose E, F ⊂ such that dist inn (E, F) = 0. Moreover, let x ∈ E ∩ F ∩ ∂ . Finite connectedness of at the boundary implies that for any r > 0 and any neighborhood U ⊂ B(x, r ) of x it holds that at least one of the connected components of E ∩ U and at least one of the connectedness components of F ∩ U belong to the same connectedness component Since B n is locally connected at the boundary and f is a homeomorphism, it holds that and the proof of the Property (F) for f is completed.
Next example generalizes observations from Example 2 to the setting of metric spaces. The example appeals to notions of a uniform domain and the Loewner condition. For their definitions and importance we refer to e.g. Heinonen [20,], Heinonen-Koskela [22] and Väisälä [51]. Let us just mention that among examples of uniform domains there are quasidisks, bounded Lipschitz domains and the von Koch snowflake-type domains.

Example 4 (Quasi)conformal mappings II) Let be a uniform domain in a locally compact Q-regular Q-Loewner space X and
⊂ Y be a domain locally connected at the boundary for spaces X , Y as in Definition 13. Then, quasiconformal mappings as in Definition 6 belong to class F( , ). In order to prove this statement we proceed similarly as in Example 2 and distinguish two cases.
With the notation of Example 2, if x ∈ Int , then as above we appeal to the modulus definition of quasiconformal mappings, their injectivity and relations (1) to obtain that condition (F) of Definition 13 holds.
Let now x ∈ ∂ , sets E, F ⊂ be as in Definition 13 and let f ∈ F( , ). By Fact 2.12 in Herron [24] we know that is QC-flat at x, cf. Definition 3. This, together with the uniformity of and quasiconformality of f allows us to infer from and we are left with two cases to consider: In both cases the reasoning is similar and, therefore, we present the argument only for the case when there exists y ∈ f (E) ∩ f (F) ∩ ∂ . Then, the definition of local connectedness at the boundary gives us that for any ball B(y, r ) we find a neighborhood U ⊂ B(y, r ) of y such that U ∩ is connected and path-connected (Y is quasiconvex by Assumptions (A)). Thus, for every r > 0 we find a curve In order to prove the opposite implication we use the similar approach and assume that dist inn ( f (E), f (F)) = 0. For any sequence (γ n ) of curves joining f (E) with f (F) we consider the sequence of curves ( f −1 (γ n )) joining E and F. Furthermore, we recall that a uniform domain is locally connected at the boundary (see e.g. [1, Proposition 11.2]). Then, the above reasoning results in dist inn (E, F) = 0.
Another wide class of mappings belonging to F is the class of quasisymmetric mappings, see Definition 7 and the discussion before it. Suppose that, under the notation of Definition 13, dist inn (E, F) = 0 for connected subsets E, F in . Similarly, to the discussion in above examples it is enough to consider the case when E ∩ F ∩ ∂ = ∅. Then, there exists a sequence of curves (γ i ) joining E and F in such that lim i→∞ diam γ i = 0. Moreover, since is locally connected at the boundary we find a connected set U ⊂ contained in any ball centered at some x ∈ ∂ ∩ E ∩ F and containing all γ i for large enough i. Proposition 10.8 in [20] gives us the following estimate: where in the last step we again appeal to connectedness of and infer from [20, Theorem 11.3] (see also Corollary 3.12]) that η(0) = 0. [20] we know that f −1 is quasisymmetric and, thus a reasoning analogous to the one for f gives us also the opposite implication in condition (F).

Main results
The main purpose of this section is to show three types of extension results for mappings in class F: • An extension of a homeomorphism between domains to a continuous map between closures of domains (Theorem 3). • An extension of a homeomorphism between domains to a homeomorphism between closures of domains (Theorem 4). • An extension of a homeomorphism between domains to a homeomorphism between the topological and the prime end boundaries (Theorem 5).
We will need the following definitions and results studied in [1]. The following lemma gives us a method of constructing prime ends at accessible boundary points, see Lemma 7.7 in [1]. For the sake of completeness of presentation we state this result specializing it to our case. The lemma is used in the proof of the Koebe theorem as well as in the studies of the Royden boundary, see Sect. 6. Lemma 1 (Lemma 7.7 in [1]) Let ⊂ X be a domain satisfying the bounded turning condition. Let γ : [0, 1] → X be a curve such that γ ([0, 1)) ⊂ and γ (1) = x ∈ ∂ . Let also (r k ) be a strictly decreasing sequence converging to zero as k → ∞. Then, there exist a sequence (t k ) of positive numbers smaller than 1 and a prime end If [E k ] is an end and there exists a curve γ as in the above lemma, then we say that Remark 2 Let X be locally path-connected, i.e. every neighborhood of a point x ∈ X contains a path-connected neighborhood. The Mazurkiewicz-Moore-Menger theorem asserts that if X is a locally connected proper metric space, then X is locally pathconnected, see Kuratowski [ Recall the following important observation, see Remark 7.4 in [1].

Remark 3 Let F ⊂ be a a connected set intersecting both sets A and \ A. Then
An immediate consequence is that if E k , E k+1 and F are connected subsets of satisfying Proof of Lemma 1 For the proof we refer to Lemma 7.7 in [1] and note that [E k ] is an end regardless whether in Definition 10(2) we consider dist or dist M . However, if in Definition 10(2) one assumes condition with dist M , then in order to show that [E k ] is a prime end one needs, additionally, to check that also Proposition 7.1, Lemma 7.3 and Remark 7.4 in [1] remain true for the Mazurkiewicz distance instead of d. This easily follows from Remark 2 and the bounded turning condition holding for .
We will also need the following description of prime ends for domains finitely connected at the boundary.

Theorem 1 (Theorem 10.8 in [1]) Assume that is finitely connected at the boundary. Then all prime ends have singleton impressions, and every x ∈ ∂ is the impression of a prime end and is accessible.
In the special case of a domain locally connected at the boundary, we are able to provide more detailed construction of prime ends.
which contain x in their boundaries define the only prime end [G k ] with x in its impression.
In what follows, we will often appeal to chains/prime ends [G k ] as canonical chains/prime ends and denote them [G x k ] or, for short, [G k ] if a boundary point associated with [G k ] will be clear from the context of discussion.
Denote by ∂ SP the set of all singleton prime ends. of subdomains in satisfying first two conditions of Definition 10 and a sequence of points in converging to a point in the impression of {E k } ∞ k=1 , we can infer that every E k contains almost every element of the sequence of points (cf. Definition 8.1 in [1] for the notion of convergence of a sequence of points to an end).

Lemma 2 Let ⊂ X be a domain satisfying the bounded turning condition. Suppose that {E k } ∞
k=1 is a sequence of bounded subdomains of such that the following conditions hold: Then, for all k there exists n k such that x n ∈ E k for all n > n k . The same assertion holds if we assume dist or dist inn instead of dist M .
Proof Suppose that the assertion of the lemma is false. Then, we may find a subsequence of (x n ), denoted (x n ) ⊂ , and k 0 ∈ N such that x n → x ∈ I [E k ] in d X and x n / ∈ E k 0 for all n > n k 0 . On the other hand the convergence of (x n ) to x implies that there exists a subsequence (x n l ) such that x n l → x in metric d X for l → ∞ with a property that x n l ∈ E k 0 +2 for sufficiently large l. Indeed, the bounded turning condition implies that is locally connected at the boundary, see Remark 1(3). Hence, Theorem 2 gives us that all prime ends in ∂ P are singletons. Therefore, [E k ] is equivalent to a singleton prime end given by a chain of shrinking balls centered at Let now γ be any continuous path in joining two given x n l and x n . Remark 3 and path-connectedness of result in the following inequalities: where L is a bounded turning constant of . The above estimate holds for all sufficiently large n and l leading us to a contradiction with the convergence of (x n ).
We are in a position to present the key technical lemma of the paper. In the statement of the result we abuse notation and write f [E k ] to denote an end determined by an image under a map f of any chain {E k } ∞ k=1 belonging to an end [E k ]. However, Part 3 of Lemma 3 explains that such a notation is justified.
Recall our definition of domains and Assumptions (A). ∈ F( , D). Then the following properties hold:

Lemma 3 Let ⊂ X be a domain locally connected at the boundary and D ⊂ Y be a domain. Let further f
as homeomorphisms maps interiors of domains onto interiors. Thus dist(x, ∂ ) > 0. Moreover, we claim that there exists is a chain, then by Property 3 of chains we have that x ∈ ∞ k=1 E k ⊂ ∂ . But then dist(x, ∂ ) = 0 leading to the contradiction. Then, the injectivity of f gives us that In order to show that Property 2 of Definition 10 holds for sets f (E k ) we again proceed with the proof by contradiction. Namely, suppose that for some m it holds that Then, we find a sequence of curves (γ k ) ⊂ D such that lim k→∞ diam(γ k ) = 0. The existence of such a sequence of curves follows directly from the definition of the Mazurkiewicz distance and (5). Moreover, it holds that { f −1 (γ k )} ∞ k=1 is a sequence of sets intersecting both ∩∂ E m and ∩∂ E m+1 , and the argument for this observation is similar as in the first part of the proof. By Property 2 of chain {E k } ∞ k=1 we have that dist M ( ∩ ∂ E m , ∩ ∂ E m+1 ) > 0. Since ∩ ∂ E m and ∩ ∂ E m+1 are bounded and closed in we can choose the following subsequences: converging to distinct points x ∈ and x ∈ , respectively. However, this contradicts Property (F) of mappings in F( , D). In order to see that this is the case, note that by (1) for all sufficiently large l it holds that This estimate by Property (F) then implies that for all sufficiently large l it holds where t k l ∈ [0, 1] depends on f (x k l ), while t k l ∈ [0, 1] depends on f (y k l ). The existence of such parameters follows from the fact that f (x k l ) ∈ γ k l ∩ D ∩ ∂ E m and f (y k l ) ∈ γ k l ∩ D ∩ ∂ E m+1 . Observation (6) contradicts our assumption that diam γ k l → 0 as l → ∞, and shows that (5) cannot hold. Part (2) Let {F k } ∞ k=1 be a chain in D. Define the following sequence of subsets in : We claim that {E k } ∞ n=1 are acceptable sets in . Indeed, first notice that by the continuity of f sets E k are connected and bounded subsets of . Suppose now, that This contradicts the fact that {F k } ∞ k=1 is a chain. Let us now additionally assume that D is finitely connected at the boundary. Since is locally connected at the boundary, then Theorem 1 and Corollary 1 imply that a Part (3) Let chains {E k } ∞ k=1 and {F l } ∞ l=1 be equivalent. Thus, these chains divide each other. Since {E k } ∞ k=1 divides {F l } ∞ l=1 , then for every l there is k 0 such that E k ⊂ F l for all k ≥ k 0 . This immediately implies that f (E k ) ⊂ f (F l ) for all k ≥ k 0 , as f is a homeomorphism, and so chain Similarly we prove the opposite property, namely that the division of

This observation together with Parts 1 and 2 of the lemma justify the notation f [E k ] := [ f (E k )] for an end (an equivalence class) represented by a chain
consists of a single point only. Recall that by Theorem 1 we know that I [E k ] = {x} ∈ ∂ . Suppose, on the contrary, that I [ f (E k )] contains two distinct points, denoted y, z ∈ ∂ D. Let further (y k ) and (z l ) be sequences of points in D converging to y and z respectively. Clearly, d(y k n , z l n ) > 0 for some subsequences (y k n ) and (z l n ). Moreover, y k n , z l n ∈ f (E m ) starting from some m ≥ m 0 and for sufficiently large n ≥ n 0 . Using the path-connectedness of (implied by its rectifiable connectedness, see Assumptions (A)) we join every y k n and y k n+1 by a curve, denoted γ n and similarly for points z l n and z l n+1 , obtaining for every n a curve γ n . In a consequence we get a sequence of connected sets |γ n | and |γ n | such that dist inn (|γ n |, |γ n |) > 0 for n ≥ n 0 .
However, by considering f −1 (γ n ) and f −1 (γ n ) for n = 1, . . . we arrive at sequences of connected subsets of E m with the property that for every m ≥ m 0 we find n m such that This completes the proof of Part 3 and, thus, the whole proof of Lemma 3 is completed as well. (1) and (2)  The remaining part of Sect. 5 is devoted to presentation of various extension results for mappings in class F and their consequences. We begin with an observation that for domains with regular enough boundaries mappings in class F induce a bijection between the singleton prime ends part of the prime end boundary and the topological boundary of the underlying domains.

Observation 1 Let be a domain locally connected at the boundary, D a domain finitely connected at the boundary and f ∈ F(D, ). Then, there exists a bijective map : ∂ SP D → ∂ defined as follows: if [E k ] is a (singleton) prime end in D, then we assume
From this, injectivity of follows immediately.
Let us choose any x ∈ ∂ and consider [G

Continuous extensions for mappings in F
Recall that for a domain ⊂ X and a map f : → Y one defines the cluster set of f at x as follows: where the intersection ranges over all neighborhoods U of x in X . Let f : → be a homeomorphism and F be its continuous extension to provided that it exists. Denote by Similarly, by ∂ PF we denote a set of prime ends with impressions in F(∂ ). It holds that ∂ PF = ∂ P .
In the theorem below we employ singleton prime ends to provide sufficient and necessary conditions for a homeomorphism in class F to have a continuous extension.

Theorem 3 Let be a domain satisfying the bounded turning condition, be a domain and f ∈ F( , ) be a homeomorphism. Suppose that f has a continuous extension F : →
, then every prime end in the prime end boundary ∂ P is a singleton prime end.
Furthermore, if every prime end in the prime end boundary ∂ P is a singleton prime end, then every homeomorphism f ∈ F( , ) has a continuous extension F : → .
Notice that in the above theorem, if f has a continuous extension, then for every x ∈ ∂ , the cluster set C( f , x) consists of a single point only.
The following remark is used in the proof of Theorem 3. Proof Let F be a continuous extension of f as in the statement of the theorem. Then for any x ∈ ∂ it holds that C( f , x) consists of a single point only. Since is a domain satisfying the bounded turning condition, it is locally connected at the boundary, in particular at x. Therefore, by Corollary 1 a family of sets, denoted U r and defined as connected components of U r := B(x, r ) ∩ containing x in their boundaries (and considered for small enough r ) define a singleton prime end in ∂ P with impression {x}. (Note that since is locally connected at the boundary, U r as defined above, are unique for each small enough r .) By Parts (1) and (3)  Let us now show the necessity part of the theorem. Suppose now that every prime end in ∂ P is a singleton prime end. We can assign to any x 0 ∈ ∂ a prime end [E n ] in ∂ P corresponding to x 0 . The existence of such a prime end follows from the following reasoning: as is a domain satisfying the bounded turning condition, it is locally connected at the boundary (cf. Example 1).
In order to show that F is continuous in we need to consider four cases. Case 1. Let x ∈ and x n → x in d X for a sequence of points (x n ) ⊂ . Then F ≡ f and the continuity of F follows from the continuity of f . Case 2. Let x ∈ ∂ and x n → x in d X for a sequence of points such that (x n ) ⊂ for large enough n. Furthermore, let [G k ] be the canonical prime end in obtained by Corollary 1 satisfying I [G k ] = {x} (as in the paragraph before formula (8)). Since d X (x n , x) → 0 for n → ∞ we have by Lemma 2, applied to E k := G k for k = 1, 2, . . ., that x n ∈ G k for every k and all sufficiently large n; hence f (x n ) ∈ f (G k ). Furthermore, by the above discussion and Remark 5 we have that Therefore, f (x n ) → y x = F(x) in d Y for n → ∞ and the continuity of F follows.
Case 3. Let x ∈ ∂ and x n → x in d X for a sequence of points such that (x n ) ⊂ ∂ for sufficiently large n. By the continuity result proven in Case 2, for every x n we can find such a point x n ∈ that By the choice of sequence (x n ) and by the triangle inequality we obtain that and hence x n → x. Using again Case 2, we have that for any > 0, there is n( ) such that for all n > n( ) it holds d Y (F(x n ), F(x)) < 2 . The triangle inequality implies that and the continuity of F follows in this case as well. Case 4. Finally, let x ∈ ∂ and x n → x in d X for a sequence of points (x n ) ⊂ for large enough n. Then we may find a subsequence of (x n ), for simplicity again denoted (x n ), which satisfies either Case 2 or Case 3. This reduces the discussion to one of these cases and, thus, completes the proof of Theorem 3.

Corollary 2 Let be a domain satisfying the bounded turning condition and be a domain finitely connected at the boundary. Then, a homeomorphism f ∈ F( , ) extends to a continuous mapping F : →
. Furthermore, = .
Proof Theorem 1 states that finitely connected at the boundary domain has only singleton prime ends. Then, Theorem 3 implies immediately the first part of the assertion.
In order to show the second assertion, let us suppose that ∂ \ = ∅, i.e. there exists Then Theorem 1 implies that there is [E n ] ∈ ∂ SP such that I [E n ] = {y}. Furthermore, Part 2 of Lemma 3 gives us that [ f −1 (E n )] is a singleton prime end in with impression denoted by {x y }. Then, for some neighborhoods U n of x y . In a consequence, the definition of cluster sets (7) implies that y ∈ C( f , x y ) and, hence, y ∈ contradicting our initial assumption. This completes the proof of the second assertion and the whole proof of the corollary as well.

Remark 6
In the setting of quasiconformal analysis in R n the results corresponding to Corollary 2 are due to e.g. Herron-Koskela, see Theorem 3.3 and Corollary 3.5 in [25]. In particular, part (a) of Corollary 3.5 asserts that continuous extension of a quasiconformal mapping between domains and to the topological closure of domains exists if and only if is QC-flat on the boundary and is a QED domain, cf. Definition 3 above and [25, Section 2.B]. Furthermore, Lemma 5.6 in Martio-Ryazanov-Srebro-Yakubov [35] shows that a QC-flat domain is strongly accessible, which in turn results in finite connectedness at the boundary, by the argument verbatim to the proof of Theorem 6.4 in Näkki [41]. Note that domains satisfying the bounded turning condition are locally connected at the boundary, see Part 3 of Remark 1, while QED domains are finitely connected at the boundary, cf. Example 1.
In the setting of metric spaces an approach to extension problem for quasiconformal mappings is presented in Andrei [5].

Homeomorphic extensions for mappings in F
In our next results we describe conditions for existence of homeomorphic extensions of mappings in F. In the setting of quasiconformal mappings in R n the corresponding results can be found in Väisälä [50], cf. Theorems 17.17,17.18 and 17.20, also in Herron-Koskela [25], Theorem 3.3(e) and Corollaries 3.5(c) and 3.6. Conditions presented in [50] involve collared domains, see Definition 4 and Jordan domains, while conditions in [25] appeal to quasiextremal distance domains, QC-flat and QCaccessible domains, see Sections 2.B and 3.A in [25]. Below we take different approach and apply prime ends to ensure existence of homeomorphic extensions.

Theorem 4 Let be a domain satisfying the bounded turning condition and D be a domain. If a homeomorphism f ∈ F( , D) extends to a homeomorphism F : → D, then it holds that:
(a) non-equivalent prime ends in ∂ P D have distinct impressions, and (b) every prime end in ∂ P D is a singleton prime end.
Moreover, let us assume that (a) and (b) hold, and additionally that (b') every x ∈ ∂ D is the impression of some prime end (in ∂ SP D).

Then f ∈ F( , D) posseses a homeomorphic extension F : → D.
Note that, by Theorem 1, Theorem 4 holds for instance if D is a domain locally connected at the boundary.

Remark 7
In general a map in class F( , D) need not preserve the local connectivity at the boundary. Indeed, if is a unit disc in R 2 and D ⊂ R 2 is a slit-disc, then direct computations show that a Riemann map f ∈ F( , D) even though D fails to be locally connected at the boundary. Nevertheless, if a map f ∈ F( , D) extends to a homeomorphism F : → D, then local(finite) connectivity at the boundary of is preserved under F and so D is also locally(finite) connected at the boundary, cf. Remark 17.8 in [50]. Therefore, the first part of Theorem 4 additionally implies that D must be locally connected at the boundary. Since F and F −1 are injective, then it is not possible that two nonequivalent prime ends [E k ] and [F n ] in D have the same (singleton) impressions, that is it cannot hold that For the opposite implication suppose that ∂ SP D = ∂ P D, non-equivalent prime ends have distinct impressions and also that (b') holds. Then, the second part of Theorem 3 implies continuity of extension map F defined in (8). In order to prove injectivity of F let us consider two cases: first, for distinct points x, y ∈ or, respectively, if x ∈ , y ∈ ∂ we clearly have that due to f being a homeomorphism and the definition of F. For the second case let x, y ∈ ∂ be distinct points and suppose on the contrary that Local connectivity at the boundary of implies existence of canonical prime ends If (9) ) and [ f −1 (E n )] are equivalent. However, this is impossible, since [G x k ] is a singleton prime end and [ f −1 (E n )] is assumed to be a non-singleton end. Thus, [ f −1 (E n )] is a singleton end, which by Part (1) of Remark 5 implies that it is a singleton prime end. Therefore, by Corollary 1 there is a point y ∈ ∂ such that I [ f −1 (E n )] = {y}. Moreover, by construction F(y) = x, cf. (8).
Finally, F −1 is continuous by the argument similar to the one for the continuity of map F in Theorem 3.

Homeomorphic extensions for mappings in F with respect to topological and prime end boundaries
Below we deal with the extension of the Mazurkiewicz distance between sets to the setting of prime ends. In order to show the main result of this section, we need to recall the Mazurkiewicz boundary and a relation between Mazurkiewicz and prime end boundaries.
Let ⊂ X be a domain. Then its completion with respect to the Mazurkiewicz distance d M is denoted M , and d M extends to M in the standard way by defining the following equivalence relation between two d M -Cauchy sequences Let ⊂ X be a domain finitely connected at the boundary. By Theorem 1 we know that ∂ SP = ∂ P and so all prime ends are singletons. Observation 2 together with the definition of allow us to define y) x, y ∈ .
The following theorem is the main result of this section.

Theorem 5 Let be a domain satisfying the bounded turning condition and D be a domain finitely connected at the boundary.
Then, a homeomorphism f ∈ F( , D) extends to a homeomorphism F P : → D ∪ ∂ P D continuous with respect to the Mazurkiewicz distance dist * M . Namely, we define where [G x k ] is a unique prime end in ∂ SP given by Corollary 1 such that I [G x k ] = {x}. Before proving this result let us provide some of its consequences and compare it to previous extension results. [42]) Let B n ⊂ R n be a ball and D ⊂ R n be a collared domain. Then a quasiconformal homeomorphism f : B n → D extends to a homeomorphism F P : B n → D ∪ ∂ P D.

Corollary 3 (cf. Theorem 4.2 in Näkki
Proof Notice that a ball B n ⊂ R n satisfies the bounded turning condition and a collared domain (see Definition 4) D ⊂ R n is locally connected at the boundary, see Theorem 17.10 in [50]. By the discussion in Example 2(a) above, we get that f ∈ F(B n , D) and, thus Theorem 5 results in the assertion of the corollary.
Similarly, by Example 3 and Theorem 5, below we obtain Corollary 4. There we retrieve the extension result for quasiconformal mappings discussed in Section 3.1 in Väisälä [52]. The prime end boundary studied in [52] is defined via accessible curves and Väisälä's proof is based on the property that the impression of every singleton prime end in the domains finitely connected at the boundary is accessible (cf. Theorem 1 and Lemma 1 for the relation between prime ends and accessibility in our setting).
In particular, if f is conformal, n = 2 and D is simply-connected, then we obtain a counterpart of the celebrated Carathéodory extension theorem, see [11]. However, our result differs from Carathéodory's theorem as we use different prime ends theory than in [11].
Corollary 4 (cf. Section 3.1 in [52]) Let B n ⊂ R n be a ball and D ⊂ R n be a domain finitely connected at the boundary. Then a quasiconformal homeomorphism f : B n → D extends to a homeomorphism F P : B n → D ∪ ∂ P D.
Let us also add that in the setting of quasiconformal mappings in domains in the Heisenberg group H 1 the result corresponding to Theorem 5 has been recently proven in [3,Theorem 3.7]. There, we assume that is collared and the theory of prime ends studied in [3] differs from the one above.
We now turn to proving Theorem 5. Recall that since satisfies the bounded turning condition, it is locally connected at the boundary, see Remark 1(3).

Proof of Theorem 5
By assumptions of the theorem and Corollary 2 we obtain that a homeomorphism f ∈ F( , D) extends continuously to F : → D. (Here, likewise in Theorem 3 and Corollary 2, continuity of F is understood with respect to the underlying distances in metric spaces X and Y ).
Lemma 3 implies that prime ends in ∂ P = ∂ SP correspond to prime ends in ∂ P D under a mapping in F( , D) and opposite. This observation allows us to define F P : → D P (where D P := D ∪ ∂ P D), and show that F is a unique bijective extension of f . Namely, let x ∈ ∂ and [G x k ] be a unique prime end in ∂ SP given by Corollary 1 such that I [G x k ] = {x}. We define F P as in (11) above. Mapping F P is well-defined by the definition of prime ends and Lemma 3. The injectivity of F P follows from the injectivity of f and the following argument: Suppose on the contrary that there exist x = y ∈ ∂ such that  Thus, Cases 1 and 2 show that dist * M (F(y), ([E n ])) < for all y ∈ U δ and continuity of F P at x follows.
Finally, we show that F −1 P is continuous with respect to metrics dist * M in D and d X in . Then, the proof that F P is a homeomorphism will be completed.
For a set U δ defined as above we choose a compact set G := ∂ B(x, δ 2 ) ∩ . By inequalities (1), it holds that dist inn (G, x) > dist X (G, x) > 0. Therefore, since F is a homeomorphism such that F| = f belongs to class F( , D), the definition of F allows us to infer that dist inn (F(G), I [E n ]) > 0. Finally, let us choose

Applications
This section is devoted to some applications of extension results and prime ends. First, we discuss and prove a variant of the Koebe theorem on arcwise limits along end-cuts for mappings in class F. In the second part, we relate the prime end boundary as defined in Sect. 3 and the Royden boundary. The latter one type of the boundary arises naturally in the extension problems, see Theorem 7.

The Koebe theorem
In 1915 Koebe [28] proved that a conformal mapping from a simply-connected planar domain onto the unit disc has arcwise limits along all end-cuts of . The purpose of this section is to show a counterpart of Koebe's result for mappings in the class F in metric spaces. First, we need to introduce two auxiliary definitions.
In the Euclidean setting the following definition appears in Näkki [39,40] as an uniform domain. However, in order to avoid confusion with uniform domains studied above and by e.g. Väisälä [51] (cf. Definition 11.1 in [1]) we shall use a term mod-uniform domains instead. See also [3,Definition 4.1] for mod-uniform domains considered in the setting of the Heisenberg group H 1 .

Definition 15
Let X be a metric measure space equipped with a Q-regular measure. We say that a domain ⊂ X is mod-uniform if for every t > 0 there is > 0 such that if In order to illustrate the definition, let us recall that by Herron [24, Fact 2.12] a uniform subdomain in a locally compact Q-regular Q-Loewner space is mod-uniform.
Next, we refine the definition of a cluster set and include the behavior of a mapping along an end-cut, cf. (7) and Definition 14.

Definition 16
Let ⊂ X be a domain, f : → Y be a mapping and x ∈ ∂ . We say that a sequence of points {x n } ∞ n=1 in converges along an end-cut γ at x if there exists a sequence {t n } ∞ n=1 with 0 < t n < 1 such that lim n→∞ t n = 1 and x n = γ (t n ) and We say that a point x ∈ X belongs to the cluster set of f at x along an end-cut γ from x, denoted by C γ ( f , x), if there exists a sequence of points {x n } ∞ n=1 converging along γ at x, such that If C γ ( f , x) = {y}, then y is called an arcwise limit(asymptotic value) of f at x.
The following result extends Koebe's theorem and Theorem 7.2 in Näkki [42] to the setting of mappings in F. Moreover, we study more general end-cuts than in [42]. We note that in Theorem 6 both domains and D are studied with respect to the topological boundaries (see also Remark 9 following the proof of Theorem 6).

Remark 8
A variant of the Koebe theorem for quasiconformal mappings between domains in the Heisenberg group H 1 such that one domain is finitely connected at the boundary and the target domain is mod-uniform is proved in [3]. As observed by Näkki, mod-uniform domains in R n are finitely connected at the boundary, see Theorem 6.4 in [41]. However, a domain ⊂ R n finitely connected at the boundary is mod-uniform if and only if can be mapped quasiconformally onto a collared domain, see [41,Section 6.5].

Proof of Theorem 6
Since by Remark 1(3) we have that is locally connected at the boundary, then Theorem 1 implies that every point in the boundary ∂ is accessible. Let x ∈ ∂ and suppose that γ is an end-cut in from x (cf. Definition 14). By Lemma 1 there exists a singleton prime end [E n ] such that x is accessible through [E n ] (cf. the statement following Lemma 1). Let x n := γ (t n ) for n = 1, 2, . . . and some t n → 1 as n → ∞ be any sequence of points converging to x in d X . Since every x n belongs to some acceptable set E n in [E n ] and by Part 3 of Lemma 3 it holds that [ f (E n )] is a singleton prime end in D, we obtain a corresponding sequence of points f (x n ) in D for n = 1, 2, . . . which converges in d Y to Moreover, Theorem 1 together with Theorem 3 (Corollary 2) give us the existence of F, a continuous extension of f to , and that it holds that Since every prime end in D is a singleton prime end, therefore it holds that the cluster set of f at x along an end-cut γ from x consists of a single point only, namely C γ ( f , x) = {x }. By Definition 16, this implies that f has an arcwise limit at x.

Remark 9
In order to obtain (12) we use the fact that f (x n ) ∈ f (E n ) for n = 1, 2, . . .. Moreover, we also use that [ f (E n )] is a singleton prime end, and hence by Lemma 7.2 in [1], it holds that diam f (E k ) → 0, as k → ∞, cf. Remark 5.
By narrowing the class of mappings to the quasiconformal ones (cf. Definition 6) we may weaken assumptions in Theorem 6 on by the price of strengthening slightly requirements on the target domain. In a consequence we obtain the following result.
Corollary 5 Let X be a Q-regular metric measure space with Q > 1. Let f : → D be a quasiconformal map between a domain ⊂ X finitely connected at the boundary and a mod-uniform domain D ⊂ X . Then f has arcwise limits along all end-cuts of .
The proof closely follows steps of the corresponding proof of the Koebe theorem for quasiconformal mappings in the Heisenberg group, see Theorem 5.1 in [3]. Hence, we omit the proof.

Prime ends and Royden boundaries
In this section we relate our results on prime ends with the homeomorphic extensions of quasiconformal mappings and the theory of Royden boundaries. Let us briefly set up the stage for our considerations and recall necessary notions from the theory of Royden algebras and compactifications. Our presentation is based on a work by Soderberg [47].
In what follows let , be domains in R n for n ≥ 2 and, without the loss of the generality, let us futher assume that R n is equipped with the Lebesgue measure μ. We define a Royden algebra on and denote A( ), as an algebra of all bounded continuous functions u : → R with pointwise addition and multiplication such that the first order weak partial derivatives of u exist and belong to L n ( ). The norm of u ∈ A( ) is defined as follows: Such an algebra is a commutative regular Banach algebra which separates points in and is inverse-closed (see Preliminaries in [47] for further details).
It turns out that there is a correspondence between quasiconformal mappings and Royden algebras isomorphisms. Namely, a quasiconformal map f : → defines an algebra isomorphism f * : A( ) → A( ) by the formula Furthermore, an algebra isomorphism between A( ) and A( ) induces a quasiconformal map f : → , cf. [47,Theorem 1.1]. Similarly to the setting of prime end boundaries (see Theorem 5), quasiconformal mappings give rise also to maps between an ideal type of boundary defined via the Royden algebras. Namely, a collection of all non-zero, bounded linear homomorphisms χ : A( ) → R is called a Royden compactification * . Thus, * ⊂ A( ) a dual space of A( ). Moreover, * is a compact Hausdorff space in the relative weak * topology generated by A( ). Points x ∈ can be identified with a subset of * denotedˆ via point evaluation homomorphismŝ Hence, the identification x →x defines a homeomorphic embedding of onto the imageˆ ⊂ * . We define the Royden ideal boundary of as follows, cf. [47]: Let T = f * be the Royden algebra isomorphism defined above for a given quasiconformal map f . One defines an adjoint operator T * : * → ( ) * by the formula Operator T * is a homeomorphic extension of f to the Royden compactification * with the property that T * maps the Royden ideal boundary of onto the corresponding Royden ideal boundary of . Related is the following notion crucial for the further discussion. Let x ∈ , then we denote by x ⊂ * a fiber over x, i.e.
We refer to Sections 3 and 4 in [47] for definitions and properties of Royden nets, in particular see [47,Definition 3.3]. It turns out that x is a compact subset of , also that different boundary points have distinct fibers. Moreover, = x∈∂ x . The following result connects the topic of our work to Royden algebras and the Royden compactification. Theorem 7 (Theorem 5.1 in [47]) Let f : → be a quasiconformal map and T = f * : A( ) → A( ) be the corresponding Royden algebras isomorphism. A homeomorphic extension of f , denoted F : → , exists if and only if for every x ∈ ∂ there is y ∈ ∂ such that T * ( x ) = y . Moreover, it holds that F(x) = y.
We are in a position to present the main result of this section (cf. Theorem 7.4 in [47] for a different prime ends theory).

Theorem 8 Let
⊂ R n be a domain finitely connected at the boundary. Then, for every point x ∈ ∂ it holds that the set of components of a fiber x coincides with the set of prime ends with impressions {x}.
In the case of John domains, Theorem 8 allows us to provide the following estimate for a number of components for fibers in the Royden compactification.

Corollary 6
Let ⊂ R n be a John domain with the John constant C . Then, for any x ∈ ∂ the number of components of a fiber x is at most N (n, C ).
Proof Theorem 11.3 in [1] asserts that for a John domain ⊂ R n there exists a constant N , depending only on the doubling constant C μ = 2 n , the John constant C and the quasiconvexity constant, such that is at most N -connected at every boundary point. Then, Proposition 10.13 in [1] gives us that every point x ∈ ∂ is the impression of exactly N distinct prime ends. Moreover, there is no other prime end with x in its impression. These propositions together with Theorem 8 result in the assertion of the corollary.
The proof of Theorem 8 requires the following observation, specialized to the Euclidean setting, about the structure of prime ends for domains finitely connected at the boundary. One can think about the lemma as a counterpart of the construction of canonical prime ends obtained in Corollary 1 for the setting of domains locally connected at the boundary. The main difference is that now every boundary point can be the impression of more than one prime end. Lemma 4 (Lemmas 10.5 and 10.6 in [1]) Assume that a domain ⊂ R n is finitely connected at x 0 ∈ ∂ . Let A k be such that: Furthermore, let 0 < r k < dist(x 0 , ∩ ∂ A k ) be a sequence decreasing to zero. Then for each k = 1, 2, . . . there is a component G j k (r k ) of B(x 0 , r k ) ∩ intersecting A l for each l = 1, 2, . . ., and such that x 0 ∈ G j k (r k ) and G j k (r k ) ⊂ A k .
Moreover, there exists a prime end [F k ] such that I [F k ] = {x 0 }, F k = G j k (r k ) for some 1 ≤ j k ≤ N (r k ) and F k ⊂ A k , k = 1, 2, . . ..
In the proof below we follow the approach of the proof for Theorem 7.4 in Soderborg [47]. However, we employ the prime ends as described in Sect. 3, especially the structure of the prime ends boundary for domains finitely connected at the boundary.

Proof of Theorem 8
Recall that by Theorem 1 every x ∈ ∂ is an impression of some prime end [E n ] ∈ ∂ P and all prime ends are singletons, i.e. ∂ P = ∂ SP . We define a map R : ∂ P → as follows: for x satisfying the following two conditions: (1) π( x ) = I [E n ] = {x} ⊂ ∂ , where π : * → is a natural continuous projection map, surjective from onto ∂ (see Section 4 and Theorems 4.2 and 4.3 in [47]).
(2) for every χ ∈ x and for every neighborhood U of x (in R n ) it holds that Q(U , χ) = G j k (r k ), for some j k ∈ N, r k > 0 where Q(U , χ) is a unique component of U ∩ such that each Royden net corresponding to χ lies eventually in Q(U , χ) (the existence of such a neighborhood is proved in [47, Lemma 7.1]) and G j k (r k ) is one of the sets constructed in Lemma 4.
Theorem 7.2 in [47] stays that two elements χ, η ∈ x belong to the same component of x if and only if Q(U , χ) = Q(U , η) for each neighborhood U of x in R n . Moreover, equivalent chains of the given prime end have the same impressions. Therefore, the map R is well defined and injective (by [47,Theorem 7.2] and Theorem 1). The proof will be completed once we show that R is onto. Let be a component of Let us choose a sequence of points x j ∈ Q j for j = 1, 2, . . . and join every x j with x j+1 by a path γ j . The resulting path γ has one endpoint at x 1 and γ (x j ) → x for j → ∞. Next, Lemma 4 gives us a prime end [F k ] with F k = G j k (r k ) for k = 1, 2, . . . and I [F k ] = {x}. This together with the definition of γ imply that [F k ] is accessible through γ . Finally, for any neighborhood U of x it holds that Q m ⊂ U for m large enough. Moreover, Q(U , χ) is a component of U containing Q m . On the other hand, Q m contains some subpath of γ , and hence one of the acceptable sets G j l (r l ) of prime end [F k ] is a component of U ∩ containing Q m . In a consequence Q(U , χ) = G j l (r l ) and the proof is completed.
The following observation is an immediate consequence of Theorem 7 and the proof of Theorem 8.

Corollary 7
Let ⊂ R n be a domain finitely connected at the boundary and f : → be a quasiconformal map. If f extends homeomorphically to a map F : → , then there exists a correspondence between prime ends with impressions at a point x ∈ ∂ and prime ends with impressions at point F(x) ∈ ∂ .
In other words, prime ends associated with a given boundary point in ∂ may not be mapped to prime ends with impressions at different points in ∂ (they have to be mapped to prime ends with the same impressions at F(x)).
Moreover, note that in the above corollary, the existence of a homeomorphic extension to topological closures of domains implies that is finitely connected at the boundary.
Proof We utilize map R studied in the proof of Theorem 8 and define a mapping F P : ∂ P → ∂ P by the following formula , for any [E n ] ∈ ∂ P .
By the above discussion T * is a homeomorphism (an extension of f ) between Royden compactifications * and ( ) * and since mappings R and R are bijections, the proof of the corollary is completed.