A characterization of sets in R 2 with DC distance function
aa r X i v : . [ m a t h . C A ] J un A CHARACTERIZATION OF SETS IN R WITH DC DISTANCEFUNCTION
DUˇSAN POKORN ´Y AND LUDˇEK ZAJ´IˇCEK
Abstract.
We give a complete characterization of closed sets F ⊂ R whosedistance function d F := dist ( · , F ) is DC (i.e., is the difference of two convexfunctions on R ). Using this characterization, a number of properties of suchsets is proved. Introduction
The present article is a continuation of the article [15] which studies closed sets F ⊂ R d , whose distance function d F := dist ( · , F ) is DC (i.e., is the difference oftwo convex functions on R d ). So we first briefly recall the motivation for our studyand mention some results of [15].It is well-known (see, e.g., [1, p. 976]) that, for a closed F ⊂ R d , the function( d F ) is always DC but d F need not be DC. The main motivation for the paper [15]was the question whether d F a DC function if F ⊂ R d is a graph of a DC function g : R d − → R . This question naturally arises in the theory of WDC sets (see [10,Question 2, p. 829] and [9, 10.4.3]). Let us note that WDC sets form a substantialgeneralization of Federer’s sets with positive reach and still admit the definition ofcurvature measures (see [13] or [9]) and F as in the above question is a naturalexample of a WDC set in R d . The main result of [15] gives the affirmative answerto the above question in the case d = 2, but the case d > Definition 1.1.
For d ∈ N , we set D d := { ∅ } ∪ { ∅ = A ⊂ R d : A is closed and d A is DC } . The elements of D d will be called D d sets. Using this notation, the main result of [15] asserts that(1.1) graph g ∈ D , whenever g : R → R is DC . If A ⊂ R d is a set with positive reach, then (see [15, Proposition 4.2]) A ∈ D d and also ∂A ∈ D d and R d \ A ∈ D d . It implies (see [15, Corollary 4.5]) thatgraph g ∈ D whenever g : R d − → R is a semiconcave function.It is not known whether each WDC set A ⊂ R d belongs to D d , but the statementis true for d = 2 by [16, Theorem 3.3].Several results concerning general properties of classes D d were obtained in [15,Section 4]; we recall them in subsection 2.3 below.In the present article, we use the results of [15] to give complete characterizationsof D sets. These characterizations are based on the notion of (s)-sets (“special D -sets”) which have a formally simple definition (Definition 3.1) but their structure Date : June 9, 2020.2010
Mathematics Subject Classification.
Key words and phrases.
Distance function, DC function, subset of R .The research was supported by GAˇCR 18-11058S. can be rather complicated. The proofs of these characterizations are quite long andtechnical; they are contained in Sections 3 and 4.Section 5 contains applications of our characterizations. For example, we prove(Proposition 5.5) that each nowhere dense D set is a countable union of DC graphs(defined in Definition 2.14). Further, the system of all components of each D set isdiscrete (see Theorem 4.20) and each component is pathwise connected and locallyconnected (see Proposition 5.6). An important application is Theorem 5.11; itsparticular case asserts that if F : R → R is a bilipschitz bijection which is C smooth (or, more generally, DC), then F ( M ) ∈ D for each M ∈ D . It is an openquestion whether D d has this stability property for d > Preliminaries
Basic notation.
We denote by B ( x, r ) ( U ( x, r )) the closed (open) ball withcentre x and radius r . The boundary and the interior of a set M are denoted by ∂M and int M , respectively. A mapping is called K -Lipschitz if it is Lipschitz witha (not necessarily minimal) constant K ≥
0. In any vector space V , we use thesymbol 0 for the zero element and span M for the linear span of a set M .In the Euclidean space R d , the origin is denoted by 0, the norm by | · | andthe scalar product by h· , ·i . By S d − we denote the unit sphere in R d . Tan ( A, a )denotes the tangent cone of A ⊂ R d at a ∈ R d ( u ∈ Tan (
A, a ) if and only if u = lim i →∞ r i ( a i − a ) for some r i > a i ∈ A , a i → a ).If x, y ∈ R d , the symbol x, y denotes the closed segment (possibly degenerate).If also x = y , then l ( x, y ) denotes the line joining x and y .For B ⊂ R and t ∈ R , we set B [ t ] := { y ∈ R : ( t, y ) ∈ B } . We also define π : R → R by π ( x, y ) = x .The distance function from a set ∅ = A ⊂ R d is d A := dist ( · , A ) and the metricprojection of z ∈ R d to A is Π A ( z ) := { a ∈ A : dist ( z, A ) = | z − a |} .A system A of subsets of R d is called discrete, if each z ∈ R has a neighbourhoodwhich intersects at most one A ∈ A . A set D ⊂ R d is called discrete, if {{ d } : d ∈ D } is discrete.Under a rotation in R we always understand a rotation around the origin.For f : R d → R k and x, v ∈ R d , the one-sided directional derivative of f at x indirection v is f ′ + ( x, v ) := lim t → f ( x + tv ) − f ( x ) t . DC functions.
Let f be a real function defined on an open convex set C ⊂ R d .Then we say that f is a DC function , if it is the difference of two convex functions.We say that F = ( F , . . . , F k ) : C → R k is a DC mapping if all components F i of F are DC functions.Semiconvex and semiconcave functions are special DC functions. Namely, f is a semiconvex (resp. semiconcave ) function, if there exist a > g on C such that f ( x ) = g ( x ) − a | x | (resp. f ( x ) = a | x | − g ( x )) , x ∈ C. We will use the following well-known properties of DC functions and mappings.
Lemma 2.1.
Let C be an open convex subset of R d . Then the following assertionshold. (i) If f : C → R and g : C → R are DC, then (for each a ∈ R , b ∈ R ) thefunctions | f | , af + bg , max( f, g ) and min( f, g ) are DC.(ii) Each locally DC mapping f : C → R k is DC.(iii) Each DC function f : C → R is Lipschitz on each compact convex set Z ⊂ C . CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 3 (iv) Let G ⊂ R d and H ⊂ R k be open sets. Let f : G → R k and g : H → R p belocally DC, and let f ( G ) ⊂ H . Then g ◦ f is locally DC on G .(v) Let G, H ⊂ R d be open sets, and let f : G → H be a locally bilipschitz andlocally DC bijection. Then f − is locally DC on H .(vi) Let f i : C → R , i = 1 , . . . , k , be DC functions. Let f : C → R be acontinuous function such that f ( x ) ∈ { f ( x ) , . . . , f k ( x ) } for each x ∈ C .Then f is DC on C .(vii) Each C function f : C → R is DC.Proof. Property (i) follows easily from definitions, see e.g. [22, p. 84]. Property(ii) was proved in [11]. Property (iii) easily follows from the local Lipschitznessof convex functions. Assertion (iv) is “Hartman’s superposition theorem” from[11]; for the proof see also [22] or [23, Theorem 4.2]. Statement (v) follows from[23, Theorem 5.2]. Assertion (vi) is a special case of [23, Lemma 4.8.] (“Mixinglemma”). Property (vii) follows e.g. from [23, Proposition 1.11] and (ii). (cid:3)
The following easy result ([14, Lemma 2.3]) is well-known.
Lemma 2.2.
Let F : ( a, b ) → R d be a DC mapping and x ∈ ( a, b ) . Then theone-sided derivatives F ′± ( x ) exist. Moreover (2.1) lim t → x + F ′± ( t ) = F ′ + ( x ) and lim t → x − F ′± ( t ) = F ′− ( x ) which implies that F ′ + ( a ) is the strict right derivative of F at x , i.e., (2.2) lim ( y,z ) → ( x,x ) y = z, y ≥ x, z ≥ x F ( z ) − F ( y ) z − y = F ′ + ( x ) . The notion of DC mappings between Euclidean spaces was generalized in [23] tothe notion of DC mappings between Banach spaces using the notion of a “controlfunction”. We will use this notion only for real functions defined on open intervals I ⊂ R . In this context we have (cf. [23, Definition 1.1]) that a convex function ϕ : I → R is a control function for a function f : I → R if and only if both ϕ + f and ϕ − f are convex functions.It is an easy fact (cf. [23, Lemma 1.6 (b)]) that f : I → R is DC if and only ifit has a control function. We will use the following immediate consequence of [23,Proposition 1.13]. Lemma 2.3. If ϕ is a control function for f on an open interval I , then (cid:12)(cid:12)(cid:12)(cid:12) f ( z + k ) − f ( z ) k − f ( z ) − f ( z − h ) h (cid:12)(cid:12)(cid:12)(cid:12) ≤ ϕ ( z + k ) − ϕ ( z ) k − ϕ ( z ) − ϕ ( z − h ) h , whenever k > , h > , z ∈ I , z + k ∈ I and z − h ∈ I . For the origin of the following definition, see [18, p. 28].
Definition 2.4.
Let f be a function on [ a, b ] . For every partition D = { a = x DUˇSAN POKORN´Y AND LUDˇEK ZAJ´IˇCEK Lemma 2.5. If f is a DC function on ( a, b ) with a control function ϕ and a < c Definition 2.6. We will say that a function defined on a set ∅ = D ⊂ R is a DCRfunction if it is a restriction of a DC function defined on R . The following facts are well-known. Lemma 2.7. Let f be a continuous real function on [ a, b ] . Then the followingconditions are equivalent.(i) f is a DCR function.(ii) f is the difference of two Lipschitz convex functions.(iii) f has a bounded convexity.(iv) f ′− ( x ) exists for each x ∈ ( a, b ) and V ( f ′− , ( a, b )) < ∞ .(v) f is a restriction of a DC function defined on some ( u, v ) ⊃ [ a, b ] . (Here V ( f ′− , ( a, b )) means the variation of f ′− over ( a, b ) in the usual sense; see,e.g. [24, p. 322].) Proof. The implication ( i ) ⇒ ( ii ) follows by Lemma 2.1 (iii) and ( ii ) ⇒ ( i ) holdssince each convex Lipschitz function on [ a, b ] can be extended to a convex functionon R . The equivalence ( ii ) ⇔ ( iii ) easily follows from [18, Theorem D, p. 26] and( iii ) ⇔ ( iv ) is a particular case of [24, Proposition 3.4, p. 382]. The implication( i ) ⇒ ( v ) is trivial and ( v ) ⇒ ( iii ) follows from Lemma 2.5. (cid:3) We will need the following facts concerning DCR functions. They immediatelyfollow from [24, Proposition 4.2] (or can be rather easily obtained using Lemma 2.1(iv),(v)). Lemma 2.8. Let ϕ : [ a, b ] → [ c, d ] be a DCR increasing bilipschitz bijection and let ω : [ c, d ] → R be a DCR function. Then(i) the function ω ◦ ϕ is DCR on [ a, b ] and(ii) the function ϕ − is DCR on [ c, d ] . We will need also the following “DCR mixing lemma”. Lemma 2.9. Let I ⊂ R be a closed interval and let f : I → R be a con-tinuous function. Let f i : I → R , i = 1 , . . . , k , be DCR functions such that f ( x ) ∈ { f ( x ) , . . . , f k ( x ) } for each x ∈ I . Then f is DCR.Proof. Let ˜ f : R → R be a continuous extension of f which is locally constanton R \ I and let ˜ f i : R → R , i = 1 , . . . , k , be a DC extension of f i . Thenthere are two constant (and so DC) functions ˜ f k +1 , ˜ f k +2 on R such that ˜ f ( x ) ∈{ ˜ f ( x ) , . . . , ˜ f k +2 ( x ) } , x ∈ R . Consequently ˜ f is DC by Lemma 2.1 (vi), and so f isDCR. (cid:3) The following lemma is a version of the “mixing lemma” [23, Lemma 4.8] (cf.Lemma 2.1 (vi)), which we need. Note that [23, Lemma 4.8] works even with DCmappings between Banach spaces, and Lemma 2.10 follows from its proof but notfrom its formulation. Lemma 2.10. Let F i , i = 1 , . . . , k , be DC functions on an open interval J ⊂ R .Then there exists a convex function ϕ on J with the following property:(P) If F is a continuous function on an open interval I ⊂ J and F ( x ) ∈{ F ( x ) , . . . , F k ( x ) } , x ∈ I , then F is a DC function with control function ϕ | I . CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 5 Proof. Let f i be a control function for F i on J , i = 1 , . . . , k . Set ϕ := k X i,j =1 h i,j , where h i,j := f i + f j + 12 | F i − F j | . The proof of [23, Lemma 4.8] (where ϕ is denoted by f ) gives the assertion ofproperty (P) for I = J . Observing that f i | I is a control function for F i | I , property(P) follows. (cid:3) We will need also the following easy “Lipschitz mixing lemma”. Lemma 2.11. Let K > and f i , i = 1 , . . . , k , be K -Lipschitz functions on aninterval (of arbitrary type) I ⊂ R . Let f be a continuous function on I such that f ( x ) ∈ { f ( x ) , . . . , f k ( x ) } , x ∈ I . Then f is K -Lipschitz on I .Proof. We will proceed by induction on k . The case k = 1 is trivial. Supposethat k > k = k − f is K -Lipschitz,consider arbitrary points a, b ∈ I , a < b . Choose 1 ≤ i ≤ k such that f ( a ) = f i ( a )and set c := max { a ≤ x ≤ b : f ( x ) = f i ( x ) } .If c = b , then | f ( b ) − f ( a ) | = | f i ( b ) − f i ( a ) | ≤ K ( b − a ).If c < b , the induction hypothesis (applied to f | ( c,b ] ) implies that f is K -Lipschitzon ( c, b ], and consequently also on [ c, b ]. Therefore | f ( b ) − f ( a ) | ≤ | f i ( c ) − f i ( a ) | + | f ( b ) − f ( c ) | ≤ K ( c − a ) + K ( b − c ) = K ( b − a ) . (cid:3) By well-known properties of convex and concave functions, we easily obtain thateach locally DC function f on an open set U ⊂ R d has all one-sided directionalderivatives finite and(2.3) g ′ + ( x, v )+ g ′ + ( x, − v ) ≤ , x ∈ U, v ∈ R d , if g is locally semiconcave on U. Recall that if ∅ = A ⊂ R d is closed, then d A need not be DC; however (see, e.g.,[2, Proposition 2.2.2]),(2.4) d A is locally semiconcave (and so locally DC) on R d \ A .In [14] and [15] we worked with “DC hypersurfaces” in R d . Since we work herein R only, we use the following terminology. Definition 2.12. We say that a set A ⊂ R is a -dimensional DC surface, ifthere exist v ∈ S and a Lipschitz DC function (i.e. the difference of two convexfunctions) g on W := (span { v } ) ⊥ such that A = { w + g ( w ) v : w ∈ W } . Remark 2.13. The notion of a -dimensional DC surface in R coincides withthe notion of a DC hypersurface in R from [14] (but not with the notion of a DChypersurface in R from [15] , where the Lipschitzness of g is not required). We also define, following [15], the notion of a DC graph in R . Definition 2.14. A set P ⊂ R will be called a DC graph if it is a rotated copyof graph f of a DCR function f on some compact (possibly degenerated) interval ∅ = I ⊂ R . Note that P is a DC graph if and only if it is a nonempty connected compactsubset of a 1-dimensional DC surface in R .We will need the following simple result which is possibly new and can be ofsome independent interest. Proposition 2.15. Let g be a continuous function on [ a, b ] which is DC on ( a, b ) and let P ⊂ [ a, b ] be a nowhere dense set. Then the set g ( P ) is nowhere dense. DUˇSAN POKORN´Y AND LUDˇEK ZAJ´IˇCEK Proof. We can suppose that P is closed. Suppose, to the contrary, that (the com-pact set) g ( P ) is not nowhere dense and choose an open interval I ⊂ g ( P ). Set S := { x ∈ ( a, b ) : g ′ + ( x ) = 0 or g ′− ( x ) = 0 } . Then g ( S ) is Lebesgue null; it follows e.g. from [20, Theorem 4.5, p. 271] (cf. [20,p. 272, a note before Theorem 4.7]). So we can choose a point y ∈ I \ ( g ( S ) ∪{ g ( a ) , g ( b ) } ) . Then the set K := g − ( { y } ) ⊂ ( a, b ) is finite. Indeed, otherwisethere exists a point x ∈ K which is an accumulation point of the compact set K .Then clearly x ∈ S which contadicts y / ∈ g ( S ). Let K = { x < ... < x p } . Lemma2.2 implies that there exists δ > a < x − δ < x + δ < x − δ < · · · < x p + δ < b and g is strictly monotone both on [ x i − δ, x i ] and on [ x i , x i + δ ], i = 1 , . . . , p . Consequently Q := g ( P ∩ S pi =1 ( x i − δ, x i + δ )) is nowhere dense. Since Z := g ([ a, b ] \ S pi =1 ( x i − δ, x i + δ )) is compact and does not contain y , there exists σ > y − σ, y + σ ) ⊂ I ⊂ g ( P ) and ( y − σ, y + σ ) ∩ Z = ∅ . Consequently( y − σ, y + σ ) is a subset of nowhere dense set Q , which is a contradiction. (cid:3) Known results concerning D d . In, [15], we proved several general resultsconcerning systems D d . First recall that if M ⊂ R is closed then(2.5) M belongs to D iff the system of all components of M is locally finite.It easily implies that D is closed with respect to both finite unions and finiteintersections and that a closed M ⊂ R belongs to D if and only if ∂M ∈ D .However, the case d > D d is closed with respect to finite unionsbut [15, Example 4.1] shows that already D is not closed with respect to finiteintersections. We observed that, for a closed set M ⊂ R d , d ∈ N ,(2.7) ∂M ∈ D d ⇐⇒ ( M ∈ D d and R d \ M ∈ D d )but [15, Example 4.1] provides an example of a set M ∈ D with ∂M / ∈ D .Important [15, Proposition 4.7] asserts that if d ≥ M ∈ D d , then eachbounded set C ⊂ ∂M can be covered by finitely many “DC hypersurfaces”.In our terminology we have in R the following result which has basic importancefor the present article. Proposition 2.16. Let M ∈ D . Then each bounded set C ⊂ ∂M can be coveredby finitely many -dimensional DC surfaces. Let us note that this result is not a particular case of [15, Proposition 4.7] (cf.Remark 2.13), but the proof of [15, Proposition 4.7] is based on [14, Corollary 5.4]and so [15, Proposition 4.7] holds also with the definition of DC hypersurfaces from[14] (“with Lipschitzness”) and so Proposition 2.16 holds. (Moreover, it is easy toshow that “Proposition 2.16 without Lipschitzness” implies “Proposition 2.16 withLipschitzness”.)Proposition 2.16 easily implies that each nowhere dense M ∈ D can be coveredby a locally finite system of DC graphs. On the other hand, (1.1) easily implies(see [15, Proposition 4.9]) that(2.8) if M ⊂ R is the union of a locally finite systemof DC graphs then M ∈ D .However, we have found an example (see [15, Example 4.10]) of a nowhere denseset M ∈ D which is not the union of a locally finite system of DC graphs.(Let us note that we will prove in Proposition 5.5 that each nowhere dense M ∈ D is the union of a countable system of DC graphs.) CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 7 We will also use the following easy facts which are not mentioned explicitely in[15]. Remark 2.17. (i) If M is a D set and ϕ a similarity on R then ϕ ( M ) isa D set.(ii) The system D is closed with respect to locally finite unions.Proof. The first part follows by Lemma 2.1 (i), (ii), (iv) and (vii) from the fact that d ϕ ( M ) = rd M ◦ ϕ − , where r > ϕ .To prove the second part, consider a locally finite system M ⊂ D and de-note M := S M . We can suppose that M = ∅ . If z ∈ M , choose r > M , . . . , M k ∈ M such that U ( z, r ) ∩ M = U ( z, r ) ∩ S ki =1 M i . Since f M := S ki =1 M i ∈ D by (2.6), and d f M = d M on U ( z, r ), we have that d M is DC on U ( z, r ).Consequently, using also (2.4), we obtain that d M is locally DC on R , and so itis DC by Lemma 2.1 (ii). (cid:3) Every (s)-set is a D set In the next section we will give a complete characterization of D sets using“special D sets” called (s)-sets . Their definition is formally rather simple, but itis not easy to prove that each (s)-set is a D set. In this section we will prove thisimportant fact using the method of the proof of (1.1) from [15] together with (1.1)and several additional ideas. Definition 3.1. Let ∅ = S ⊂ R be a closed set. We say that S is an (s)-set ifthere exists r > such that (3.1) S ⊂ k [ i =1 graph f i for some DCR functions f i : [0 , r ] → R with ( f i ) ′ + (0) = f i (0) = 0 and (3.2) S = [ h ∈ H graph h for a family H of continuous functions on [0 , r ] . Remark 3.2. We will prove some non-trivial properties of (s)-sets in Section 5,here note only that each (s)-set is clearly nowhere dense and path connected. Remark 3.3. Let S be an (s)-set with corresponding r > , functions f , . . . , f k and system H as in Definition 3.1. Pick < ρ < r and put ˜ S := S ∩ ([0 , ρ ] × R ) .Then clearly ˜ S is an (s)-set (with corresponding functions ˜ f i = f i | [0 ,ρ ] , i = 1 , . . . , k ,and system ˜ H = { h | [0 ,ρ ] : h ∈ H } ). One from our technical tools is the following easy fact (see [15, Lemma 3.2]). Lemma 3.4. Let V be a closed angle in R with vertex v and measure < α < π .Then there exist an affine function S on R and a concave function ψ on R whichis Lipschitz with constant √ α/ such that | z − v | + ψ ( z ) = S ( z ) , z ∈ V . We will also use the following “concave mixing lemma” ([15, Lemma 3.1]). Lemma 3.5. Let U ⊂ R d be an open convex set and let γ : U → R have finiteone-sided directional derivatives γ ′ + ( x, v ) , ( x ∈ U, v ∈ R d ). Suppose that (3.3) γ ′ + ( x, v ) + γ ′ + ( x, − v ) ≤ , x ∈ U, v ∈ R d , and that (3.4) graph γ is covered by graphs of a finite numberof concave functions defined on U .Then γ is a concave function. DUˇSAN POKORN´Y AND LUDˇEK ZAJ´IˇCEK The core of the present section is the proof of the following lemma which easilyimplies that (s)-sets are D sets. Lemma 3.6. Let f , . . . , f k be DC functions on R such that each f i is constanton both ( −∞ , and [1 , ∞ ) . Let ∅ = M ⊂ R be a closed set and H a system ofcontinuous functions on R such that (3.5) M = [ h ∈ H graph h ⊂ k [ i =1 graph f i . Then M ∈ D .Proof. First observe that each h ∈ H is constant on both ( −∞ , 0] and [1 , ∞ ) bycontinuity of h and (3.5).We will proceed in two steps.I) In the first step we will prove that(3.6) there exists a concave function Γ on R such that the function d M + Γ is locally concave on R \ M .Observe that Lemma 2.1 (iii) implies that there exists K > f , . . . , f k are K -Lipschitz on [0 , 1] and consequently(3.7) each function h ∈ H is K -Lipschitz on [0 , h ∈ H and n ∈ N , denote by h n the function on R for which h n (cid:0) in (cid:1) = h (cid:0) in (cid:1) , i = 0 , . . . , n , which is affine on each interval [ i − n , in ], i = 1 , . . . , n , and which isconstant on both ( −∞ , 0] and [1 , ∞ ).For n ∈ N , set H n := { h n : h ∈ H } and(3.8) M n := [ h ∈ H n graph h. Using (3.5), we obtain that each H n is finite and consequently each M n is closed.Obviously M n ∩ (( −∞ , × R ) = M ∩ (( −∞ , × R ) and M n ∩ ([1 , ∞ ) × R ) = M ∩ ([1 , ∞ ) × R ), n ∈ N , and (3.7) easily implies that M n ∩ ([0 , × R ) → M ∩ ([0 , × R )in the Hausdorff metric. Consequenly, we easily obtain that d M n → d M on R . Now we will show that, to obtain (3.6), it is sufficient to find D > n , n ∈ N , such that(3.9) Ψ n is D -Lipschitz on R for each n ∈ N and(3.10) d M n + Ψ n is locally concave on R \ M n for each n ∈ N .So suppose that such D and { Ψ n } , n ∈ N , are given and consider an arbitrary z ∈ R \ M . Then there exist r > n ∈ N such that, for n ≥ n , B ( z, r ) ∩ M n = ∅ and, consequently, (3.10) easily implies that d M n + Ψ n is concave on B ( z, r ).Further observe that we can suppose that Ψ n (0) = 0, n ∈ N . Then (3.9) givesthat the sequence { Ψ n } is equicontinuous and pointwise bounded, and we can usea well-known version of Arzel`a-Ascoli theorem (see e.g. [7, Theorem 4.44, p. 137])to obtain a subsequence { Ψ n p } converging to a D -Lipschitz concave function Γ on R . Then d M np + Ψ n p → d M + Γ, consequently d M + Γ is concave on B ( z, r ), andso (3.6) holds. CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 9 To find { Ψ n } and D , we first define a finite subset A n of M n by A n := (cid:26)(cid:18) in , h (cid:18) in (cid:19)(cid:19) : 0 ≤ i ≤ n, h ∈ H (cid:27) . For each n ∈ N and a = ( a , a ) ∈ A n set s + ( n, a ) := max { h ′ + ( a ) : h ∈ H n , h ( a ) = a } , s + ( n, a ) := min { h ′ + ( a ) : h ∈ H n , h ( a ) = a } ,s − ( n, a ) := max { h ′− ( a ) : h ∈ H n , h ( a ) = a } , s − ( n, a ) := min { h ′− ( a ) : h ∈ H n , h ( a ) = a } . Now we will prove that there is a constant C > n ∈ N ,(3.11) X a ∈ A n | s + ( n, a ) − s − ( n, a ) | ≤ C, X a ∈ A n | s − ( n, a ) − s + ( n, a ) | ≤ C. To this end, consider a convex function ϕ which corresponds to J := R and F i := f i , i = 1 , . . . , k , by Lemma 2.10. Choose L > ϕ is L -Lipschitz on [ − , n ∈ N , 0 ≤ i ≤ n and a = ( a , a ) ∈ A n with a = i/n .Now choose ˜ h ∈ H and ˆ h ∈ H such that˜ h ( i/n ) = ˆ h ( i/n ) = a , (˜ h n ) ′ + ( i/n ) = s + ( n, a ) , (ˆ h n ) ′− ( i/n ) = s − ( n, a ) . Set g ( x ) := ˜ h ( x ) for x ≥ i/n and g ( x ) := ˆ h ( x ) for x < i/n . Then clearly | s + ( n, a ) − s − ( n, a ) | = (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) g (cid:0) i +1 n (cid:1) − g (cid:0) in (cid:1) n − g (cid:0) in (cid:1) − g (cid:0) i − n (cid:1) n (cid:12)(cid:12)(cid:12)(cid:12)(cid:12) . Since graph g ⊂ S ki =1 graph f i , by its choice, ϕ is a control function for g and soLemma 2.3 and the above equality imply(3.12) | s + ( n, a ) − s − ( n, a ) | ≤ ϕ (cid:0) i +1 n (cid:1) − ϕ (cid:0) in (cid:1) n − ϕ (cid:0) in (cid:1) − ϕ (cid:0) i − n (cid:1) n ≤ L. Consequently X a ∈ A n | s + ( n, a ) − s − ( n, a ) | ≤ n X i =0 X ( a ,a ) ∈ A n ,a = in ϕ (cid:0) i +1 n (cid:1) − ϕ (cid:0) in (cid:1) n − ϕ (cid:0) in (cid:1) − ϕ (cid:0) i − n (cid:1) n ! ≤ k n X i =0 ϕ (cid:0) i +1 n (cid:1) − ϕ (cid:0) in (cid:1) n − ϕ (cid:0) in (cid:1) − ϕ (cid:0) i − n (cid:1) n ! = k ϕ (cid:0) n +1 n (cid:1) − ϕ (1) n − ϕ (0) − ϕ (cid:0) − n (cid:1) n ! ≤ Lk =: C. The second inequality of (3.11) follows quite analogously.For each n ∈ N and a = ( a , a ) ∈ A n , set p + ( n, a ) := ( a + 1 /n, a + s + ( n, a ) /n ) , p + ( n, a ) := ( a + 1 /n, a + s + ( n, a ) /n ) ,p − ( n, a ) := ( a − /n, a − s − ( n, a ) /n ) , p − ( n, a ) := ( a − /n, a − s − ( n, a ) /n ) ,A n := { a ∈ A n : s + ( n, a ) − s − ( n, a ) > } , A n := { a ∈ A n : s − ( n, a ) − s + ( n, a ) > } . Further set V n,a := { z ∈ R : h z − a, p + ( n, a ) − a i ≤ , h z − a, p − ( n, a ) − a i ≤ } if a ∈ A n and V n,a := { z ∈ R : h z − a, p + ( n, a ) − a i ≤ , h z − a, p − ( n, a ) − a i ≤ } if a ∈ A n . It is easy to see that each V n,a (resp. V n,a ) is a closed angle with vertex a andmeasure α ( n, a ) := arctan s + ( n, a ) − arctan s − ( n, a ) ∈ (0 , π ) (resp. α ( n, a ) := arctan s − ( n, a ) − arctan s + ( n, a ) ∈ (0 , π )) . For a ∈ A n (resp. a ∈ A n ) let ψ n,a and S n,a (resp. ψ n,a and S n,a ) be the concaveand affine functions on R which correspond to V n,a (resp. V n,a ) by Lemma 3.4.If a ∈ A n \ A n (resp. a ∈ A n \ A n ), put ψ n,a ( z ) := 0 and S n,a ( z ) := 0 (resp. ψ n,a ( z ) := 0 and S n,a ( z ) := 0), z ∈ R . SetΨ n := X a ∈ A n ( ψ n,a + ψ n,a ) . Now fix an arbitrary a ∈ A n . Using (3.12) we easily obtain α ( n, a ) ≤ s + ( n, a ) − s − ( n, a ) ≤ L. Further, since the function tan is convex on [0 , π/ ω ( x ) = tan xx isincreasing on (0 , π/ √ (cid:18) α ( n, a )2 (cid:19) ≤ √ · α ( n, a )2 · L arctan L ≤ ( s + ( n, a ) − s − ( n, a )) · L √ L . So, by the choice of ψ n,a , we have that(3.13) ψ n,a is Lipschitz with constant ( s + ( n, a ) − s − ( n, a )) · L √ L . Quite similarly we obtain that, for each a ∈ A n ,(3.14) ψ n,a is Lipschitz with constant ( s − ( n, a ) − s + ( n, a )) · L √ L . Consequently (3.13), (3.14) and (3.11) easily imply that there is a constant D > d graph h + Ψ n is locally concave on R \ graph h for each n ∈ N and h ∈ H n .Indeed, by (3.8) it is easy to see that d M n + Ψ n = min h ∈ H n ( d graph h + Ψ n )and it is enough to use (on each open ball U ⊂ R \ M n ) the fact that the minimumof a finite system of concave functions is a concave function.To prove (3.15), fix an arbitrary n ∈ N and h ∈ H n .For i = − , . . . , n + 1 denote z i := (cid:0) in , h (cid:0) in (cid:1)(cid:1) and V i := { z ∈ R : h z − z i , z i +1 − z i i ≤ , h z − z i , z i − − z i i ≤ } . Now, for a fixed i , denote a := z i . Then clearly a ∈ A n and, if the points z i − , z i , z i +1 are not collinear, then(3.16) either a ∈ A n and V i ⊂ V n,a , or a ∈ A n and V i ⊂ V n,a .Indeed, observe that s + ( n, a ) ≤ h (cid:0) i +1 n (cid:1) − h (cid:0) in (cid:1) n ≤ s + ( n, a ) , s − ( n, a ) ≤ h (cid:0) in (cid:1) − h (cid:0) i − n (cid:1) n ≤ s − ( n, a ) . So, if h ( i +1 n ) − h ( in ) n > h ( in ) − h ( i − n ) n , then a ∈ A n and an easy geometrical observationshows that V i ⊂ V n,a . Similarly, if h ( i +1 n ) − h ( in ) n < h ( in ) − h ( i − n ) n , then a ∈ A n and V i ⊂ V n,a . CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 11 Denote l − := R × { h (0) } , l + := R × { h (1) } and for n ∈ N and i = 0 , . . . , n − η i := d l ( z i ,z i +1 ) + Ψ n and η − := d l − + Ψ n , η n := d l + + Ψ n . We will prove that γ := d graph h + Ψ n is locally concave on R \ graph h usingLemma 3.5. So fix an arbitrary b ∈ R \ graph h and δ > U := U ( b, δ ) ⊂ R \ graph h . Then condition (3.3) of Lemma 3.5 holds by (2.3) and (2.4). To provecondition (3.4), consider an arbitrary z ∈ U and choose z ∗ ∈ graph h such that d graph h ( z ) = | z − z ∗ | .First note that if z ∗ 6∈ { z , . . . , z n } or z ∗ = z i for some i ∈ { , , . . . , n } and thepoints z i − , z i , z i +1 are collinear, then clearly(3.17) γ ( z ) = d graph h ( z ) + Ψ n ( z ) ∈ [ i ∈{− ,...,n } { η i ( z ) } . Further assume that z ∗ = z i for some i ∈ { , . . . , n } and the points z i − , z i , z i +1 are not collinear. Then clearly z ∈ V i and (3.16) holds. Consequentlyeither | z − z ∗ | + ψ n,z i ( z ) = S n,z i ( z ) or | z − z ∗ | + ψ n,z i ( z ) = S n,z i ( z ) , and therefore(3.18) γ ( z ) = d graph h ( z ) + Ψ n ( z ) ∈ { S n,z i ( z ) + (Ψ n − ψ n,z i )( z ) , S n,z i ( z ) + (Ψ n − ψ n,z i )( z ) } . Since the graph of each function η i , − ≤ i ≤ n , can be clearly covered by graphsof two concave functions and the functions Ψ n − ψ n,z i , Ψ n − ψ n,z i ( i = 0 , . . . , n )are concave, (3.17) and (3.18) imply (3.4) and so γ is concave on U and therefore(3.15) holds, which completes the proof of (3.6).II) In the second step we first observe that by (1.1) there exist concave functions ω i , 1 ≤ i ≤ k , such that each function d graph f i + ω i is concave on R . Set ω := k X i =1 ω i and σ := Γ + ω. Then(3.19) d graph f i + σ is concave , ≤ i ≤ k and by (3.6)(3.20) d M + σ is locally concave on R \ M. It is sufficient to prove that d M + σ is concave on R .For i, j ∈ { , . . . , k } , i = j , denote by P i,j the set of all x ∈ R such that f i ( x ) = f j ( x ) and such that for every ε > z ∈ ( x − ε, x + ε ) satisfying f i ( z ) = f j ( z ). Obviously, each P i,j is a closed nowhere dense set and P i,j ⊂ [0 , P i := [ { P i,j : 1 ≤ j ≤ k, j = i } , P := k [ i =1 P i ,P ∗ i := { ( x, f i ( x )) : x ∈ P i } , P ∗ := k [ i =1 P ∗ i . Note that for every z ∈ M \ P ∗ there is i ∈ { , . . . , k } and ρ > M ∩ U ( z, ρ ) = graph f i ∩ U ( z, ρ ) and so(3.21) d M ( u ) = d graph f i ( u ) , u ∈ U ( z, ρ/ . To prove the concavity of d M + σ , it is clearly sufficient to prove that for each p, q ∈ R and ε > l which meets both U ( p, ε ) and U ( q, ε ) and d M + σ is concave on l . To this end, choose arbitrary p, q, ε . Further, using thenotation l ( m, c ) := { ( x, y ) : y = mx + c } , m, c ∈ R , we choose a line l ( m , c ) which meets both U ( p, ε ) and U ( q, ε ).Now observe that for each c ∈ R we have l ( m , c ) ∩ P ∗ i = ∅ if and only if there is x ∈ P i such that m x + c = f i ( x ), i.e. c ∈ g i ( P i ), where g i ( x ) := f i ( x ) − m x, x ∈ R .Since g i is DC and P i ⊂ [0 , 1] is nowhere dense, Lemma 2.15 implies that C i := { c ∈ R : l ( m , c ) ∩ P ∗ i = ∅ } is nowhere dense. Consequently we can choose c ∈ R such that l := l ( m , c ) ⊂ R \ P ∗ and l meets both U ( p, ε ) and U ( q, ε ). By (3.21),(3.19) and (3.20) we obtain that d M + σ is locally concave at each point of l , andthus concave on l . (cid:3) Corollary 3.7. Let M ⊂ R be as in Lemma 3.6. Then f M := M ∩ ([0 , × R ) ∈ D .Proof. Let f , . . . , f k and H be as in Lemma 3.6. First note that, by Lemma 3.6and (2.4), d f M is locally DC on R \ (( M ∩ ( { } × R )) ∪ ( M ∩ ( { } × R ))) =: R \ ( M ∪ M ) . We prove that d f M is DC on some neighbourhood of each point in M . To dothat pick some z ∈ M . Let H z be the system of all functions h ∈ H such that(0 , h (0)) = z and put f z ( x ) = max h ∈ H z h ( x ) , g z ( x ) = min h ∈ H z h ( x ) , x ∈ [0 , ∞ ) , and D z := { ( x, y ) : x ∈ [0 , ∞ ) , g z ( x ) ≤ y ≤ f z ( x ) } . Note that d M is DC by Lemma 3.6. Since the functions f , . . . , f k are Lipschitzon [0 , 1] by Lemma 2.1 (iii), they are Lipschitz on [0 , ∞ ). Consequently both f z and g z are Lipschitz by (3.5) and Lemma 2.11, and therefore they are DCR by(3.5) and Lemma 2.9. Therefore d D z is DC by (2.7) and (2.8), since ∂D z is clearlythe union of a locally finite system of DC graphs. It is easy to see (using the factthat the set M has cardinality at most k and so, in particular, is finite) that forsufficiently small ρ > d f M ( w ) ∈ { d D z ( w ) , d M ( w ) } whenever w ∈ U ( z, ρ )and so d M is DC on U ( z, ρ ) by Lemma 2.1 (vi).Quite analogically one can prove that d f M is also DC on a neighbourhood of eachpoint of M and so d f M is locally DC and therefore (by Lemma 2.1 (ii)) DC on R and f M ∈ D . (cid:3) Corollary 3.8. Every (s)-set S ⊂ R is a D set.Proof. Let S be an (s)-set and let r > f , . . . , f k and H be as in Definition 3.1. Wemay assume (applying a suitable similarity and using Remark 2.17 (i) if necessary)that r = 1. For h ∈ H define ˜ h : R → R by ˜ h = h on [0 , h = h (0) on ( −∞ , h = h (1) on [1 , ∞ ). Set ˜ H := { ˜ h : h ∈ H } . Similarly we extend functions f i calling the extensions ˜ f i . Clearly (by Lemma 2.1 (vi)) each ˜ f i is a DC function on R . Put M := S h ∈ ˜ H graph h . Then M = [ h ∈ ˜ H graph h ⊂ k [ i =1 graph ˜ f i . Since S = M ∩ ([0 , × R ) and M satisfies the assumptions of Lemma 3.6, we obtain S ∈ D by Corollary 3.7. (cid:3) CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 13 Complete characterizations of D sets Lemma 4.1. Let { a n } ∞ n =1 and { A n } ∞ n =1 be sequences of real numbers such that(i) < a n +1 ≤ a n , n ∈ N , and(ii) P ∞ n =1 | A n | a n < ∞ .Then the function f ( x ) = ( A n − A n +1 a n − a n +1 ( x − a n +1 ) + A n +1 if x ∈ ( a n +1 , a n ]0 if x = 0 is a DCR function on [0 , a ] .Proof. First note that condition (i) implies(4.1) a n − a n +1 ≥ a n − a n a n ≥ a n +1 . Since a n → A n = f ( a n ) → f is continuous.Clearly f ′− ( x ) = f ′− ( a n ) = A n − A n +1 a n − a n +1 for x ∈ ( a n +1 , a n ], n ∈ N . Using (ii) and (4.1),we obtain ∞ X n =1 | f ′− ( a n ) | ≤ ∞ X n =1 (cid:18)(cid:12)(cid:12)(cid:12)(cid:12) A n a n − a n +1 (cid:12)(cid:12)(cid:12)(cid:12) + (cid:12)(cid:12)(cid:12)(cid:12) A n +1 a n − a n +1 (cid:12)(cid:12)(cid:12)(cid:12)(cid:19) ≤ ∞ X n =1 (cid:18) | A n | a n + | A n +1 | a n +1 (cid:19) < ∞ . Therefore we easily obtain V ( f ′− , (0 , a )) = ∞ X n =1 | f ′− ( a n ) − f ′− ( a n +1 ) | < ∞ , and so f is a DCR function by Lemma 2.7. (cid:3) For r > A ur = { ( x, y ) : 0 ≤ x ≤ r, | y | ≤ ux } , A u = { ( x, y ) : 0 ≤ x, | y | ≤ ux } ,S ur = { ( x, y ) : | x | ≤ r, | y | ≤ u | x |} and S u = { ( x, y ) : x ∈ R , | y | ≤ u | x |} . In the proof of Lemma 4.3 we will use the following geometrically obvious lemma. Lemma 4.2. Let u > . Then there exists α > such that d M ( x, y ) ≥ α · ρ ,whenever M ⊂ R , z = ( a, b ) ∈ R , ρ > and either (4.2) M ∩ ( z + A uρ ) ⊂ { z } , ( x, y ) ∈ ( z + A uρ ) , x = a + ρ , or (4.3) M ∩ ( z − A uρ ) ⊂ { z } , ( x, y ) ∈ ( z − A uρ ) , x = a − ρ . Lemma 4.3. Let M ⊂ R be closed, z ∈ M and u > . Let there exist sequences { z n } in M and { ρ n } in (0 , ∞ ) such that z n → z and, for each n ∈ N ,(i) z n ∈ ( z + S u ) \ { z } and(ii) either ( z n + A uρ n ) ∩ M = { z n } or ( z n − A uρ n ) ∩ M = { z n } .Then M / ∈ D .Proof. Suppose, to the contrary, that d M is DC.We can suppose z = 0. Let z n = ( a n , b n ). Without any loss of generality we cansuppose a > a > · · · > 0. To see this, we can pass to a subsequence and workwith M s := { ( x, y ) : ( − x, y ) ∈ M } (which belong to D if and only if M ∈ D )instead of M , if necessary. Further, we can assume (passing several times to asubsequence), that(4.4) a n +1 ≤ a n , for each n ∈ N , and, for some K ∈ [ − u, u ],(4.5) b n a n → K and ∞ X n =1 (cid:12)(cid:12)(cid:12)(cid:12) b n a n − K (cid:12)(cid:12)(cid:12)(cid:12) < ∞ . Note that also (by z n ∈ A u and (4.4))(4.6) (cid:12)(cid:12)(cid:12)(cid:12) b n − b n +1 a n − a n +1 (cid:12)(cid:12)(cid:12)(cid:12) ≤ a n u + a n u a n ≤ u for each n ∈ N . Set A n := b n − a n K . Then assumptions (i) and (ii) of Lemma 4.1 are satisfiedby (4.4) and (4.5), and consequently we know that the function f ( x ) = ( A n − A n +1 a n − a n +1 ( x − a n +1 ) + A n +1 if x ∈ ( a n +1 , a n ]0 if x = 0is a DCR function on [0 , a ] and Lemma 2.1 (i),(ii),(iv) easily imply that the func-tions g ( x ) = f ( x ) + Kx, x ∈ [0 , a ], and F ( x ) = d M ( x, g ( x )) , x ∈ [0 , a ], are alsoDCR functions. Observe that(4.7) g ( a n ) = b n , n ∈ N and g is linear on each interval [ a n +1 , a n ].Further, F (0) = 0 and F ( a n ) = 0, n ∈ N . So Lemma 2.2 implies that(4.8) 0 is the right strict derivative of F at 0.Now consider n > α > u by Lemma4.2.If ( z n + A uρ n ) ∩ M = { z n } , choose 0 < r n < ρ n such that a n + r n < a n − andset x n := a n + r n / y n := g ( x n ). Since (4.7) and (4.6) imply ( x n , y n ) ∈ z n + A ur n ,we can apply Lemma 4.2 (with z = 0, ρ = r n , x = x n , y = y n ) and obtain d M ( x n , y n ) = F ( x n ) ≥ αr n , Consequently(4.9) F ( x n ) − F ( a n ) x n − a n ≥ α. If ( z n − A uρ n ) ∩ M = { z n } , choose 0 < r n < ρ n such that a n − r n > a n +1 and set x n := a n − r n / y n := g ( x n ). In the same way as in the first case we also obtain(4.9).Now observe that, by the definition of the strict right derivative, (4.9) contradicts(4.8). (cid:3) Lemma 4.4. Let M ∈ D , z = ( x, y ) ∈ M , s > and u > . Then the followingassertions hold.(i) If (4.10) ∂M ∩ ( z + A us ) ⊂ z + A us , then there is s ≥ r > such that either M ∩ ( z + A ur ) = { z } , or π ( M ∩ ( z + A ur )) = [ x, x + r ] .(ii) If (4.11) ∂M ∩ ( z − A us ) ⊂ z − A us , then there is s ≥ r > such that either M ∩ ( z − A ur ) = { z } , or π ( M ∩ ( z − A ur )) = [ x − r, x ] .Proof. We will prove only assertion (i); the proof of (ii) is quite analogous.Set K := π ( M ∩ ( z + A us )) and observe that condition (4.10) implies that either π ( M ∩ ( z + A us )) = [ x, x + s ] or(4.12) M ∩ ( z + A us ) ⊂ z + A us . CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 15 So we can suppose that (4.12) holds.Now suppose to the conratry that no s ≥ r > K is compact, we can clearly find sequences of positive numbers { x n } , { ρ n } such that x n → x n ∈ K and ( x n , x n + ρ n ) ∩ K = ∅ for each n ∈ N . By the definition of K and (4.12) there exist y n , n ∈ N , such that z n := ( x n , y n ) ∈ M ∩ ( z + A us ). Since (4.13) clearly implies ( z n + A uρ n ) ∩ M = { z n } , we obtain byLemma 4.3 that M / ∈ D , which is a contradiction. (cid:3) Lemma 4.5. Let M ∈ D and s, u > . Suppose that ∈ M and f , . . . , f k :[0 , s ] → R are u -Lipschitz functions such that f i (0) = 0 , i = 1 , . . . , k , and (4.14) ∂M ∩ A us ⊂ k [ i =1 graph f i . Let be an accumulation point of ∂M ∩ A us . Then there is some < ρ < s suchthat for every ( x, y ) ∈ M ∩ k [ i =1 graph f i with x ∈ (0 , ρ ) there exist δ > and a u -Lipschitz function g : [ x − δ, x + δ ] → R such that g ( x ) = y and graph g ⊂ M ∩ S ki =1 graph f i .Proof. For the sake of brevity, we set M ∗ := M ∩ S ki =1 graph f i and observe thatthe properties of f i imply M ∗ ⊂ A us .Now consider an arbitrary z = ( x, y ) ∈ M ∗ with x ∈ (0 , s ). Since z ∈ A us , it iseasy to see that we can assign to z a number R z > z + S uR z ⊂ A us and graph f i ∩ ( z + S uR z ) = ∅ whenever 1 ≤ i ≤ k and f i ( x ) = y. Then, using u -Lipschitzness of all f i and (4.14), we obtain(4.16) ∂M ∩ ( z + S uR z ) ⊂ z + S uR z . So, by Lemma 4.4, we can choose 0 < r z ≤ R z such that π ( M ∩ ( z + S ur z )) is oneof the following sets: { x } , [ x − r z , x ] , [ x, x + r z ] , [ x − r z , x + r z ] . Using Lemma 4.3, we easily obtain that there exists s ≥ ρ > π ( M ∩ ( z + S ur z )) = [ x − r z , x + r z ] , whenever x ∈ (0 , ρ ) . We claim that even(4.18) π ( M ∗ ∩ ( z + S ur z )) = [ x − r z , x + r z ] , whenever x ∈ (0 , ρ ) . Indeed, pick t ∈ [ x − r z , x + r z ]. To prove t ∈ π ( M ∗ ∩ ( z + S ur z )), we distinguishtwo cases. If ( ∂M ∩ ( z + S ur z )) [ t ] = ∅ we observe that (( z + S ur z ) \ M ) [ t ] = ∅ and so ( t, f i ( t )) ∈ M ∗ ∩ ( z + S ur z ), where i is chosen so that z ∈ graph f i . If( ∂M ∩ ( z + S ur z )) [ t ] = ∅ then (4.18) follows from (4.15) and (4.14). Now fix anarbitrary z = ( x, y ) ∈ M ∗ with x ∈ (0 , ρ ) and denote C := M ∗ ∩ ( z + S ur z ). So C iscompact and thus (4.18) implies that we can correctly define g ( t ) = min C [ t ] , t ∈ ( x − r z , x + r z ) . Then g is continuous on ( x − r z , x + r z ) ∩ (0 , ρ ). Indeed, the compactness of C easily implies that g is lower semicontinuous on ( x − r z , x + r z ) ∩ (0 , ρ ). To prove moreover, the upper semicontinuity of g , consider t ∈ ( x − r z , x + r z ) ∩ (0 , ρ ) andobserve that (4.18) applied to z ∗ := ( t, g ( t )) implies that g ( τ ) − g ( t ) ≤ u | τ − t | , τ ∈ ( t − r z ∗ , t + r z ∗ ) ∩ ( x − r z , x + r z ) , which implies that g is upper semicontinuous at t . By Lemma 2.11 we obtain that g is u -Lipschitz on ( x − r z , x + r z ) ∩ (0 , ρ ).Now, choosing δ > x − δ, x + δ ] ⊂ ( x − r z , x + r z ) ∩ (0 , ρ ), we obtainthe assertion of the lemma. (cid:3) Below we will need some easy facts concerning 1-dimensional DC surfaces in R ,which are proved in [14, Remark 7.1 and Lemma 7.3]. Let us note that in theseobservations from [14] the term “DC graph” has a different meaning than in [15]and the present article: it means there a 1-dimensional DC surface in R .Thus, in the present terminology, [14, Remark 7.1] gives the following. Remark . Let P ⊂ R be a 1-dimensional DC surface in R and a ∈ P . Then(i) Tan ( P, a ) ∩ S is a two point set, and(ii) there exist 1-dimensional DC surfaces P , P ⊂ R such that P ⊂ P ∪ P , a ∈ P ∩ P and Tan ( P i , a ) is a 1-dimensional space, i = 1 , Lemma 4.7. Let P be a -dimensional DC surface in R and ∈ P . Supposethat Tan ( P, is a -dimensional space and (0 , / ∈ Tan ( P, . Then there exists ρ ∗ > such that, for each < ρ < ρ ∗ , there exist α < < β and a DCR function f on ( α, β ) such that P ∩ U (0 , ρ ) = graph f | ( α,β ) . We will also need the following simple fact which is a standard consequence ofthe Zorn lemma. Lemma 4.8. Let L > , ρ > and F ⊂ [0 , ρ ] × R be a closed set such that(i) for each ( x, y ) ∈ F with < x < ρ there exist δ > and an L -Lipschitzfunction g on [ x − δ, x + δ ] such that g ( x ) = y and graph g ⊂ F .Then(ii) for each ( x, y ) ∈ F with < x < ρ there exists an L -Lipschitz function γ on [0 , ρ ] such that γ ( x ) = y and graph γ ⊂ F .Proof. To prove (ii), consider an arbitrary ( x, y ) ∈ F with 0 < x < ρ .Denote by P the set of all L -Lipschitz functions f : ( a f , b f ) → R such that( a f , b f ) ⊂ (0 , ρ ), x ∈ ( a f , b f ) , f ( x ) = y and graph f ⊂ F . By (i), we obtain P = ∅ .Define a partial order on P by inclusion (i.e., f ≤ f ⇔ graph f ⊂ graph f ). Let ∅ = T ⊂ P be a totally ordered set. Then S { graph f : f ∈ T } is clearly the graph ofa function g ∈ P which is an upper bound of T . Consequently, by Zorn theorem, P contains a maximal element f : ( a f , b f ) → R and we can extend f to an L -Lipschitzfunction γ on [ a f , b f ]. Observe that the points ( a f , γ ( a f )), ( b f , γ ( b f )) belong to F since the latter set is closed. We claim that a f = 0 and b f = ρ . Indeed, otherwisewe can use (i) (applied either to ( x, y ) = ( a f , γ ( a f )) or to ( x, y ) = ( b f , γ ( b f )) andeasily obtain a contradiction with the maximality of f . Consequently, γ has allproperties from (ii). (cid:3) Lemma 4.9. Let M ∈ D and ∈ M . Let u > and A u ∩ Tan ( ∂M, ∩ S = { (1 , } . Then there exists r > and an (s)-set S such that (4.19) ∂M ∩ A ur ⊂ S ⊂ M ∩ A ur . CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 17 Proof. By Proposition 2.16 there exist η > P , . . . , P n such that ∂M ∩ B (0 , η ) ⊂ P ∪ · · · ∪ P n . Diminishing η if necessary, we can suppose that 0 ∈ P i for all i . Due to Re-mark 4.6 (ii) we can also suppose (changing n , if necessary) that Tan ( P i , 0) is a1-dimensional linear space for every i . Put(4.20) I := { ≤ i ≤ n : Tan ( P i , 0) = span { (1 , }} . By our assumptions, clearly I = ∅ ; we can suppose that I = { , . . . , k } . By ourassumptions and the definition of I , we can choose t > ∂M ∩ A ut ⊂ P ∪ · · · ∪ P k . Using Lemma 4.7 we obtain that for each 1 ≤ i ≤ k there exist s i ∈ (0 , ∞ ) and aDCR function ϕ i on [0 , s i ] such that P i ∩ A us i = graph ϕ i . Note that (by (4.20))( ϕ i ) ′ + (0) = 0 and so, using Lemma 2.2 we obtain 0 < s ≤ min { s , . . . , s k } suchthat, denoting f i := ϕ i | [0 ,s ] , we have that each f i is u -Lipschitz on [0 , s ] and(4.21) ∂M ∩ A us ⊂ k [ i =1 graph f i . Moreover, by the assumptions 0 is an accumulation point of ∂M ∩ A us .Thus the assumptions of Lemma 4.5 are satisfied. Let 0 < ρ < s be the corre-sponding number from the assertion of Lemma 4.5. Set r := ρ/ S := M ∩ k [ i =1 graph f i ∩ ([0 , r ] × R ) . Using (4.21), it is easy to see that (4.19) holds. So it remains to prove that S is an(s)-set. Since S ⊂ S ki =1 graph f i and S \ { } 6 = ∅ , it is sufficient to prove that forevery ( x, y ) ∈ S with x = 0 there exists a continuous function h : [0 , r ] → R suchthat h ( x ) = y and graph h ⊂ S .To construct h , observe that, by the choice of ρ , the assertion of Lemma 4.5holds. Consequently, for F := M ∩ S ki =1 graph f i ∩ ([0 , ρ ] × R ) and L := u , theassumptions of Lemma 4.8 hold. Therefore there exists a u -Lipschitz function γ on[0 , ρ ] such that γ ( x ) = y and graph γ ⊂ F .Consequently the function h := γ | [0 ,r ] has the required properties. (cid:3) Lemma 4.10. Let M and K be closed sets in R and let x ∈ M and ρ > be suchthat K ∩ U ( x, ρ ) ⊂ M and ∂M ∩ U ( x, ρ ) ⊂ ∂K . If d K is DC on U ( x, ρ ) then d M is DC on U ( x, ρ ) .Proof. Pick z ∈ U ( x, ρ ). First note that if z ∈ M then d M ( z ) = 0. If z / ∈ M then d M ( z ) = d ∂M ( z ) ≥ d ∂K ( z ) ≥ d K ( z ) since d M ( z ) ≤ | x − z | , ∂M ∩ U ( x, ρ ) ⊂ ∂K and ∂K ⊂ K . On the other hand K ∩ U ( x, ρ ) ⊂ M implies d M ( z ) ≤ d K ( z ) and so d M ( z ) = d K ( z ). Consequently d M ( z ) ∈ { , d K ( z ) } , z ∈ U ( x, ρ ), and so d M is DCon U ( x, ρ ) by Lemma 2.1 (vi). (cid:3) Now we can prove the following “local” characterisation of D sets by (s)-sets. Theorem 4.11. Let M ⊂ R be a closed set and let P be the set of all isolatedpoints of M . Then the following statements are equivalent:(i) M ∈ D , (ii) for every z ∈ ∂M \ P there are ρ > , (s)-sets S , . . . , S m and pairwisedifferent rotations γ , . . . , γ m such that (4.23) ∂M ∩ U ( z, ρ ) ⊂ m [ i =1 ( z + γ i ( S i )) ⊂ M, (iii) for every z ∈ ∂M \ P there are ρ > , (s)-sets S , . . . , S m and rotations γ , . . . , γ m such that (4.23) holds.Proof. First we prove implication (i) = ⇒ (ii). Let M be a D set and z ∈ ∂M \ P .Then z is not an isolated point of ∂M and we obtain by Proposition 2.16 andRemark 4.6 (i) that T := Tan ( ∂M, z ) ∩ S is a nonempty finite set. Let T = { t , . . . , t m } and let γ i be the rotation that maps (1 , 0) to t i , i = 1 , . . . , m . Since T is finite, there is u > A u ∩ (Tan ( γ − i ( ∂M − z ) , ∩ S ) = γ − i ( t i ) = (1 , , i = 1 , . . . , m. By Lemma 4.9 there is, for every i = 1 , . . . , m , an r i > S i suchthat γ − i ( ∂M − z ) ∩ A ur i = ∂ ( γ − i ( M − z )) ∩ A ur i ⊂ S i ⊂ γ − i ( M − z ) , i = 1 , . . . , m. and consequently(4.24) ∂M ∩ ( z + γ i ( A ur i )) ⊂ z + γ i ( S i ) ⊂ M. By the definition of the tangent cone there is some ρ > ∂M ∩ U ( z, ρ ) ⊂ m [ i =1 ( z + γ i ( A ur i )) , and so (4.24) implies that (4.23) holds, and the proof of the implication is finished.Implication (ii) = ⇒ (iii) is clear and implication (iii) = ⇒ (i) follows easily fromCorollary 3.8, Lemma 4.10 (with K = S mi =1 ( z + γ i ( A uρ ))), (2.6) and Lemma 2.1 (ii),which concludes the proof of the theorem. (cid:3) Remark 4.12. In (ii) (and in (iii)) we can demand that both ρ and diam ( S mi =1 ( z + γ i ( S i ))) “are arbitrarily small” (i.e., smaller than any ε > prescribed together with z ∈ ∂M \ P ). To see this, choose a sufficiently small < ρ ∗ < ρ and observe that (4.23) remains hold if we write ρ ∗ instead of ρ and S ∗ i := S i ∩ ([0 , ρ ∗ ] × R ) (whichis an (s)-set by Remark 3.3) instead of S i , i = 1 , . . . , m . Corollary 4.13. If M ∈ D , then the set P of all isolated points of M is discrete.Proof. Suppose to the contrary that there exists a point z ∈ P \ P . Then clearly z ∈ ∂M \ P and we can choose ρ , S , . . . , S m and γ , . . . , γ m as in Theorem 4.11 (ii);so (4.23) holds. Since P ⊂ ∂M , there exists p ∈ P such that p ∈ S mi =1 ( z + γ i ( S i )) ⊂ M , which contradicts the connectivity of S mi =1 ( z + γ i ( S i )) (cf. Remark 3.2). (cid:3) Next we prove Theorem 4.15 which gives a “global” characterization of general D sets by nowhere dense D sets. We will need the following simple observation. Lemma 4.14. Let K , M , K ⊂ M , be closed subsets of R . Then the followingconditions are equivalent(i) M = K ∪ C , where C is the union of a system of components of R \ K ,(ii) ∂M ⊂ ∂K. If these conditions hold and K ∈ D , then M ∈ D . CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 19 Proof. Let (i) hold. Since C ⊂ int M , we have ∂M = M \ int M ⊂ M \ C ⊂ K. Obviously, ∂M ⊂ R \ int K , and consequently ∂M ⊂ K \ int K = ∂K . We haveproved (i) ⇒ (ii).To prove (i) from (ii), it is sufficient to prove that if D is a component of R \ K then either D ⊂ M or D ∩ M = ∅ , but it follows from the fact that ∂M ∩ D ⊂ ∂K ∩ D = ∅ and so M ∩ D is both open and closed in open connected set D .To prove the last part of the lemma, it is sufficient to observe that if K ∈ D and M = ∅ then (ii) together with Lemma 4.10 and (2.4) imply that d M is locallyDC. Indeed, then d M is DC on R by Lemma 2.1 (ii), and so M ∈ D . (cid:3) Theorem 4.15. Let M ⊂ R be a closed set. Then the following conditions areequivalent.(i) M ∈ D ,(ii) there exists a nowhere dense K ∈ D such that ∂M ⊂ K ⊂ M ,(iii) there exists a nowhere dense K ∈ D such that M = K ∪ C , where C isthe union of a system of components of R \ K .Proof. Implication (i) = ⇒ (ii) follows from Theorem 4.11 as follows.Suppose that M ∈ D and let P be the set of all isolated points of M . ByCorollary 4.13, P is discrete. We know that, for every z ∈ ∂M \ P , there are ρ z > m z ∈ N , (s)-sets S z , . . . , S zm z and rotations γ z , . . . , γ zm z as in Theorem 4.11 (iii).By Remark 4.12 we can suppose ρ z ≤ S zi ≤ i = 1 , . . . , m z . Thesystem { U ( z, ρ z ) : z ∈ ∂M \ P } is an open cover of ∂M \ P . Hence, since ∂M \ P is closed and locally compact, we can find I ⊂ N such that for every n ∈ I thereare z n ∈ ∂M \ P , ρ n > k n ∈ N , (s)-sets S nk , k = 1 , . . . , k n , and isometries γ nk , k = 1 , . . . , k n , such that(a) ∂M \ P ⊂ S n ∈ I U ( z n , ρ n ),(b) the system { U ( z n , ρ n ) : n ∈ I } is locally finite,(c) diam S nk ≤ n ∈ I , k = 1 , . . . , k n ,(d) ∂M ∩ U ( z n , ρ n ) ⊂ k n [ k =1 ( z n + γ nk ( S nk )) ⊂ M for every n ∈ I .Put(4.25) K := P ∪ [ n ∈ I k n [ k =1 ( z n + γ nk ( S nk )) . By (b) and (c) we obtain that the system { S k n k =1 ( z n + γ nk ( S nk )) : n ∈ I } is alocally finite system of closed nowhere dense sets and therefore K is closed nowheredense. Moreover, ∂M ⊂ K = ∂K by (a) and (d) and K ⊂ M by (d). Finally, K ∈ D by Corollary 3.8, Remark 2.17 (ii) and Corollary 4.13.Implications (ii) = ⇒ (iii) and (iii) = ⇒ (i) follow from Lemma 4.14. (cid:3) Remark 4.16. (i) Lemma 4.14 shows that each nowhere dense D set K yields (via Lemma 4.14 (i)) some (sometimes infinitely many) D sets M with nonempty interior.(ii) A problem whether a given closed set M ⊂ R belongs to D does not reduce(by our results) to a problem, whether a corresponding nowhere dense set K ⊂ R belongs to D since there are usually many nowhere dense sets K ⊂ M with ∂M ⊂ K . Note that these conditions hold for K := ∂M ,but [15, Example 4.1] (or Example 5.8 below) gives an example of M ∈ D with ∂M / ∈ D . Finally, as a consequence of Theorem 4.11 and the proof of Theorem 4.15, weeasily obtain the following characterizations of nowhere dense sets in D : Theorem 4.17. Let M ⊂ R be a nowhere dense closed set and let P be the set ofall isolated points of M . Then the following conditions are equivalent:(i) M ∈ D ,(ii) for every z ∈ M \ P there are ρ > , finitely many (s)-sets S , . . . , S m andpairwise different rotations γ , . . . , γ m such that (4.26) M ∩ U ( z, ρ ) = m [ i =1 ( z + γ i ( S i )) ∩ U ( z, ρ ) , (iii) for every z ∈ M \ P there are ρ > , finitely many (s)-sets S , . . . , S m androtations γ , . . . , γ m such that (4.26) holds,(iv) there exists a system ( S α ) α ∈ A of (s)-sets and a system ( γ α ) α ∈ A of isome-tries of R such that the system ( γ α ( S α )) α ∈ A is locally finite and suchthat M = P ∪ [ α ∈ A γ α ( S α ) . Proof. Denote by (ii)* (resp. (iii)*) the condition which we obtain if we replace in(ii) (resp. (iii)) equation (4.26) by the inclusions(4.27) M ∩ U ( z, ρ ) ⊂ m [ i =1 ( z + γ i ( S i )) ⊂ M. Since M = ∂M , condition (4.27) is equivalent to (4.23) and so the equivalence of(i), (ii)* and (iii)* follows immediately from Theorem 4.11. Further, (4.27) clearlyimplies (4.26), and consequently (ii)* implies (ii) and (iii)* implies (iii).Now we will show ( iii ) ⇒ ( iii ) ∗ . So suppose that (iii) holds and x ∈ M \ P is given. Find S , . . . , S m and γ , . . . , γ m by (iii) and choose ˜ ρ > S i := S i ∩ ([0 , ˜ ρ ] × R ) ⊂ U (0 , ρ ), i = 1 , . . . , m . Then each ˜ S i is an (s)-set byRemark 3.3 and clearly M ∩ U ( z, ˜ ρ ) ⊂ S mi =1 ( z + γ i ( ˜ S i )) ⊂ M, and thus we haveproved (iii)*. The above argument proves also ( ii ) ⇒ ( ii ) ∗ .Thus we obtain the equivalence of (i), (ii) and (iii).To prove ( i ) = ⇒ ( iv ), suppose M ∈ D and observe that K from Theorem 4.15equals to M (by Theorem 4.15 (ii)). So, chosing z n , γ nk and S nk as in the proof ofTheorem 4.15, we obtain that (4.25) holds and M = K . Since we know that thesystem of all sets of the form z n + γ nk ( S nk ) from (4.25) is locally finite, (iv) holds.Finally, implication (iv) = ⇒ (i) follows from Corollary 3.8, Corollary 4.13 andRemark 2.17. (cid:3) Remark . In Theorem 4.17, M = ∂M and so (4.23) implies (4.26). Conse-quently Remark 4.12 shows that, in conditions (ii) and (iii) of Theorem 4.17, wecan demand that both ρ and diam ( S mi =1 ( z + γ i ( S i ))) “are arbitrarily small”.An immediate consequence of Theorem 4.17 is the following result. Corollary 4.19. A nonempty nowhere dense perfect compact set is a D set if andonly if it is a finite union of isometric copies of (s)-sets. The following result shows that, in some sense, it suffices to investigate connected D sets only. Theorem 4.20. A closed set ∅ = M ⊂ R is a D set if and only if(i) each component of M is a D setand (ii) the system of all components of M is discrete. CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 21 Proof. Suppose M ∈ D and consider an arbitrary z ∈ M and the component C z of M that contains z . To prove (ii), we will find ρ > C z is the only component of M intersecting U ( z, ρ ).The existence of ρ is obvious if z is an isolated point of M . Otherwise we canfind by Theorem 4.11 ρ > 0, (s)-sets S , . . . , S m and rotations γ , . . . , γ m such that(4.23) holds. Using Remark 3.2, we obtain(4.29) m [ i =1 ( z + γ i ( S i )) ⊂ C z . Let C be a component of M with C ∩ U ( z, ρ ) = ∅ .If ∂C ∩ U ( z, ρ ) = ∅ , then C ∩ U ( z, ρ ) is a nonempty and both open and closedin U ( x, ρ ), so U ( z, ρ ) ⊂ C and thus C = C z .If ∂C ∩ U ( z, ρ ) = ∅ , choose a point q ∈ ∂C ∩ U ( z, ρ ) and observe that q ∈ ∂C ⊂ C .Further, since q ∈ ∂C ⊂ ∂M , by (4.23) and (4.29) we obtain z ∈ C z . Thus C = C z and (ii) is proved.To prove (i), consider a component C of M . To prove C ∈ D , by Lemma 2.1(ii) it is sufficient to show that d C is locally DC on R . Using (2.4), we see that itis sufficient to show that, for each z ∈ C , the function d C is DC on a neigbourhoodof z . By (ii) we can choose ρ > d C = d M on U ( z, ρ/ d C is DC on U ( z, ρ/ M ∈ D by Remark 2.17 (ii). (cid:3) Properties of D sets and images of D sets First we will prove several properties of (s)-sets. Then, using our characterizationtheorems, we will obtain some results on general D sets. Finally we will proveTheorem 5.11 on the stability of D sets with respect to some deformations.Recall that we already mentioned some simple properties of (s)-sets; see Re-mark 3.2 and Remark 3.3.Further mention that (3.1) easily implies that, for each (s)-set S ,(5.1) Tan ( S, (0 , ∩ S = (1 , . An easy consequence of “mixing lemmas” is the following fact. Lemma 5.1. Let S ⊂ R be an (s)-set and π ( S ) =: [0 , r ] . Then there exists K > such that each continuous f : [0 , r ] → R with graph f ⊂ S is a K -Lipschitz DCRfunction.Proof. Let f , . . . , f k and H be as in Definition 3.1. By Lemma 2.7 (ii) we can choose K > f i , 1 ≤ i ≤ k , are K -Lipschitz functions. Let f : [0 , r ] → R be a continuous function with graph f ⊂ S . Then, using (3.1), we obtain that f is K -Lipschitz by Lemma 2.11 and DCR by Lemma 2.9. (cid:3) Corollary 5.2. If S is an (s)-set and H is as in (3.2) , then all functions h ∈ H are DCR functions, and they are equally Lipschitz. Lemma 5.3. Let S ⊂ R be an (s)-set with π ( S ) =: [0 , r ] and let H be as in (3.2) .Then there exists a countable set H ∗ ⊂ H such that S = S h ∈ H ∗ graph h .Proof. By (3.2), we have(5.2) S = [ h ∈ H graph h and, by Corollary 5.2, there exists K > h ∈ H is K -Lipschitz. Further choose k ∈ N by (3.1). Now choose (using the definition of k and (5.2)), for each t ∈ Q ∩ [0 , r ], functions h t , . . . , h tk ∈ H such that S [ t ] = { h t ( t ) , . . . , h tk ( t ) } and set H ∗ := [ { h ti : t ∈ Q ∩ [0 , r ] , ≤ i ≤ k } . Then H ∗ is countable. To prove(5.3) S = [ h ∈ H ∗ graph h, consider an arbitrary point ( x, y ) ∈ S . Since S [ x ] is finite, we can choose ε > S [ x ] ∩ ( y − ε, y + ε ) = { y } . Further choose x ∗ ∈ Q ∩ [0 , r ] such that | x − x ∗ | < ε (2 K ) − . By (5.2) there exists h ∈ H with h ( x ) = y . Since h ( x ∗ ) ∈ S [ x ∗ ] ,by the definition of H ∗ there exists h ∗ ∈ H ∗ with h ∗ ( x ∗ ) = h ( x ∗ ). Since h , h ∗ are K -Lipschitz, we have | h ( x ∗ ) − h ( x ) | ≤ K | x − x ∗ | < ε , | h ( x ∗ ) − h ∗ ( x ) | = | h ∗ ( x ∗ ) − h ∗ ( x ) | ≤ K | x − x ∗ | < ε | h ∗ ( x ) − y | = | h ∗ ( x ) − h ( x ) | < ε . Since h ∗ ( x ) ∈ S [ x ] , we have h ∗ ( x ) = y andthus (5.3) follows. (cid:3) Corollary 5.2 and Lemma 5.3 have the following immediate consequence. Corollary 5.4. Each (s)-set is a countable union of DC graphs. The following result easily follows. Proposition 5.5. Each nowhere dense D set M is a countable union of DCgraphs.Proof. The statement follows from Theorem 4.17 (iv), Corollary 4.13, Corollary 5.4and the easy fact that the image of a DC graph under an isometry of R is a DCgraph. (cid:3) Proposition 5.6. (i) Each D set M is locally pathwise connected; in par-ticular it is locally connected.(ii) Each connected D set M is pathwise connected. Moreover, any two points x, y ∈ M can be connected by a rectifiable curve lying in M .Proof. Let z ∈ M , r > 0, and U := U ( z, r ) ∩ M . To prove (i), it is sufficient tofind a pathwise connected neigbhourhood V ⊂ U of z in the subspace M . If z is an isolated or an interior point of M , the existence of V is obvious. Otherwise z ∈ ∂M and we can find by Remark 4.12 ρ ∈ (0 , r ), (s)-sets S , . . . , S m and rotations γ , . . . , γ m such that(5.4) ∂M ∩ U ( z, ρ ) ⊂ Z ⊂ M and Z ⊂ U ( z, r ) , where Z := S mi =1 ( z + γ i ( S i )). Set(5.5) V := ( M ∩ U ( z, ρ )) ∪ Z. It is clearly sufficient to prove that V is pathwise connected. Note that Remark 3.2implies that Z is pathwise connected and consider an arbitrary y ∈ ( M ∩ U ( z, ρ )) \ Z .Using (5.4), we obtain y ∈ int M ∩ U ( z, ρ ). It is easy to show that there exists apoint w ∈ y, z ∩ ∂M such that y, w ⊂ M . Since clearly y, w ⊂ U ( z, ρ ), we have y, w ⊂ V . So y can be connected by a path in V with the point w which belongsto Z by (5.4). Consequently, V is pathwise connected.The first part of (ii) holds since every connected, locally pathwise connectedtopological space is pathwise connected (see, e.g., [25, Theorem 27.5]). To arguethat the “moreover part” holds, we will say (for a while) that a set A ⊂ R is r-path CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 23 connected , if any two points x and y in A can be connected in A by a rectifiablepath. Corollary 5.2 implies that each (s)-set is r-path connected. Consequently theargument in the proof of (i) gives that each V as in (5.5) is even r-path connected(and thus M is “locally r-pathwise connected”). So an obvious modification of the(standard easy) proof of [25, Theorem 27.5] gives that M is r-path connected. (cid:3) Remark 5.7. Using a straightforward easy (but not trivial) modification of theproof of [25, Theorem 27.5] , we can obtain the following stronger result:If M is a connected D set and x = y ∈ M , then there exist numbers t < t < · · · < t m and a continuous injective f : [ t , t m ] → M such that f ( t ) = x , f ( t m ) = y and each set f ([ t k , t k +1 ]) , k = 1 , . . . , m − , is a DC graph.(Note that this statement is equivalent to the assertion that every x = y ∈ M can be connected in M by a simple curve of finite turn; for the notion of the turnsee, e.g., [6] .)Indeed, it is not difficult to see that each (s)-set and consequently also each V asin (5.5) has this connectivity property. For each D set M , the system of all components of M is discrete (and socountable) by Theorem 4.20. In the following example we show that the system ofall components of ∂M can be uncountable. Example . Let C ⊂ [0 , 1] be the classical Cantor ternary set and let { I n : n ∈ N } be all bounded components of R \ C . For each n ∈ N , choose an interval [ u n , v n ] ⊂ I n and set F := S n ∈ N [ u n , v n ]. Then f := ( d F ) is DC on R (see, e.g., [1, p. 976]) andso the set K := graph f ∪ graph( − f )is a (nowhere dense) D set by (1.1) and (2.6). Put M := { ( x, y ) : y ≥ f ( x ) } ∪ { ( x, y ) : y ≤ − f ( x ) } . Then M is a D set by Lemma 4.14. It is easy to see that π ( ∂M ) = R \ S n ∈ N ( u n , v n )and so π ( ∂M ) has uncountably many components. Consequently ∂M has uncount-ably many components as well.(In particular, ∂M is not a D set by Theorem 4.20.)We already observed (see Corollary 4.13) that, for each D set M , the set ofall isolated points of M is discrete. Now we prove a related result concerningexceptional points of D sets of another type. Proposition 5.9. Let M be a D set. Then the set (5.6) E M := { z ∈ M : card(Tan ( M, z ) ∩ S ) = 1 } is discrete.Proof. First consider the case when M is an (s)-set; let r > f , . . . , f k and H beas in Definition 3.1. Then(5.7) E M ∩ U (0 , r ) ⊂ { } . Indeed, if z = ( x, y ) ∈ ( M ∩ U (0 , r )) \ { } , then 0 < x < r and by (3.2) there exists h ∈ H with h ( x ) = y . Since h is a DCR function by Corollary 5.2, we have z / ∈ E M (e.g., by Remark 4.6 (i)).Further consider the case when M is a nowhere dense D set. Let P be the setof all isolated points of M . Obviously, for each z ∈ ( R \ M ) ∪ P there is an ω > E M ∩ U ( z, ω ) = ∅ . If z ∈ M \ P , let ρ > S , . . . , S m and γ , . . . , γ m be as in Theorem 4.17 (iii). Using (5.7) for M = S i , i = 1 , . . . , m, we easily obtain ω > E M ∩ U ( z, ω ) ⊂ { z } and conclude that E M is a discrete set. Finally consider the case of a general D set M . Let M = K ∪ C be thedecomposition of M from Theorem 4.15 (iii). Since K is a nowhere dense D set,we know that E K (defined as in (5.6)) is a discrete set. Thus it is sufficient toprove E M ⊂ E K . To this end, consider an arbitrary point z ∈ E M . Then clearly z / ∈ C and consequently z ∈ K . It is easy to see that z is not an isolated point of K and therefore card(Tan ( K, z ) ∩ S ) ≥ 1. Since Tan ( K, z ) ⊂ Tan ( M, z ), we obtain z ∈ E K , which completes the proof. (cid:3) An important application of our characterizations of D sets is Theorem 5.11below on images of D sets. First we prove a lemma on images of (s)-sets. Lemma 5.10. Let ∈ G ⊂ R be an open set, c > , and let F : G → R be alocally DC mapping such that F (0) = 0 and F ′ + (0 , (1 , c, . Let S ⊂ G be an(s)-set. Then there exist a > and b > such that (5.8) S ∗ := F ( S ∩ (( −∞ , a ] × R )) ∩ (( −∞ , b ] × R ) is an (s)-set.Proof. First note that F is locally Lipschitz on G by Lemma 2.1 (iii). Let f , . . . , f k be DCR functions on [0 , r ] and H be a set of continuous functions on [0 , r ] as inDefinition 3.1. Without any loss of generality, we can suppose that graph f i ⊂ G , i = 1 , . . . , k . Indeed, otherwise we can diminish r > i = 1 , . . . , k , let ϕ i ( x ) = ( ϕ i ( x ) , ϕ i ( x )) := F (( x, f i ( x ))) , x ∈ [0 , r ] . Since f i is a DCR function, we can find ε i > f i : ( − ε i , r + ε i ) → R of f i such that ( x, ˜ f i ( x )) ∈ G, x ∈ ( − ε i , r + ε i ). Then˜ ϕ i ( x ) = ( ˜ ϕ i ( x ) , ˜ ϕ i ( x )) := F (( x, ˜ f i ( x ))) , x ∈ ( − ε i , r + ε i ) , is a DC mapping by Lemma 2.1 (ii),(iv). Concequently ϕ i and ϕ i are DCR func-tions on [0 , r ] by Lemma 2.7(( i ) ⇔ ( v )). Let η i ( x ) := ( x, ˜ f i ( x )) , x ∈ ( − ε i , r + ε i ).Then ( η i ) ′ + (0) = (1 , 0) and consequently, by the chain rule for one-sided directionalderivatives (see, e.g. [21, Proposition 3.6 (i) and Proposition 3.5]),( ˜ ϕ i ) ′ + (0) = ( c, , ( ϕ i ) ′ + (0) = ( ˜ ϕ i ) ′ + (0) = c, ( ϕ i ) ′ + (0) = ( ˜ ϕ i ) ′ + (0) = 0 . Consequently Lemma 2.2 gives that c is the strict right derivative of ˜ ϕ i at 0, whicheasily implies that there exist 0 < r i < r and 0 < ρ i such that ψ i := ϕ i | [0 ,r i ] is anincreasing DCR function and ψ i : [0 , r i ] → [0 , ρ i ] is a bilipschitz bijection. ThenLemma 2.8 implies that h i := ϕ i ◦ ( ψ i ) − is a DCR function on [0 , ρ i ] and it is easyto see that F (graph( f i | [0 ,r i ] )) = graph h i and ( h i ) ′ + (0) = 0 . Set a := min( r , . . . , r k ) , b := min( ϕ ( a ) , . . . , ϕ k ( a )) and f ∗ i := h i | [0 ,b ] , i = 1 , . . . , k. Then clearly the set S ∗ from (5.8) satisfies S ∗ ⊂ S ki =1 graph f ∗ i .For each h ∈ H put E h := F (graph h | [0 ,a ] ) ∩ (( −∞ , b ] × R ) . Since S ∗ = S h ∈ H E h , to prove that S ∗ is an (s)-set it suffices to show that, foreach h ∈ H , the set E h is a graph of a continuous function h ∗ on [0 , b ]. Since E h is compact (and each function with compact graph is continuous), it is sufficient toprove that(5.9) E h is a graph of a function h ∗ on [0 , b ]. CHARACTERIZATION OF SETS IN R WITH DC DISTANCE FUNCTION 25 Set ω ( x ) := π ( F (( x, h ( x )))) , x ∈ [0 , a ]. Then ω is continuous and consequently ω ([0 , a ]) is a closed interval. Since ω (0) = 0 and, for some 1 ≤ i ≤ k , ω ( a ) = ϕ i ( a ) ≥ b , we obtain [0 , b ] ⊂ ω ([0 , a ]). So, to prove (5.9), it is sufficient to showthat ω is injective. Suppose, to the contrary, that there exist 0 ≤ x < x ≤ a suchthat ω ( x ) = ω ( x ). Set u := x . Further observe that there exists 1 ≤ i ≤ k such that h ( x ) = f i ( x ) and u := max { u ∈ [ x , x ] : h ( u ) = f i ( u ) } > u . Thenclearly either u = x or we can choose 1 ≤ i ≤ k such that h ( u ) = f i ( u ) and u := max { u ∈ [ x , x ] : h ( u ) = f i ( u ) } > u . Proceeding in this way, we obtainnumbers x = u < u < ... < u q = x with 1 ≤ q ≤ k and pairwise differentindeces i , i , . . . , i q − such that h ( u k ) = f i k ( u k ) and h ( u k +1 ) = f i k ( u k +1 ) for each0 ≤ k ≤ q − 1. Then ω ( u k ) = ϕ i k ( u k ) < ϕ i k ( u k +1 ) = ω ( u k +1 ) and therefore ω ( x ) = ω ( u ) < ω ( u ) < · · · < ω ( u q ) = ω ( x ), a contradiction which completesthe proof. (cid:3) Theorem 5.11. Let G ⊂ R , G ∗ ⊂ R be open sets and let F : G → G ∗ be abijection which is locally bilipschitz and locally DC. Let M ⊂ G be a D set suchthat F ( M ) is a closed set. Then F ( M ) is a D set.Proof. First consider the case when M is nowhere dense.To prove that M ∗ := F ( M ) ∈ D , we will verify the validity of condition (iii) ofTheorem 4.17 for M ∗ . To this end, consider an arbitrary point z ∗ ∈ M ∗ which isnot an isolated point of M ∗ and set z := F − ( z ∗ ). Since M ∈ D , by Theorem 4.17(iii) there exist ρ > 0, (s)-sets S , . . . , S m and rotations γ , . . . , γ m such that(5.10) M ∩ U ( z, ρ ) = m [ i =1 ( z + γ i ( S i )) ∩ U ( z, ρ ) . Remark 4.18 shows that we can suppose that(5.11) U ( z, ρ ) ⊂ G and z + γ i ( S i ) ⊂ G, i = 1 , . . . , m. For each i = 1 , . . . , m , we will apply Lemma 5.10 in the following way. Set v i := γ i ((1 , w i := F ′ + ( z, v i ). Since F is locally bilipschitz, we have w i = 0and consequently we can choose a rotation γ ∗ i and c i > γ ∗ i (( c i , w i .Now, for each i = 1 , . . . , m , set β i ( u ) := z + γ i ( u ), β ∗ i ( u ) := z ∗ + γ ∗ i ( u ), u ∈ R , and(5.12) F i := ( β ∗ i ) − ◦ F ◦ β i . Then F i is a locally bilipschitz and locally DC bijection from G i := ( β i ) − ( G ) onto G ∗ i := ( β ∗ i ) − ( G ∗ ), F i (0) = 0 and ( F i ) ′ (0 , (1 , c i , S i ⊂ G i by (5.11),Lemma 5.10 implies that there exist a i > b i > S ∗ i := F i ( S i ∩ (( −∞ , a i ] × R )) ∩ (( −∞ , b i ] × R )is an (s)-set. Now choose ρ ∗ > ρ ∗ < min( b , . . . , b m ) and diam F − ( U ( z ∗ , ρ ∗ )) < min( ρ, a , . . . , a m ) . Set V := F − ( U ( z ∗ , ρ ∗ )). Then clearly, for each i ,( β i ) − ( V ) ⊂ ( −∞ , a i ) × R and ( β ∗ i ) − ( U ( z ∗ , ρ ∗ )) ⊂ ( −∞ , b i ) × R and consequently(5.14) F ( β i ( S i ) ∩ V ) = β ∗ i ( S ∗ i ) ∩ U ( z ∗ , ρ ∗ ) . Since V ⊂ U ( z, ρ ) by (5.13), using (5.10) we obtain M ∩ V = S mi =1 ( β i ( S i ) ∩ V ).Consequently (5.14) implies M ∗ ∩ U ( z ∗ , ρ ∗ ) = F ( M ∩ V ) = m [ i =1 β ∗ i ( S ∗ i ) ∩ U ( z ∗ , ρ ∗ )and thus condition Theorem 4.17 (iii) holds for M ∗ . To finish the proof, consider an arbitrary D set M ⊂ G . By Theorem 4.15there exists a nowhere dense D set K such that ∂M ⊂ K ⊂ M . Observe that K ∗ := F ( K ) is closed, since it is clearly closed in G ∗ and K ∗ ⊂ M ∗ := F ( M ) ⊂ G ∗ .Consequently ∂M ∗ = F ( ∂M ) ⊂ F ( K ) = K ∗ and so ∂M ∗ ⊂ K ∗ ⊂ M ∗ . Since K ∗ is clearly nowhere dense and K ∗ ∈ D by the first part of the proof, Theorem 4.15implies that M ∗ ∈ D . (cid:3) References [1] M. Baˇc´ak, J. Borwein : On difference convexity of locally Lipschitz functions. Optimization60 (2011), 961–978.[2] P. Cannarsa, C. Sinestrari : Semiconcave Functions, Hamilton-Jacobi Equations, and Op-timal Control. Progress in Nonlinear Differential Equations and their Applications 58,Birkh¨auser, Boston (2004).[3] F. Clarke : Optimization and Nonsmooth Analysis. SIAM, Philadelphia, 1990[4] S. Cobzas, C. Mustata : Norm-preserving extension of convex Lipschitz functions. J. Approx.Theory, 24 (1978), 236–244.[5] A. Colesanti, D. Hug : Hessian measures of semi-convex functions and applications to supportmeasures of convex bodies. Manuscripta Math. 101 (2000), 209-238.[6] J. Duda : Curves with finite turn. Czechoslovak Math. J. 58 (133) (2008), 23-49.[7] G.B. Folland : Real analysis. Modern techniques and their applications. Second ed., JohnWiley & Sons, New York, 1999.[8] J.H.G. Fu : Tubular neighborhoods in Euclidean spaces. Duke Math. J. 52 (1985), no. 4,1025–1046.[9] J.H.G. Fu : Integral geometric regularity. In: Kiderlen, M., Vedel Jensen, E.B. (eds.) TensorValuations and Their Applications in Stochastic Geometry and Imaging, 261–299, LectureNotes in Math. 2177, Springer, 2017.[10] J.H.G. Fu, D. Pokorn´y, J. Rataj : Kinematic formulas for sets defined by differences of convexfunctions. Adv. Math. 311 (2017), 796–832.[11] P. Hartman : On functions representable as a difference of convex functions. Pacific J. Math.9 (1959), 707–713.[12] I.P. Natanson : Theory of functions of a real variable, vol. I. Frederick Ungar Publishing Co.,New York, 1955.[13] D. Pokorn´y, J. Rataj : Normal cycles and curvature measures of sets with d.c. boundary.Adv. Math. 248 (2013), 963–985. DOI:10.1016/j.aim.2013.08.022[14] D. Pokorn´y, J. Rataj, L. Zaj´ıˇcek : On the structure of WDC sets. Math. Nachr. 292 (2019),1595–1626.[15] D. Pokorn´y, L. Zaj´ıˇcek : On sets in R d with DC distance function. J. Math. Anal. Appl.(online) DOI:10.1016/j.jmaa.2019.123536.[16] Pokorn´y, L. Zaj´ıˇcek : Remarks on WDC sets. To appear in Comment. Math. Univ. Carolin.[17] J. Rataj, L. Zaj´ıˇcek : On the structure of sets with positive reach. Math. Nachr. 290 (2017),1806–1829.[18] A.W. Roberts, E.D. Varberg ; Convex Functions. Pure and Applied Mathematics, vol. 57,Academic Press, New York-London, 1973.[19] H.L. Royden : Real analysis. third edition, Macmillan Publishing Company, New York, 1988.[20] S. Saks : Theory of the integral. second edition, Dover Publications, Inc., New York.[21] A. Shapiro : On concepts of directional differentiability. J. Optim. Theory Appl. 66 (1990),477–487.[22] H. Tuy : Convex Analysis and Global Optimization. 2nd ed., Springer Optimization and ItsApplications 110, Springer, 2016.[23] L. Vesel´y, L. Zaj´ıˇcek : Delta-convex mappings between Banach spaces and applications. Dis-sertationes Math. (Rozprawy Mat.) 289 (1989), 52 pp.[24] L. Vesel´y, L. Zaj´ıˇcek : On vector functions of bounded convexity. Math. Bohem. 133 (2008),321–335.[25] S. Willard : General topology. Addison-Wesley Publishing Co., Reading, Mass.-London-DonMills, Ont., 1970. Charles University, Faculty of Mathematics and Physics, Sokolovsk´a 83, 186 75Praha 8, Czech Republic E-mail address : [email protected] E-mail address ::