Let

${\mathrm{C}}_{T}^{0}(\mathbb{R},\mathbb{E})$ be the set of continuous

*T*-periodic functions,

$Per(\mathbb{R},\mathbb{E}):=\bigcup _{T>0}{\mathrm{C}}_{T}^{0}(\mathbb{R},\mathbb{E})$

be the set of periodic functions and ${BC}^{0}(\mathbb{R},\mathbb{E})$ be the set of continuous bounded functions. The last one is a Banach space with the uniform norm (written ${\parallel \cdot \parallel}_{\mathrm{\infty}}$).

**Definition 2** A continuous function

$f\in {\mathrm{C}}^{0}(\mathbb{R},\mathbb{E})$ is said to be

*semi-periodic* (s.p.) if

$\mathrm{\forall}\epsilon >0,\mathrm{\exists}T>0,\mathrm{\forall}n\in \mathbb{Z},\mathrm{\forall}t\in \mathbb{R},\phantom{\rule{1em}{0ex}}{|f(t+nT)-f(t)|}_{\mathbb{E}}\le \epsilon .$

Such a *T* will be called an *ε-semi-period* of *f*.

Let $\mathcal{S}(\mathbb{R},\mathbb{E})$ denote the set of semi-periodic functions.

It is easy to see from the definition that every continuous periodic function is semi-periodic. Moreover, if *f* is semi-periodic, then *f* is uniformly (Bohr) almost-periodic (*i.e.*, $f\in {AP}^{0}(\mathbb{R},\mathbb{E})$), and so it is bounded. Thus, we can rewrite Definition 2 as follows.

**Definition 3** A (bounded) continuous function

$f\in {\mathrm{C}}^{0}(\mathbb{R},\mathbb{E})$ is said to be

*semi-periodic* (s.p.) if

$\mathrm{\forall}\epsilon >0,\mathrm{\exists}T>0,\mathrm{\forall}n\in \mathbb{Z},\phantom{\rule{1em}{0ex}}{\parallel f(\cdot +nT)-f(\cdot )\parallel}_{\mathrm{\infty}}\le \epsilon .$

We have

$Per(\mathbb{R},\mathbb{E})\subset \mathcal{S}(\mathbb{R},\mathbb{E})\subset {AP}^{0}(\mathbb{R},\mathbb{E})\subset {BC}^{0}(\mathbb{R},\mathbb{E}).$

From this, we can consider

$\mathcal{S}(\mathbb{R},\mathbb{E})$ as a metric space, when using

$d(f,g):=\underset{t\in \mathbb{R}}{sup}{|f(t)-g(t)|}_{\mathbb{E}}.$

As we will see later, $\mathcal{S}(\mathbb{R},\mathbb{E})$ is not a linear space, but $\mathcal{S}(\mathbb{R},\mathbb{E})$ is a complete metric space.

**Lemma 1** *Let* $f\in \mathcal{S}(\mathbb{R},\mathbb{E})$,

$\epsilon >0$ *and* ${T}_{\epsilon}$ *be an* *ε*-

*semi*-

*period of* *f*.

*Then there exists a continuous* ${T}_{\epsilon}$-

*periodic function* *φ* *s*.

*t*.

${\parallel f-\phi \parallel}_{\mathrm{\infty}}\le \epsilon .$

*Proof* Consider a

${T}_{\epsilon}$-periodic function

*ψ* such that its restriction to

$[0;{T}_{\epsilon})$ is the same as the one of

*f*. For each

$x\in \mathbb{R}$, we can write

$x=t+n{T}_{\epsilon}$ with

$n\in \mathbb{Z}$ and

$t\in [0;{T}_{\epsilon})$. Thus, we get

$\begin{array}{rcl}{|f(x)-\psi (x)|}_{\mathbb{E}}& =& {|f(t+n{T}_{\epsilon})-\psi (t+n{T}_{\epsilon})|}_{\mathbb{E}}\\ =& {|f(t+n{T}_{\epsilon})-\psi (t)|}_{\mathbb{E}}={|f(t+n{T}_{\epsilon})-f(t)|}_{\mathbb{E}}\le \epsilon .\end{array}$

Since

*ψ* is not necessarily continuous, consider still

$\tau \in (0;{T}_{\epsilon})$ such that, for any

$t\in [{T}_{\epsilon}-\tau ,{T}_{\epsilon}]$,

${|f(t)-f({T}_{\epsilon})|}_{\mathbb{E}}\le \epsilon $. Define a

${T}_{\epsilon}$-periodic continuous function

*φ* which is equal to

*ψ* on

$[0,{T}_{\epsilon}-\tau ]$ and which is linear on

$[{T}_{\epsilon}-\tau ,{T}_{\epsilon}]$. For

$t\in [{T}_{\epsilon}-\tau ,{T}_{\epsilon}]$, we obtain

$\begin{array}{rcl}{|f(t)-\phi (t)|}_{\mathbb{E}}& \le & \frac{{T}_{\epsilon}-t}{\tau}{|f({T}_{\epsilon}-\tau )-f(t)|}_{\mathbb{E}}\\ +\frac{t-({T}_{\epsilon}-\tau )}{\tau}{|f({T}_{\epsilon})-f(t)|}_{\mathbb{E}}\le 2\epsilon ,\end{array}$

and subsequently

$\underset{x\in \mathbb{R}}{sup}{|\phi (x)-f(x)|}_{\mathbb{E}}\le 2\epsilon .$

□

**Remark 1** For $\mathbb{E}=\mathbb{R}$, unlike for semi-periodic functions in the sense of Definition 2 or Definition 3, in fact the same lemma was already proved in [[3], pp.114-115], but for limit periodic functions. As already pointed out in the foregoing section, these classes will be shown to coincide by Theorem 1 below, whose proof is just based on Lemma 1.

We are ready to give the first theorem.

**Theorem 1** $\mathcal{S}(\mathbb{R},\mathbb{E})$ *is the closure of* $Per(\mathbb{R},\mathbb{E})$ *in the sup*-*norm*.

*Proof* Assume firstly that *f* is s.p. Taking in Lemma 1 ${\epsilon}_{n}=1/n$, we obtain a sequence of periodic functions ${({\phi}_{n})}_{n}$ s.t. ${\parallel f-{\phi}_{n}\parallel}_{\mathrm{\infty}}\le {\epsilon}_{n}\to 0$.

Reversely, assume that

*f* is in the closure of the set of continuous

*T*-periodic functions. Then, for any

$\epsilon >0$, we can find a periodic

*φ* s.t.

${|f(t)-\phi (t)|}_{\mathbb{E}}\le \epsilon $. Let

*T* be its period. Then, for any

$t\in \mathbb{R}$,

□

**Remark 2** In view of Theorem 1, one can now also define a semi-periodic function, equivalently w.r.t. Definition 2 and Definition 3, as the uniform limit of a uniformly convergent sequence of continuous purely periodic functions. This was so done, *e.g.*, in [2, 3, 5, 6, 14].

In the following proposition, we look for the link between s.p. sequences and functions. Given a sequence

$\underline{x}={({x}_{t})}_{t\in \mathbb{Z}}$, we set

${f}_{\underline{x}}:\mathbb{R}\to \mathbb{E}$, the function s.t. its restriction to ℤ is

$\underline{x}$ and which is linear on each

$[k,k+1]$,

$k\in \mathbb{Z}$,

*i.e.*,

$\mathrm{\forall}t\in \mathbb{Z},\phantom{\rule{1em}{0ex}}{f}_{\underline{x}}(u):=\{u\}{x}_{t+1}+(1-\{u\}){x}_{t},$

where $\{u\}$ is the fractional part of *u*, *i.e.*, $\{u\}\in [0,1)$ and $u-\{u\}\in \mathbb{Z}$.

**Proposition 1** *Let* $\underline{x}\in {\mathbb{E}}^{\mathbb{Z}}$.

*All the following statements are equivalent*:

- 1.
${f}_{\underline{x}}$ *is s*.*p*. *with a semi*-*period in* ℕ,

- 2.
*there exists a s*.*p*. *function with a semi*-*period in* ℕ *whose restriction to* ℤ *is* $\underline{x}$,

- 3.

*Proof* For (1) ⇒ (2), take

${f}_{\underline{x}}$ in (2). For (2) ⇒ (3), take

*T* as an

*ε*-semi-period for the function

*f* in (2). Then we have

$\begin{array}{rcl}\mathrm{\forall}t\in \mathbb{Z},\phantom{\rule{1em}{0ex}}|{x}_{t+T}-{x}_{t}{|}_{E}& =& |f(t+T)-f(t){|}_{E}\\ \le & {\parallel f(\cdot +T)-f\parallel}_{\mathrm{\infty}}\le \epsilon .\end{array}$

For (3) ⇒ (1), given

*T* as an

*ε*-semi-period of

$\underline{x}$, we have for all

$t\in \mathbb{Z}$ □

Let us now consider the Fourier expansion of a semi-periodic function. Recall that every a.p. function has the Fourier-Bohr expansion,

$f(t)\sim \sum _{j=1}^{\mathrm{\infty}}{a}_{{\lambda}_{j}}(f){e}^{\mathrm{i}{\lambda}_{j}t},$

where

${a}_{\lambda}(f):=\mathcal{M}\{f(t){e}^{-\mathrm{i}\lambda t}\},$

and

$\mathcal{M}\{g\}:=\underset{l\to \mathrm{\infty}}{lim}{(2l)}^{-1}{\int}_{-l}^{l}g(t)\phantom{\rule{0.2em}{0ex}}dt$

is the mean operator (see, *e.g.*, [3, 4, 11]). It follows from the above formula that $f\mapsto {a}_{\lambda}(f)$ is 1-Lipschizian (and so it is continuous) from ${AP}^{0}(\mathbb{R},\mathbb{E})$ to $\mathbb{E}$.

Set $\mathrm{\Lambda}(f):=\{\lambda ,{a}_{\lambda}(f)\ne 0\}$ and denote by $Mod(f)$ the ℤ-modulus generated by $\mathrm{\Lambda}(f)$. Recall that an a.p. function is *quasi-periodic* (q.p.) if $Mod(f)$ has a finite ℤ-basis, and that *T* is a period of *f* if and only if $\mathrm{\Lambda}(f)\subset \frac{2\pi}{T}\mathbb{Z}$ (see, *e.g.*, [4, 17]).

**Proposition 2** (for $\mathbb{E}=\mathbb{R}$, *cf.* [[2], p.32])

*Set*
$\mathbb{Q}:=\{{r}_{n},n\in \mathbb{N}\}$
*and consider*
$f(t):=\sum _{\lambda \in \theta \mathbb{Q}}{a}_{\lambda}(f){e}^{\mathrm{i}\lambda t},$

*for a fixed* $\theta >0$,

*where* $\sum _{\lambda \in \theta \mathbb{Q}}{|{a}_{\lambda}(f)|}_{\mathbb{E}}<+\mathrm{\infty}.$

*Then* *f* *is s*.*p*.

*Proof* Consider

${f}_{N}(t)=\sum _{n=1}^{N}{a}_{{r}_{n}\theta}(f){e}^{\mathrm{i}{r}_{n}\theta t}.$

Clearly, if

${r}_{n}=\frac{{p}_{n}}{{q}_{n}}$, then

$\frac{2\pi {q}_{n}}{{p}_{n}\theta}$ is a period of the

*n* th term. The same is obviously true for

$\frac{2\pi {q}_{n}}{\theta}$. Thus,

$\frac{2\pi {q}_{1}\cdots {q}_{N}}{\theta}$ is a period of

${f}_{N}$ which is so periodic. Moreover,

${\parallel f-{f}_{N}\parallel}_{\mathrm{\infty}}\le \sum _{n\ge N+1}{|{a}_{{r}_{n}\theta}(f)|}_{E}\to 0,$

which already proves that *f* is s.p. □

The following result is also, at least for $\mathbb{E}=\mathbb{R}$, well known (see, *e.g.*, [14], [[3], pp.118-119], and the references therein).

**Lemma 2** *If* $f\in \mathcal{S}(\mathbb{R},\mathbb{E})$,

*then there exists* $\theta >0$ *s*.

*t*.

$\mathrm{\Lambda}(f)\subset \theta \mathbb{Q}.$

*Proof* Let us consider *λ* and *μ* s.t. ${a}_{\lambda}(f)\ne 0$ and ${a}_{\mu}(f)\ne 0$ and a sequence of periodic functions ${({f}_{n})}_{n}$ s.t. ${f}_{n}\to f$, uniformly. It follows from the continuity that, for sufficiently large *N*, ${a}_{\lambda}({f}_{N})\ne 0$ and ${a}_{\mu}({f}_{N})\ne 0$, but since ${f}_{N}$ is periodic, it follows that $\lambda /\mu \in \mathbb{Q}$. □

**Remark 3**
- 1.
This proof also demonstrates that, for a sufficiently large *n*, the period ${T}_{n}$ of ${f}_{n}$ satisfies ${T}_{n}\theta \in 2\pi \mathbb{Q}$.

- 2.
It indicates that $\mathcal{S}(\mathbb{R},\mathbb{E})$ is not a linear space. For instance, a simple q.p. function $t\mapsto cos(t)+cos(t\sqrt{2})$ is not s.p. although it is a sum of two s.p. functions. On the other hand, the sum of two a.p. functions is trivially a.p.

**Example 1** On the basis of Proposition 2 and Lemma 2, we can easily give the following example of a purely s.p. (

*i.e.*, not periodic) function:

$f(t)=\sum _{n\ge 1}\frac{{e}^{\mathrm{i}t/n}}{{n}^{2}}.$

Moreover, one can readily check that the function

*f* can be obtained as a uniform limit of the sequence

${({f}_{N})}_{N}$, where

${f}_{N}$ is a continuous

$2\pi N!$-periodic function,

${f}_{N}(t)=\sum _{n=1}^{N}\frac{{e}^{\mathrm{i}t/n}}{{n}^{2}}.$

**Theorem 2** *Every s*.

*p*.

*function which is also q*.

*p*.

*is in fact periodic*:

$\mathcal{S}(\mathbb{R},\mathbb{E})\cap {QP}^{0}(\mathbb{R},\mathbb{E})=Per(\mathbb{R},\mathbb{E}).$

*Proof* Let

$f\in \mathcal{S}(\mathbb{R},\mathbb{E})\cap {QP}^{0}(\mathbb{R},\mathbb{E})$. Since

*f* is q.p., we can find

${\omega}_{1},\dots ,{\omega}_{m}$ such that

$\mathrm{\Lambda}(f)\subset \mathbb{Z}{\omega}_{1}+\cdots +\mathbb{Z}{\omega}_{m}.$

Set

${G}_{1}:=\mathbb{Z}{\omega}_{1}+\cdots +\mathbb{Z}{\omega}_{m}$.

${G}_{1}$ is an additive subgroup of ℝ. Since

$f\in \mathcal{S}(\mathbb{R},\mathbb{E})$, we can find

$\theta >0$ s.t.

$\mathrm{\Lambda}(f)\subset \theta \mathbb{Q}$. Set

${G}_{2}:=\theta \mathbb{Q}$.

${G}_{2}$ is another additive subgroup of ℝ, so

$G={G}_{1}\cap {G}_{2}$ is a subgroup of

${G}_{1}$ which contains

$\mathrm{\Lambda}(f)$. Since

*G* is a subgroup of

${G}_{1}$, there exist

$p\in \{1,\dots ,m\}$ and positive ℤ-independent real numbers

${\zeta}_{1},\dots ,{\zeta}_{p}$ s.t.

$G=\mathbb{Z}{\zeta}_{1}+\cdots +\mathbb{Z}{\zeta}_{p}.$

Let us show that $p=1$. Once we have it, we can conclude that $\mathrm{\Lambda}(f)\subset {\zeta}_{1}\mathbb{Z}$ which proves that $\frac{2\pi}{{\zeta}_{1}}$ is a period of *f*. Since, for each *i*, ${\zeta}_{i}\in G\subset {G}_{2}$, we know that, for each *i*, we can find ${q}_{i}\in \mathbb{Q}$ s.t. ${\zeta}_{i}={q}_{i}\theta $. This proves that ${\zeta}_{i}/{\zeta}_{j}\in \mathbb{Q}$, for $i\ne j$, which is impossible. □

**Remark 4** In view of Proposition 1 and its analogy for q.p. sequences mentioned in the foregoing section, a discrete (*i.e.*, restricted to ℤ) analogy of Theorem 2 holds for sequences.

**Example 2** As an example of a function which is almost-periodic (a.p.) but neither quasi-periodic nor a sum of semi-periodic functions, consider

$f(t)=\sum _{n\ge 1}\frac{{e}^{\mathrm{i}{\sigma}_{n}t}}{{n}^{2}},$

where the

${\sigma}_{k}$’s are constructed by induction, say for all

*k*,

${\sigma}_{k+1}\notin {\sigma}_{1}\mathbb{Q}+\cdots +{\sigma}_{k}\mathbb{Q}.$

We will prove that we cannot find a finite set of numbers

${\theta}_{1},\dots ,{\theta}_{q}$ s.t.

$\mathrm{\Lambda}(f)\subset {\theta}_{1}\mathbb{Q}+\cdots +{\theta}_{q}\mathbb{Q}.$

Firstly, assume this has already been proved. Then if

*f* is a sum of semi-periodic functions

${f}_{j}$, say

$f={\sum}_{j=1}^{q}{f}_{j}$, we could find, according to Lemma 2, for each

*j* a

${\theta}_{j}$ s.t.

$\mathrm{\Lambda}({f}_{j})\subset {\theta}_{j}\mathbb{Q}$. This implies that

$\mathrm{\Lambda}(f)\subset \mathrm{\Lambda}({f}_{1})\cup \cdots \cup \mathrm{\Lambda}({f}_{q})\subset ({\theta}_{1}\mathbb{Q})+\cdots +({\theta}_{q}\mathbb{Q}),$

which is not true. If

*f* were quasi-periodic, we could find

${\theta}_{1},\dots ,{\theta}_{q}$ s.t.

$\mathrm{\Lambda}(f)\subset {\theta}_{1}\mathbb{Z}+\cdots +{\theta}_{q}\mathbb{Z}\subset {\theta}_{1}\mathbb{Q}+\cdots +{\theta}_{q}\mathbb{Q},$

which is again wrong. Now, we can make the first part of the proof. So, let us assume

$\mathrm{\Lambda}(f)\subset {\theta}_{1}\mathbb{Q}+\cdots +{\theta}_{q}\mathbb{Q}.$

We have

$\mathrm{\Lambda}(f)=\{{\sigma}_{i},i\ge 1\}$. Thus, for any

$i\ge 1$, we can find

$({a}_{i1},\dots ,{a}_{iq})\in {\mathbb{Q}}^{q}\setminus \{0\}$ s.t.

${\sigma}_{i}=\sum _{j=1}^{q}{a}_{ij}{\theta}_{j}.$

Let us now consider the square matrix

$A={({a}_{ij})}_{1\le i,j\le q}.$

If it is invertible, we can express ${\theta}_{1},\dots ,{\theta}_{q}$ linearly (with rational coefficients) depending on ${\sigma}_{1},\dots ,{\sigma}_{q}$. This proves that ${\sigma}_{q+1}$ should be a (rational) linear combination of ${\sigma}_{1},\dots ,{\sigma}_{q}$, which is not true.

Assuming that the matrix is singular, its rows are linearly dependent. So, we can find $({\mu}_{1},\dots ,{\mu}_{q})\in {\mathbb{Q}}^{q}\setminus \{0\}$ s.t. ${\sum}_{i}{\mu}_{i}{a}_{ij}=0$, for each *j*. Multiplying it by ${\theta}_{j}$ and then summing over *j*, we obtain ${\sum}_{i}{\mu}_{i}{\sigma}_{i}=0$ which is not possible.

**Example 3** As an example of a function which is quasi-periodic (q.p.) but not a sum of periodic functions, consider

$f(t)=\sum _{n\ge 1}\frac{{e}^{\mathrm{i}t(1+n\sqrt{2})}}{{n}^{2}}.$

Here

$\mathrm{\Lambda}(f)=\{1+n\sqrt{2},n\in \mathbb{N}\}$, thus

$Mod(f)=\mathbb{Z}+\sqrt{2}\mathbb{Z}$,

*i.e.*,

*f* is q.p. Assume that

*f* is a sum of a finite number of periodic functions. Let

${T}_{1},\dots ,{T}_{k}$ be the periods. According to [

21], we have

$\mathrm{\Delta}({T}_{1},\dots ,{T}_{k})f=0,$

An easy calculation yields

${a}_{\lambda}(\mathrm{\Delta}({T}_{1},\dots ,{T}_{k})f)={a}_{\lambda}(f)\prod _{j=1}^{k}({e}^{\mathrm{i}\lambda {T}_{j}}-1),$

by which

$\mathrm{\forall}n\in \mathbb{N},\mathrm{\exists}j\in \{1,\dots ,k\},\phantom{\rule{1em}{0ex}}(1+n\sqrt{2}){T}_{j}\in 2\pi \mathbb{Z}.$

Since ℕ is infinite, we can find two different integers

*m*,

*n* with the same

${T}_{j}$. Thus, there exist two integers

${k}_{m}$,

${k}_{n}$ s.t.

$\frac{1+n\sqrt{2}}{{k}_{n}}=\frac{2\pi}{{T}_{j}}=\frac{1+m\sqrt{2}}{{k}_{m}}.$

This implies that

${k}_{m}\ne {k}_{n}$, and we obtain

$({k}_{m}-{k}_{n})=(m{k}_{n}-n{k}_{m})\sqrt{2},$

which is not possible.

**Remark 5** We know (see,

*e.g.*, [

4,

11]) that every almost-periodic (a.p.)

*f* is a uniform limit of a sequence of a finite sum of periodic functions

${({f}_{n})}_{n}$. Writing

$f={f}_{0}+\sum _{n}({f}_{n+1}-{f}_{n}),$

we can see that every a.p. function can be expressed as a series of periodic functions. Reversely, a uniformly convergent series of periodic functions is a.p.

Summing up the above observations, we can present in Figure 2 Venn’s diagram for continuous functions under our investigation. The classes of almost-periodic, semi-periodic and quasi-periodic functions are in circles, while sums of semi-periodic functions are in the ellipse. Sums of periodic functions are in the intersection of the classes of quasi-periodic functions and sums of semi-periodic functions. In fact, one can check by similar arguments as in the proof of Theorem 2 that a sum of periodic functions is exactly the sum of semi-periodic functions which is quasi-periodic. Periodic functions are, according to Theorem 2, at the same time semi-periodic and quasi-periodic. Purely semi-periodic functions are in the grey strip.

Now, consider the primitives of s.p. functions.

**Lemma 3** *Assume that* *f* *is a*.

*p*.

*and consider* $F(t):={\int}_{0}^{t}f(s)\phantom{\rule{0.2em}{0ex}}ds$.

*Assume that there exists* $\phi \in {AP}^{0}(\mathbb{R},\mathbb{E})$ *and* $a\in \mathbb{E}$ *s*.

*t*.,

$\mathrm{\forall}t\in \mathbb{R},\phantom{\rule{1em}{0ex}}F(t)=\phi (t)+at.$

*Then* $a=\mathcal{M}\{f\}$.

Indeed,

*φ* is necessarily differentiable, and integrating the equality

$f={\phi}^{\prime}+a$, we obtain

$a=\frac{1}{2l}{\int}_{-l}^{l}f(s)\phantom{\rule{0.2em}{0ex}}ds+\mathcal{O}\left(\frac{1}{l}\right),$

because *φ* is bounded. This already proves Lemma 3. It is well known that $\mathcal{M}\{f\}=0$ is a necessary and sufficient condition for *F* to be periodic, provided *f* is so. It is, however, not sufficient in the case of a.p. functions. For more details, see, *e.g.*, [22]. Despite the approximation by periodic functions, it is also not sufficient in the case of s.p. functions, as demonstrated by the following example.

**Example 4** Let us consider the s.p. function

$f(t)=\sum _{n\ge 1}\frac{cos(t/{n}^{2})}{{n}^{2}}.$

We have a normal convergence, so the series exists and defines a s.p. function for which

$\mathcal{M}\{f\}=0$. A formal candidate to be its primitive is

$F(t)=\sum _{n\ge 1}sin(t/{n}^{2}).$

We have a uniform convergence on each compact set, because $|sin(u)|\le |u|$. Thus, this series also exists and defines a primitive of *f*. If *F* were s.p., it should be a.p. which is obviously not true, because the Parseval equality does not apply.