1 Introduction and Preliminaries
In the previous post, we motivated a series of questions surrounding the sums of periodic functions and the existence of functions with incommensurable periods. Now, we are ready to dive in. We will see that many of the things we intuitively hold to be true (or that I at least held to be true) about periodic functions do indeed hold for continuous functions in particular. We will also start to see, however, that the structural richness of sets of periods leaves much room for pathological behaviour deviating starkly from intuitions based on the continuous functions.
To begin, let us review the basic definitions and facts about periodic functions that set the stage for our further explorations, revealing the beautiful interplay of algebra and topology in the world of periodicity.
Definition 1.1 (Periodic Function) A function \(f:\mathbb{R}\to\mathbb{R}\) is said to be periodic if there exists a non-zero real number \(p\) such that \(f(x+p)=f(x)\) for all \(x\in\mathbb{R}\). If there exists a smallest positive such \(p\), it is called the fundamental period of \(f\), and we say \(f\) is strictly periodic.
Remark: Note that a function can be periodic without being strictly periodic; for instance, the constant functions are periodic with any real period, but they are not strictly periodic. In this series, we will examine pathological examples of functions that fail to be strictly periodic but are also not constant. Some are even constant only on sets of measure zero, which is as far from being constant as one can get. We will also see pathological functions that actually are strictly periodic.
Definition 1.2 (The Period Module) For any function \(f:\mathbb{R}\to\mathbb{R}\), we denote by \(P_f\) the set of all periods of \(f\), i.e., \(P_f := \{p\in\mathbb{R}: f(x+p)=f(x) \text{ for all } x\in\mathbb{R}\}\). We call \(P_f\) the period module of \(f\). Also, we say two periodic functions \(f\) and \(g\) are incommensurable if \(P_f\cap P_g = \{0\}\), and they are commensurable otherwise.
(Note: Constant functions are trivially commensurable with any periodic function. Non-periodic functions still have a period module, but it is just \(\{0\}\)).
Definition 1.3 (\(\mathbb{Z}\)-submodule and its Rank) A subset \(M\) of \(\mathbb{R}\) is called a \(\mathbb{Z}\)-submodule if it is closed under addition and under multiplication by integers. The rank of \(M\) is the cardinality of a maximal linearly independent subset of \(M\) over \(\mathbb{Z}\). This is the analog of the “dimension” of a vector space
(Note: \(\mathbb{Z}\)-modules are just abelian groups, and all abelian groups are \(\mathbb{Z}\)-modules, so it may seem preferable to speak of the period group instead of module. I chose to emphasize the module aspect because it is more natural to speak of linear independence and thus rank in the context of modules, given the analogy to vector spaces. The rank of a period module and its connection to the \(\mathbb{Q}\)-vector space it generates will be very important in this series).
We immediately find some basic facts about periodic functions and about the algebra and topology of their period modules:
- Fact 1: If \(f, g\) are incommensurable functions, any (nonzero) periods must be incommensurable real numbers. If \(p\in P_f\) and \(q\in P_g\) are such that \(p/q\in\mathbb{Q}\), then there exist integers \(n, m\) such that \(np = mq\), and thus \(np\in P_f\cap P_g\), showing that \(f\) and \(g\) are not incommensurable functions.
- Fact 2: If \(f\) is periodic with period \(p\), then it is also periodic with respect to any integer linear combinations of periods of \(f\). This means \(P_f\) is a \(\mathbb{Z}\)-submodule of \(\mathbb{R}\).
- Fact 3: If \(f\) is strictly periodic with fundamental period \(p\), then the set of all periods of \(f\) is precisely the \(\mathbb{Z}\)-module \(p\mathbb{Z}:= \{np : n\in\mathbb{Z}\}\). I.e., \(P_f\) is necessarily a submodule of rank 1.
With these preliminary facts out of the way, we can start to see how closely the nature of a periodic function relates to the topological and algebraic features of its period module, as the following propositions make clear:
Proposition 1.1 If \(P_f\) is dense, then \(f\) is either constant or else it is nowhere continuous.
Proof. Suppose \(f\) is not constant and let \(x \in \mathbb{R}\). For any open interval \((a,b)\) containing \(x\), the density of \(P_f\) guarantees the existence of periods \(p, q \in P_f\) such that \(a < p < q < b\). Since \(P_f\) is a \(\mathbb{Z}\)-submodule, the difference \(r = q-p\) is a strictly positive period. The closed interval \([p, q] \subset (a,b)\) has length exactly \(r\), meaning it spans a full period of \(f\). Consequently, the image of \([p, q]\) under \(f\) is the entire range of \(f\). Because \(f\) is not constant, its range contains some value distinct from \(f(x)\), guaranteeing there is some \(z \in [p, q] \subset (a,b)\) such that \(f(z) \neq f(x)\). Thus, \(f\) cannot be continuous at \(x\).
Proposition 1.2 \(P_f\) is dense if and only if \(f\) is not strictly periodic. Thus, if a periodic \(f\) is non-constant and continuous, it must be strictly periodic.
Proof. If \(P_f\) is dense, then the infimum of positive periods must be zero, and thus no fundamental period can exist. Conversely, if no fundamental period exists, the infimum \(p\) of positive periods must be zero; for otherwise, we could find two distinct periods arbitrarily close to \(p\) such that their positive difference would be a positive period smaller than \(p\), violating the infimum. Thus, any interval around \(0\) must contain elements of \(P_f\). Now take any interval \((a, b)\) with \(0\not\in (a, b)\). By the foregoing, we can find \(x\in P_f\) with \(0<|x|<\min(\{|b|, |a|, |b-a|\})\). There thus must be some integer \(n\) so that \(nx\in (a, b)\), for otherwise we could find an \(n\) so that \((n-1)x \le a < b \le nx\), which contradicts \(|x| < |b-a|\). But \(nx\in P_f\), showing \(P_f\) is dense in \(\mathbb{R}\). The last part is an immediate consequence of this density and Proposition 1.1.
Proposition 1.3 If \(p, q\) are incommensurable (\(p/q\not\in \mathbb{Q}\)), then the \(\mathbb{Z}\)-module \(\mathbb{Z}_{p,q}:=\{np + mq : n,m\in\mathbb{Z}\}\) is dense in \(\mathbb{R}\). In particular, if a function \(f\) has two incommensurable periods \(p\) and \(q\), then \(\mathbb{Z}_{p,q}\subseteq P_f\), meaning its period module is dense and \(f\) is not strictly periodic. Therefore, non-constant functions with incommensurable periods are nowhere continuous.
Proof. To see the first part of the proposition, we make use of the fact that irrationals can be approximated by rationals very nicely: by Dirichlet’s approximation theorem, we know that for any \(\epsilon>0\), we can find integers \(-n, m\) such that \(|mp/q -(-n)|<\epsilon/|q|\), and thus \(|mp +nq|<\epsilon\). This shows all intervals containing the origin have elements of \(\mathbb{Z}_{p,q}\). From here, the density of \(\mathbb{Z}_{p,q}\) follows in the same way as the density of \(P_f\) in the previous proposition. The second part of the proposition then follows immediately from everything discussed previously.
2 The Difference Operator and Periodic Sums
Now, we revisit the question of sums of incommensurable functions, and in particular we show that in the continuous case, such sums are never periodic.
For this and for the future posts in this series, we introduce the following operator which is ubiquitously used in discussions of the periodic decomposition problem:
Definition 2.1 (Difference Operator) For any function \(f:\mathbb{R}\to\mathbb{R}\) and any \(p\in\mathbb{R}\), we define the difference operator in p \(\Delta_p\) by \(\Delta_p f(x) := f(x+p) - f(x)\) for all \(x\in\mathbb{R}\). As the reader can verify, these are linear operators for all \(p\), and they commute with each other, i.e., \(\Delta_p\Delta_q = \Delta_q\Delta_p\) for all \(p, q\in\mathbb{R}\).
This operator measures how much \(f\) changes when we translate by \(p\). In particular, \(\Delta_p f\) is identically zero if and only if \(p\) is a period of \(f\). A few more key facts about difference operators and sums of functions:
- For any \(f:\mathbb{R}\to\mathbb{R}\) and any \(q\in\mathbb{R}\), we have \(P_f\subseteq P_{\Delta_q f}\). That is, all periods of \(f\) are also periods of \(\Delta_q f\).
- Given two functions \(f,g\), their sum is periodic if and only if there is an \(r\neq 0\) such that \(\Delta_r f +\Delta_r g=0\). Such an \(r\) is then a period of \(f+g\).
- Thus, if \(r\) is a period of \(f+g\), then for all \(p\in P_f\) and all \(q\in P_g\) we have: \[0=\Delta_r \Delta_q f = \Delta_r\Delta_p g \tag{2.1}\] which implies: \[P_{\Delta_q f} \supseteq P_f + P_{f+g} \quad \text{and} \quad P_{\Delta_p g} \supseteq P_g + P_{f+g}\]
- Hence, if \(f+g\) is periodic, then \(\Delta_q f\) and \(\Delta_p g\) are commensurable for all \(p\in P_f\) and all \(q\in P_g\), even if \(f\) and \(g\) are incommensurable. This however is not a sufficient condition for \(f+g\) to be periodic, as the reader can verify (we will also see this in the next installment).
- When \(f, g\) are incommensurable and their sum is periodic, then the \(r\) above must be incommensurable with all periods of \(f\) and \(g\). In other words, we actually have that for all \(p\in P_{f}\) and \(q\in P_g\), \[P_{\Delta_q f} \supseteq P_f \oplus P_{f+g} \quad \text{and} \quad P_{\Delta_p g} \supseteq P_g \oplus P_{f+g} \tag{2.2}\]
- If \(f, g\) are themselves periodic and incommensurable with \(f+g\) periodic, Equation 2.2 implies \(P_{\Delta_q f}\) and \(P_{\Delta_p g}\) have rank \(\geq 2\) and are therefore dense, forcing \(\Delta_q f\) and \(\Delta_p g\) to be either constant or nowhere continuous by Proposition 1.1.
This leads us to the main result of this section:
Theorem 2.1 Let \(f\) be a continuous periodic function, and let \(g\) be any other periodic function. Then \(f+g\) is periodic if and only if \(f, g\) are commensurable.
Proof. Commensurability of \(f, g\) trivially implies periodicity of \(f+g\). For the other direction, suppose \(f+g\) is periodic and \(f, g\) are incommensurable periodic functions. We prove that neither \(f\) nor \(g\) could be continuous. By the discussion above, \(\Delta_q f\) has a dense period module for any nonzero \(q\in P_g\), and thus is either nowhere continuous or is a nonzero constant (since \(q\not \in P_f\) by assumption). If \(\Delta_q f\) is nowhere continuous, then \(f\) must not have been continuous to begin with. If it is a nonzero constant \(c\), then \(f\) must be unbounded, because in this case \(f(x+nq) = nc + f(x)\), which goes to infinity as \(n \to \infty\). But continuous periodic functions must be bounded, so \(f\) cannot be continuous. Reasoning in the exact same way establishes non-continuity of \(g\) and this finishes the proof.
The reader may wonder whether Theorem 2.1 can be strengthened: must incommensurable periodic functions with a periodic sum be not just discontinuous, but nowhere continuous? I initially believed so — after all, the proof above shows that \(\Delta_q f\) and \(\Delta_p g\) are either nowhere continuous or a nonzero constant. In the latter case, if, say, \(\Delta_q f\) is a nonzero constant, then \(f\) must in fact be nowhere bounded, which is even worse than nowhere continuous (see Exercise 1 below). In the remaining case, where \(\Delta_q f\) is nowhere continuous, it might seem like this should force \(f\) to be nowhere continuous as well. But as Exercise 2 shows, this inference is not valid: a function can have points of continuity even when all of its nontrivial difference operators are nowhere continuous. This leaves “open” (for me at least) the question of just how large the set of continuity points can be under these conditions. We formalize this in the next exercises and questions.
[Edit, 04/04/26: I have since found some partial answers to the questions of size of the set of continuity points; namely the Baire Category Theorem forces these sets to be nowhere dense. See the appendix below.]
Let \(\mathcal{C}(f)\) denote the set of points of continuity of a function \(f\).
Exercises.
- Let \(f\) be a periodic function and suppose there is a \(q\not\in P_f\) such that \(\Delta_q f\) is a nonzero constant. Show that \(f\) must be unbounded on every open interval, and show this forces \(\mathcal{C}(f) = \emptyset\). (Hint: justify the assertion that \(f(x+nq) = n\Delta_q f(x) + f(x)\), then argue that \(P_f+ q\mathbb{Z}\) must be dense, and use this to show that \(f\) is nowhere bounded)
- Find a periodic function \(f\) with nonempty \(\mathcal{C}(f)\) such that \(\Delta_q f\) is nowhere continuous for all \(q\not\in P_f\). Conclude that the argument used in Theorem 2.1 does not directly generalize to all functions with nonempty \(\mathcal C(f)\). (Hint: constructing \(f\) so that \(\mathcal{C}(f)\) coincides with \(P_f\) makes things simpler, though note this is not necessary.)
And lastly, the questions which I don’t know how to answer, and whose answers I was not able to find after a bit of searching on the internet:
[Edit, 04/04/26: keep reading to the appendix below for partial answers.]
“Open” questions.
- When the conditions of Exercise 2 above are met, how large can \(\mathcal{C}(f)\) be (can it be uncountable? can it have nonzero measure?) What other properties could \(\mathcal C(f)\) have? It turns out it must be nowhere dense and thus topologically quite “small”; see the appendix.
- Is it possible to find a non-constant periodic function \(f\) with nonempty \(\mathcal{C}(f)\) such that \(P_{\Delta_q f}\) has rank 2 or greater for some \(q\not\in P_f\)? How about for all \(q\mathbb{Z}\) for some \(q\)? In either situation, how large can \(\mathcal{C}(f)\) be, in the various senses above?
- Does Theorem 2.1 still hold if “continuous” is replaced by “having at least one point of continuity”? In other words, if \(f\) and \(g\) are incommensurable periodic functions and at least one of them (say \(f\)) has a nonempty set of continuity points, must \(f+g\) fail to be periodic? And if it does not hold, what is the weakest continuity condition on \(f\) that still forces commensurability to be necessary for \(f+g\) to be periodic? See the appendix for two theorems, Theorem 2.2 and Theorem 2.3, which strengthen Theorem 2.1 and thus partially answer this question.
I plan to come back to this in a future post, and would be glad to hear from any readers who have ideas on answers to these questions.
Beyond Continuity: A Preview of Pathology
The above discussion shows that continuity acts as a rigid cage, forcing period modules in the non-constant case to be nowhere dense and remain of rank 1 over \(\mathbb{Z}\), while also preventing sums of incommensurable functions from being periodic. But what happens when we remove this cage?
With what we have established so far, a clear structural dichotomy emerges: any periodic functions with dense or higher-rank period modules and any pair of incommensurable functions whose sum manages to remain periodic must be highly pathological — namely, their sets of continuity points are nowhere dense, most (perhaps all?) such functions are actually nowhere continuous, and many are even nowhere bounded.
In the next installment of Pathological Periodicity, we will dive directly into the abyss of these pathological functions. We will construct and dissect a variety of examples, including some highly unintuitive functions “constructed” using the Axiom of Choice. Stay tuned!
Appendix (added 04/04/26): The Baire Category Theorem and the Size of Sets of Continuity Points
Originally, I had formulated the “open” questions mostly in terms of density (can \(\mathcal C(f)\) be dense, or somewhere dense, while \(\Delta_q f\) is nowhere continuous for all or at least some \(q\not\in P_f\)?). Once again displaying my rustiness, a bit more searching revealed that none of these sets of continuity points can be dense, by the Baire Category Theorem. And in fact, under the conditions most relevant to an attempt to strengthen Theorem 2.1, they must be nowhere dense. That is, we can prove the following:
Theorem 2.2 Let \(f\) be a periodic function such that \(\mathcal C(f)\) is somewhere dense, and let \(g\) be any other periodic function. Then \(f+g\) is periodic if and only if \(f, g\) are commensurable.
The Baire Category Theorem states that in a complete metric space (like \(\mathbb{R}\)), the intersection of countably many dense open sets is dense. The crucial fact I had long forgotten is that \(\mathcal C(f)\) is always a \(G_\delta\) set — an intersection of countably many open sets. This means that for a function \(f\) with dense \(\mathcal C(f)\), the set \(q+\mathcal C(f)\) is also a dense \(G_\delta\) for any \(q\in\mathbb R\), and thus by Baire, the intersection \(\mathcal C(f)\cap (q+\mathcal C(f))\) must also be dense. But this intersection is contained in \(\mathcal C(\Delta_q f)\) (since \(\Delta_q f(x) = f(x+q)-f(x)\) is continuous at any point where both \(f(x)\) and \(f(x+q)\) are continuous). Thus, if \(\mathcal C(f)\) is dense, then \(\mathcal C(\Delta_q f)\) must be dense as well for any and all \(q\in \mathbb{R}\), and thus \(\Delta_q f\) cannot be nowhere continuous. This shows that the conditions of Exercise 2 above cannot be met when \(\mathcal C(f)\) is dense.
Combining this with Exercise 1, we get that if \(f, g\) are incommensurable periodic functions such that \(\mathcal C(f)\) is dense, then \(f+g\) cannot be periodic. But Theorem 2.2 states that this is true not just for dense \(\mathcal C(f)\) but for somewhere dense \(\mathcal C(f)\) (i.e., dense relative to at least one open interval), which is a strictly weaker condition. Extending to this weaker condition is not very difficult but it is also not entirely automatic: unlike the case for “absolute” density, if \(\mathcal{C}(f)\) is only somewhere dense, then there can exist many \(q\) such that \(\Delta_q f\) is nowhere continuous. In other words, when we relax the conditions of Exercise 2 to only require some (rather than all) \(q\notin P_f\) to have \(\Delta_q f\) nowhere continuous, we can find examples whose points of continuity are in fact equal to a union of open intervals:
Example 2.1 Define \(f\) on \((-1, 1]\) by \(f(x) = x\cdot\mathbf{1}_{\mathbb{Q}}(x)\) on \((-1, -1/4]\cup[1/4, 1]\) and \(f(x) = 0\) on \((-1/4, 1/4)\), then extend to all of \(\mathbb{R}\) with period \(p = 2\). Then \(f\) is strictly periodic, and \(\mathcal{C}(f) = (-1/4, 1/4) + 2\mathbb{Z}\), which is a union of open intervals and is therefore somewhere dense. For any \(q\) with \(1/2 < |q| < 3/2\), the translate \(q + \mathcal{C}(f)\) is disjoint from \(\mathcal{C}(f)\), and one can verify that \(\Delta_q f\) is nowhere continuous.
To extend the density argument to the somewhere dense case, the key is to note that if \(f\) is periodic and \(\mathcal{C}(f)\) is dense in some interval \((a,b)\), then for any \(q\) there exists some \(n \in \mathbb{Z}\) such that \(\mathcal{C}(f)\) and \(nq + \mathcal{C}(f)\) overlap in a nonempty interval — even though they may be disjoint for other values of \(n\), as the example above shows. This is because if \(\mathcal{C}(f)\) is dense in \((a,b)\) and \(f\) is periodic, then \(\mathcal{C}(f)\) is dense in all of \((a,b) + P_f\). If \(q\) is a rational multiple of a period, then there is some \(nq \in P_f\), and thus \(nq + \mathcal{C}(f)\) is dense in \((a,b) + P_f\) as well, so the two sets must overlap. If \(q\) is an irrational multiple of a period, then \(P_f \oplus q\mathbb{Z}\) is itself dense, and thus we can find \(nq\) arbitrarily close to any element of \(P_f\), forcing \(nq + (a,b)\) to overlap with \((a,b) + P_f\); call the interval where they overlap \(I\). In either case, we can find some \(n\) such that \(\mathcal{C}(f)\) and \(nq + \mathcal{C}(f)\) are both dense \(G_\delta\) sets in the interval \(I\), and thus by Baire, \(\mathcal{C}(\Delta_{nq} f)\) is dense in \(I\), preventing \(\Delta_{nq} f\) from being nowhere continuous. Theorem 2.2 then follows immediately from this somewhere dense condition and the following theorem, which itself follows from Exercise 1:
Theorem 2.3 Suppose \(f\) is a periodic function that is bounded in at least one interval, and let \(g\) be any other periodic function such that \(\mathcal C(\Delta_q f) \neq \emptyset\) for at least one \(q\in P_g\). Then \(f+g\) is periodic if and only if \(f, g\) are commensurable.
Proof. The proof follows the same structure as that of Theorem 2.1. If \(f, g\) are incommensurable and \(f+g\) is periodic, then for any nonzero \(q\in P_g\), the function \(\Delta_q f\) is nonzero and has a dense period module (because in this case its period module is given by Equation 2.2) and is thus either nowhere continuous or a nonzero constant. Under our hypothesis, there is one such \(q \in P_g\) such that \(\Delta_q f\) has points of continuity, and must therefore be a nonzero constant. But Exercise 1 shows \(f\) is nowhere bounded, a contradiction. Thus \(f, g\) cannot be incommensurable under our hypotheses.
Whether we can strengthen these theorems any further remains “open,” to me at least. Although, as we will see in the next post, there do exist bounded incommensurable periodic functions whose sums are periodic, which significantly limits how much more we can strengthen Theorem 2.3.