The study of regular real analysis was proposed by Chaudhuri, Sankaranarayanan, and Vardi in  as the analysis of real functions whose graphs are encoded by automata on infinite words. The motivation for such an investigation is to produce automata-theoretic decision procedures deciding continuity and other properties of regular functions. As part of that study in , the authors establish novel topological-geometric results about regular functions, in particular Lipschitzness and Hölder-continuity. This investigation is part of a larger enterprise of studying subsets of described in terms of such automata. This work has seen various applications in the verification of systems with unbounded mixed variables taking integer or real values (see Boigelot et al. [5, 6, 7]). Recently, there has been a new focus on the study of topological and metric-geometrical properties of such sets (see Adamczewski and Bell  and Charlier, Leroy, and Rigo ). We continue the investigation by giving answers to two questions raised in  in the case of regular functions with equal input and output base:
Is there a simple characterization of continuous or differentiable regular functions?
Is it decidable to check whether a regular function is differentiable?
Let be positive integers, set and . A function is -regular if there is a non-deterministic Büchi automaton in the language accepting precisely all words for which there are such that is an -ary representation of , is an -ary representation of , and . If , we simply say is -regular.
An instructional example of a continuous -regular function is the function that maps to the distance between and the classical middle-thirds Cantor set; see Figure 1. Observe that this function is locally affine away from a nowhere dense set. The main technical result of this paper shows that this holds for all continuous -regular functions. We say that a function on an interval is -affine if it is of the form for some .
Let be a continuous, -regular function. Then there is a nowhere dense Lebesgue null set such that is locally -affine away from .
We know that Theorem A fails for -regular functions when .
A differentiable -regular function is -affine. Given a Büchi automaton that recognizes an -regular function , the problem of checking whether is differentiable, is in .
We do not know whether Theorem B also fails in general, nor whether Question (2) has a positive answer in general. Furthermore, Theorem A gives an affirmative answer to a special case of an important question in mathematical logic about continuous definable functions in first-order expansions of the ordered additive group of real numbers. We discuss this question in Section 7.
Theorem B improves several results in the literature. Let be -recognizable. In  a model-theoretic argument was used to show that is affine whenever is continuously differentiable. Similar results had been proven before for functions, or for more restricted classes of automata, by Anashin , Konečný , and Muller . In unpublished work, Bhaskar, Moss, and Sprunger  also showed that any differentiable function computable by a letter-to-letter transducer is affine.
Our proof of Theorem A depends on three ingredients. The first is the theorem, proven in , that every continuous -regular function is Lipschitz. The second ingredient is the main result from  which implies that the graph of an -regular function is the attractor of a graph-directed iterative function system. This observation allows us to use the full power of metric geometry to study regular functions. In particular, we adjust to our setting the proof of the famous result of Hutchinson [13, Remark 3.4] that a Lipschitz curve in which is the attractor of a linear iterated function system is a line segment.
This work was done in the research project “Automata and Differentiable Functions” at the Illinois Geometry Lab in Spring 2018. R.M., Z.W., Z.X. and H.Y. participated as undergraduate scholars, A.B.G. and E.K. served as graduate student team leaders, and P.H. and E.W. as faculty mentors. A.B.G. was supported by an NSF Graduate Research Fellowship. P.H. was partially supported by NSF grant DMS-1654725.
Throughout, are used for natural numbers and are used for positive real numbers. We denote the coordinate projection from to onto the first coordinate by . Given a function , we denote its graph by . Given a (possibly infinite word) over an alphabet , we write for the -th letter of , and for .
2.1. Büchi Automata
A Büchi automaton (over an alphabet ) is a quintuple where is a finite set of states, is a finite alphabet, is a transition relation, is a set of initial states, and is a set of accept states.
We fix a Büchi automaton for the remainder of this section.
We say that is deterministic if is a singleton and for all and all , there is at most one such that .
Throughout a graph is a directed multigraph; that is a set of vertices and a set of edges , together with source and target maps . Vertices are connected by an edge if and .
The graph underlying is where and for all .
Let and be states in . A path of length from to is a sequence
We call the word the label of the path. We denote by the set of all labels of paths of length from to .
Let . A run of from is a sequence such that and for all . If , we say is a run of . Then is accepted by if there is a run of such that is infinite.
We let be the set of words accepted by .
Let be a state of . We say that is accessible if there is a path from to , and that is co-accessible if there is a path from to an accept state.
We say that is trim if all states are accessible and co-accessible. By removing all states that are not both accessible and co-accessible from , we obtain a trim Büchi Automaton that recognizes exactly the same words as .
We say that is closed if
The closure of is the Büchi automaton ; that is the automaton in which all states are changed to accept states. Note that the closure of is closed.
Two elements of of lie in the same strongly connected component if there is a path from to and vice versa. Being in the same strongly connected component is an equivalence relation on . We call each equivalence class a strongly connected component of . We say that is strongly connected if it only has one strongly connected component. The condensation of is the graph whose vertices are the strongly connected components of the underlying graph of such that two strongly connected components are connected by an edge if
there are vertices and a path from to .
A sink of is a strongly connected compontent of that has no outgoing edges in the condensation of .
We say that is weak if whenever belong to the same strongly connected component, if and only if . Observe that every closed automaton is weak. We will use the fact that whenever is weak, there is a weak deterministic automata such that (see Boigelot, Jodogne, and Wolper [6, Section 5.1]).
2.2. Recognizable subsets of
Given a (possibly infinite) word over , we let
Let and . Set .
Given , we denote by the word such that for each
If , we set
A set is -recognized by a Büchi automaton over if
We say is -recognizable if is -recognized by some Büchi automaton over .
If , then we use -recognized and -recognizable. Recognizable sets are introduced in  and their connection to first-order logic is studied in .
We say that is -accepted by a Büchi Automaton if
Again, if , we write -accepted. It is clear that an -recognizable set is -acceptable. The converse is also true, but we will not apply this fact. We distinguish between -recognizability and -acceptence because we can prove stronger theorems about automata that -accept a given set.
Given a Büchi automaton over , we set
When , we will simply write .
By [8, Lemma 58] if is -accepted by a closed and trim Büchi automaton, then is closed in the usual topology on .
Fact 2.1 ([8, Remark 59]).
Let be -accepted by a trim Büchi automaton . Then the topological closure of is -accepted by the closure of .
2.3. Regular functions
A function is said to be -regular if its graph is -recognizable. We give an example of a non-affine continuous -recognizable function.
Let be the classical middle-thirds Cantor set. Consider the function given by
The graph of is -accepted by the slightly simpler automaton in Figure 3. Observe that in this automaton the sets and are sinks of . Furthermore, whenever there is such that is locally affine on an interval around with slope , then there is such that
the acceptance run of is eventually in .
Similarly, if is locally affine on an interval around with slope , the acceptance run of such a satisfying (1) is eventually in .
A function is -Lipschitz if
and is Lipschitz if it is -Lipschitz for some . We say that is Hölder continuous with exponent if there is a such that
Note that Lipschitz functions are precisely functions which are Hölder continuous with exponent one. It is also easy to see that any function which is Hölder continuous with exponent is constant.
Fact 2.3 ().
Let , and suppose is -regular and continuous. Then is Hölder continuous with exponent . In particular:
If , then is constant, and
if , then is Lipschitz.
Fact 2.3 is proved in , see [9, Theorem 10]. Indeed, it is claimed that is Lipschitz even when , but the proof only treats the case . An inspection of the proof however shows that when , only the weaker condition of Hölder continuity is obtained. We now give an example of a -regular function that is continuous, but not Lipschitz.111We thank Erin Caulfield for pointing out that this is a continuous regular function that is not Lipschitz.
2.4. Affine regular functions
In this subsection we show that every affine -regular function defined on an interval is -affine. We require the following well-known fact.
Every Büchi automaton that accepts an infinite word, accepts an infinite periodic word.
Lemma 2.6 below is a corollary to Fact 2.5. One can use Lemma 2.6 to show that many familiar non-affine functions are not -regular. For example, it is relatively easy to show that a polynomial of degree cannot be -regular using Lemma 2.6.
Let be a nonempty subinterval of and let be -regular. Then for all .
The proof below shows that Lemma 2.6 holds more generally for -regular functions.
By Fact 2.5 every -recognizable subset of contains a point with rational coordinates. In particular, every -recognizable singleton has rational coordinates. Fix a rational . It is easy to see that is -recognizable. As is -recognizable, and the intersection of two -recognizable sets is -recognizable, it follows that
is -recognizable. Thus is rational. ∎
Lemma 2.6 and the fact that an affine function that takes rational values on rational points is necessarily -affine, together imply the following:
Let be a nonempty open interval and let be -regular and affine. Then is -affine.
Proposition 2.7 is a special case of a result on first-order expansions , see [10, Theorem 3.9]. This more general result shows that Proposition 2.7 still holds when the graph of is -recognized by an Büchi automaton with advice, where the automaton that recognizes the graph can access a fixed infinite advice string.
2.5. Graph Directed Iterated Function Systems and Self-similar sets
We now recall the main results of . In particular, we recall a purely geometric description of closed -recognizable sets.
Let and be metric spaces. A similarity of ratio between and is a function such that
A graph-directed iterated function system (of ratio ), or a GDIFS for short, is a quadruple such that
is a graph,
is a family of metric spaces, and
is a family of functions such that is a similarity of ratio for all .
We typically drop the source and range maps. We let denote the set of edges from to . An attractor for is a collection such that each is a compact subset of and
Let be a Büchi automaton over . We associate a GDIFS of ratio to as follows. Let . Let be with the usual euclidean metric for each . Set , and for each let
Fact 2.8 ([8, Theorem 57]).
Suppose is trim and closed. Then
where is the unique attractor of .
Let be a closed subset of . The collection
of subsets of is known as the -kernel of . We say that is -self similar if the -kernel of contains only finitely many distinct sets. This notion was introduced in . Fact 2.9 gives a purely metric characterization of closed -recognizable sets. While not crucial to the main argument of the paper, we will use this fact to show that the nowhere dense in the statement of Theorem A is Lebesgue null.
Fact 2.9 ([8, Theorems 57 & 62]).
Let be a closed subset of . Then is -recognizable if and only if is -self similar.
As shown in Boigelot, Rassart, and Wolper , there is also a connection between -recognizable sets and sets definable in a particular first-order expansion of the ordered real additive group . Let be the ternary predicate on that holds whenever for and there is a base- expansion of with -th digit . Let be the first-order structure .
Fact 2.10 ([7, Theorem 5]).
Let . Then is -recognizable if and only if is definable in (without parameters).
Fact 2.10 is a powerful tool for establishing that the collection of -recognizable sets is closed under various operations. For example it may be used to easily show that the interior and closure of an -recognizable set are also -recognizable.
3. Tools from metric geometry
3.1. Hausdorff Measure
We recall the definition of the one-dimensional Hausdorff measure (generalized arc length) of a subset of . We let be the diameter of a subset of . Given we declare
where the infimum is taken over all countable collections of closed balls of diameter covering . The one-dimensional Hausdorff measure of is
The limit always exists as decreases with . Recall that agrees with the usual Lebesgue measure on . We now prove a general lemma about graphs of Lipschitz functions.
Let be a Lipschitz function and let be a family of connected, pairwise disjoint subsets of . Then
Let be an open subinterval. Since is a Lipschitz function, is equal to the arc length of . Thus . Observe that . For , let be the interior of . Since is connected, is connected, too. Then for all such that , we have , since . Therefore is countable, as the order topology on the set of real numbers is second-countable. Countable additivity of Hausdorff measures implies
3.2. Nowhere dense recognizable sets are Lebesgue null
We first recall an important definition from metric geometry. A subset of is -porous if every open ball in with radius contains an open ball of radius that is disjoint from . A subset of is porous if it is -porous for some . Lemma 3.2 holds for recognizable subsets of . We only require the one-dimensional case, so to avoid very mild technicalities we only treat that case.
Let be -recognizable and nowhere dense. Then is porous.
In the following proof an -interval is an interval of the form .
Recall that the -kernel of is the collection of sets of the form
where and . By Fact 2.9, the -kernel of consists of only finitely many distinct subsets of , each of which has empty interior. Thus, for some , there is an -interval that is disjoint from every element of the -kernel of . It follows that any -interval contains an -interval which is disjoint from . Note that any interval contains an -interval of length . Thus any interval contains an -interval with length that is disjoint from . Thus is -porous. ∎
It is shown in Luukkainen [15, Theorem 5.2] that a subset of is porous if and only if the Assouad dimension of is strictly less than . The Hausdorff dimension of a closed subset of is bounded above by its Assouad dimension. It follows that a nowhere dense -recognizable subset of has Hausdorff dimension . In particular a nowhere dense -recognizable subset of is Lebesgue null. For the sake of completeness we provide a proof of the following:
Every porous subset of is Lebesgue null. In particular, every nowhere dense -recognizable subset of is Lebesgue null.
Let be -porous. Note that the closure of is also -porous. After replacing by its closure if necessary we suppose is closed, and so in particular, Lebesgue measurable. Every interval contains an interval with length at least that is disjoint from . Hence
for all such that . Suppose has positive Lebesgue measure. By the Lebesgue density theorem we have
for -almost all . This is a contradiction. ∎
4. The strongly connected case
In this section we prove Theorem A in the special case when the -regular function under consideration is accepted by a strongly connected determinstic Büchi automaton. Indeed, we establish the following strengthening of Theorem A in this case.
Let be an -regular continuous function whose graph is -accepted by a strongly connected deterministic Büchi automaton . Then is -affine.
This extends a classical result of Hutchinson [13, Remark 3.4] for functions whose graph is the attractor of an iterative function system. The original result almost directly implies Theorem 4.1 when the automaton only has one state.
4.1. Two lemmas
We collect two lemmas about strongly connected Büchi automata before proving Theorem 4.1. We let be a Büchi automaton.
Suppose is strongly connected. Let be such that
Since is finite, the pigeonhole principle yields a state such that
Let . Since is strongly connected, there is a path of length from to . Thus for all
Suppose is strongly connected and . If has interior, then .
Set . Let be an open interval contained in . We suppose is nonempty towards a contradiction, and fix . Let be such that
Since , there is a state such that there is no run of either or from . Since is strongly connected, there are , and a run of such that and
Our assumption on and implies that the set contains neither nor . Set . Since , we have that
Thus . Together with (1), this contradicts . ∎
Recall that is the coordinate project onto the first coordinate.
Let be a strongly connected Büchi automaton over . If has interior, then .
Note that . It is easy to see that there is a strongly connected Büchi automaton over such that . The corollary now follows from Lemma 4.3. ∎
4.2. Proof of Theorem 4.1
Throughout this subsection, fix an -regular continuous whose graph is -accepted by a strongly connected deterministic Büchi automaton . As is strongly connected, it is trim. As is closed, we may assume that is closed. Let be the GDIFS associated to . Let be the attractor of the GDIFS . By Fact 2.3,
We fix some notation. For and , there is a unique path from to with label , since is deterministic. We let be the composition . Then
Since is the attractor of , we have that for each
Let , and let and be such that . Then
Set and . Thus
Observe that . We get that
Since , there is some such that . Observe that when both and , the statement of the Lemma follows immediately.
We therefore can reduce to the case when there is such that .
Suppose that . Without loss of generality we can assume . Then
By (2), we have . This directly implies that must be a singleton as is a function.
Suppose that . Without loss of generality we can assume . Then
Towards a contradiction, suppose that