1 Introduction and terminology

In the non-Archimedean setting, at least two notions of differentiability have been defined: classical and strict derivative. Classical derivative has some unpleasant and strange behaviors, but it has been long known that the strict differentiability in the sense of Bourbaki is the hypothesis most useful to geometric applications, such as inverse theorem. Let us recall definitions.

Let \({\mathbb {K}}\) be a valued field containing \(\mathbb {Q}_p\) such that \({\mathbb {K}}\) is complete (as a metric space), and X be a nonempty subset of \({\mathbb {K}}\) without isolated points. Let \(f:X \rightarrow {\mathbb {K}}\) and r be a natural number. Set

$$\begin{aligned} \nabla ^{r} X:={\left\{ \begin{array}{ll} X &{} \text {if } r=1,\\ \left\{ \left( x_1, x_2,\ldots , x_r\right) \in X^r :x_i\ne x_j \text { if } i\ne j \right\} &{} \text {if } r\ge 2. \end{array}\right. } \end{aligned}$$

The r-th difference quotient \(\Phi _rf: \nabla ^{r+1} X \rightarrow {\mathbb {K}}\) of f, with \(r\ge 0\), is recursively given by \(\Phi _0f=f\) and, for \(r\ge 1\), \((x_1, x_2,\ldots , x_{r+1})\in \nabla ^{r+1} X\) by

$$\begin{aligned} \Phi _r f(x_1, x_2,\ldots , x_{r+1})=\frac{\Phi _{r-1}f(x_1, x_3,\ldots , x_{r+1})-\Phi _{r-1}f(x_2, x_3,\ldots , x_{r+1})}{x_1-x_2}. \end{aligned}$$

Then a function \(f:X \rightarrow {\mathbb {K}}\) at a point \(a\in X\) is said to be:

  • differentiable if \(\lim _{x\rightarrow a}f(x)-f(a)/(x-a)\) exists \((f(x)-f(a))\);

  • strictly differentiable of order r if \(\Phi _r f\) can be extended to a continuous function \(\overline{\Phi }_r f: X^{r+1} \rightarrow {\mathbb {K}}\). We then set \(D_rf(a)=\overline{\Phi }_r f(a, a,\ldots , a)\).

Our aim in this work is to study these notions through a recently coined approach–the lineability theory. Searching for large algebraic structures in the sets of objects with a special property, we, in this approach, can get deeper understanding of the behavior of the objects under discussion. In [33, 34] authors studied lineability notions in the p-adic analysis; see also [23, 24, 35]. The study of lineability can be traced back to Levine and Milman [36] in 1940, and Gurariy [29] in 1966. These works, among others, motivated the introduction of the notion of lineability in 2005 [3] (notion coined by Gurariy). Since then it has been a rapidly developing trend in mathematical analysis. There are extensive works on the classical lineability theory, see e.g. [2,3,4,5, 10, 14, 17], whereas some recent topics can be found in [1, 12, 13, 16, 18, 20,21,22, 39, 40]. It is interesting to note that Mahler in [38] stated that:

“On the other hand, the behavior of continuous functions of a p-adic variable is quite distinct from that of real continuous functions, and many basic theorems of real analysis have no p-adic analogues.

\(\ldots \) there exist infinitely many linearly independent non-constant functions the derivative of which vanishes identically \(\ldots \)”.

Before further going, let us recall three essential notions. Let \(\kappa \) be a cardinal number. We say that a subset A of a vector space V over a field \(\mathbb {K}\) is

  • \(\kappa \)-lineable in V if there exists a vector space M of dimension \(\kappa \) and \( M\setminus \{0\} \subseteq A\);

and following [4, 9], if V is contained in a (not necessarily unital) linear algebra, then A is called

  • \(\kappa \)-algebrable in V if there exists an algebra M such that \( M\setminus \{0\} \subseteq A\) and M is a \(\kappa \)-dimensional vector space;

  • strongly \(\kappa \)-algebrable in V if there exists a \(\kappa \)-generated free algebra M such that \(M\setminus \{0\}\subseteq A\).

Note that if V is also contained in a commutative algebra, then a set \(B\subset V\) is a generating set of a free algebra contained in A if and only if for any \(n\in {\mathbb {N}}\) with \(n\le \text {card}(B)\) (where \(\text {card}(B)\) denotes the cardinality of B), any nonzero polynomial P in n variables with coefficients in \({\mathbb {K}}\) and without free term, and any distinct \(b_1,\ldots ,b_n\in B\), we have \(P(b_1,\ldots ,b_n)\ne 0\).

Now we can give an outline of our work. In Sect. 2 we recall some standard concepts and notations concerning non-Archimedean analysis. Then, in the section of Main results, we show, among other things, that: (i) the set of functions \(\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) with continuous derivative that are not strictly differentiable is \(\mathfrak {c}\)-lineable (\(\mathfrak {c}\) denotes the cardinality of the continuum), (ii) the set of strictly differentiable functions \(\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) of order r but not strictly differentiable of order \(r+1\) is \(\mathfrak c\)-lineable, (iii) the set of all strictly differentiable functions \(\mathbb {Z}_p\rightarrow {\mathbb {K}}\) with zero derivative that are not Lipschitzian of any order \(\alpha >1\) is \(\mathfrak {c}\)-lineable and 1-algebrable, (iv) the set of differentiable functions \(\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) which derivative is unbounded is strongly \(\mathfrak {c}\)-algebrable, (v) the set of continuous functions \(\mathbb {Z}_p\rightarrow \mathbb {Q}_p\) that are differentiable with bounded derivative on a full set for any positive real-valued Haar measure on \(\mathbb {Z}_p\) but not differentiable on its complement having cardinality \(\mathfrak {c}\) is \({\mathfrak c}\)-lineable.

2 Preliminaries for p-adic analysis

We summarize some basic definitions of p-adic analysis (for a more profound treatment of this topic we refer the interested reader to [28, 32, 42, 44]).

We shall use standard set-theoretical notation. As usual, \(\mathbb {N}, \mathbb {N}_0, {\mathbb {Z}}, {\mathbb {Q}}\), \({\mathbb {R}}\) and \({\mathbb {P}}\) denote the sets of all natural, natural numbers including zero, integer, rational, real, and prime numbers, respectively. The restriction of a function f to a set A and the characteristic function of a set A will be denoted by \(f\restriction A\) and \(1_A\), respectively.

Frequently, we use a theorem due to Fichtenholz–Kantorovich–Hausdorff [25, 30]: For any set X of infinite cardinality there exists a family \(\mathcal {B}\subseteq \mathcal {P}(X)\) of cardinality \(2^{\text {card}(X)}\) such that for any finite sequences \(B_1,\ldots , B_n\in \mathcal {B}\) and \(\varepsilon _1, \ldots , \varepsilon _n \in \{0,1\}\) we have \(B_1^{\varepsilon _1}\cap \ldots \cap B_n^{\varepsilon _n}\ne \emptyset \), where \(B^1=B\) and \(B^0=X\setminus B\). A family of subsets of X that satisfy the latter condition is called a family of independent subsets of X. Here \(\mathcal {P}(X)\) denotes the power set of X. In what follows we fix \(\mathcal {N}\), \({\mathcal {N}}_0\) and \(\mathcal P\) for families of independent subsets of \(\mathbb {N}\), \({\mathbb {N}}_0\) and \({\mathbb {P}}\), respectively, such that \(\text {card}({\mathcal {N}})=\text {card}({\mathcal {N}}_0)=\text {card}(\mathcal P)=\mathfrak c\).

Now let us recall that given a field \({\mathbb {K}}\), an absolute value on \({\mathbb {K}}\) is a function

$$\begin{aligned} |\cdot |:{\mathbb {K}}\rightarrow [0,+\infty ) \end{aligned}$$

such that:

  • \(|x|=0\) if and only if \(x=0\),

  • \(|x y|=|x||y|\), and

  • \(|x+y|\le |x|+|y|\),

for all \(x,y\in \mathbb {K}\). The last condition is the so-called triangle inequality. Furthermore, if \(({\mathbb {K}},|\cdot |)\) satisfies the condition \(|x+y|\le \max \{|x|, |y|\}\) (the strong triangle inequality), then \(({\mathbb {K}},|\cdot |)\) is called a non-Archimedean field. Note that \(({\mathbb {K}},|\cdot |)\) is a normed space since \({\mathbb {K}}\) is a vector space in itself. For simplicity, we will denote for the rest of the paper \(({\mathbb {K}},|\cdot |)\) by \({\mathbb {K}}\). Clearly, \(|1|=|-1|=1\) and, if \({\mathbb {K}}\) is a non-Archimedean field, then \(\underbrace{|1+\cdots +1|}_{n \text { times}}\le 1\) for all \(n\in \mathbb {N}\). An immediate consequence of the strong triangle inequality is that \(|x|\ne |y|\) implies \(|x+y|=\max \{|x|, |y|\}\). Notice that if \({\mathbb {K}}\) is a finite field, then the only possible absolute value that can be defined on \({\mathbb {K}}\) is the trivial absolute value, that is, \(|x|=0\) if \(x=0\), and \(|x|=1\) otherwise. Furthemore, given any field \({\mathbb {K}}\), the topology endowed by the trivial absolute value on \({\mathbb {K}}\) is the discrete topology.

Let us fix a prime number p throughout this work. For any non-zero integer \(n\ne 0\), let \(\text {ord}_p (n)\) be the highest power of p which divides n. Then we define \(|n|_p=p^{-\text {ord}_p (n)}\), \(|0|_p=0\) and \(|\frac{n}{m} |_p=p^{-\text {ord}_p (n)+\text {ord}_p (m)}\), the p-adic absolute value. The completion of the field of rationals, \({\mathbb {Q}}\), with respect to the p-adic absolute value is called the field of p-adic numbers \({\mathbb {Q}}_p\). An important property of p-adic numbers is that each nonzero \(x\in \mathbb {Q}_p\) can be represented as

$$\begin{aligned} x=\sum _{n=m}^\infty a_n p^n, \end{aligned}$$

where \(m\in {{\mathbb {Z}}}\), \(a_n\in \mathbb F_p\) (the finite field of p elements) and \(a_m\ne 0\). If \(x=0\), then \(a_n=0\) for all \(n\in {{\mathbb {Z}}}\). The p-adic absolute value satisfies the strong triangle inequality. Ostrowski’s Theorem states that every nontrivial absolute value on \({\mathbb {Q}}\) is equivalent (i.e., defines the same topology) to an absolute value \(|\cdot |_p\), where p is a prime number, or the usual absolute value (see [28]).

Let \(a\in {\mathbb {Q}}_{p}\) and r be a positive number. The set \( B_r(a)=\{x\in {\mathbb {Q}}_{p}:|x-a|_{p}<r\}\) is called the open ball of radius r with center a, \(\overline{B}_{r}(a)=\{x\in {\mathbb {Q}} _{p}:|x-a|_{p}\le r\}\) the closed ball of radius r with center a, and \( S_r(a)=\{x\in {\mathbb {Q}}_{p}:|x-a|_{p}=r\}\) the sphere of radius r and center a. It is important to mention that \(B_r(a)\), \(\overline{B}_{r}(a)\) and \(S_r(a)\) are clopen sets in \(\mathbb {Q}_p\). The closed unit ball

$$\begin{aligned}{} & {} {{\mathbb {Z}}}_{p}=\{x\in {\mathbb {Q}}_{p}:|x|_{p}\le 1\}\\{} & {} \quad =\left\{ x\in {\mathbb {Q}}_{p}:x=\sum _{i=k}^\infty a_ip^i,\ a_i\in \{0,1,\ldots ,p-1\}, \ k\in {\mathbb {N}}_0 \right\} \end{aligned}$$

is called the ring of p-adic integers in \({\mathbb {Q}}_{p}\). We know that \({\mathbb {Z}}_{p}\) is a compact set and \(\mathbb {N}\) is dense in \({\mathbb {Z}}_{p}\) ([28]).

Throughout this article we shall consider all vector spaces and algebras taken over the field \({\mathbb {Q}}_p\) (unless stated otherwise).

3 Main results

We are ready to present our results. For the rest of this work, X will denote a nonempty subset of \({\mathbb {K}}\) without isolated points. Let us fix two notations:

$$\begin{aligned}{} & {} C^1(X,{\mathbb {K}})=\{f:X \rightarrow {\mathbb {K}} :f \text { has continuous (classical) derivative on }X\},\\{} & {} \quad S^r(X,{\mathbb {K}})=\{f:X \rightarrow {\mathbb {K}} :f \text { is strictly differentiable of order }r \text { on }X\}. \end{aligned}$$

Our first result shows that, unlike the classical case, strict differentiability is a stronger condition than simply having continuous derivative. An analogue to part (ii) of the result for the classical case can be found in [5].

Theorem 3.1

  1. (i)

    The set \(C^1(\mathbb {Q}_p,\mathbb {Q}_p)\setminus S^{1}(\mathbb {Q}_p,\mathbb {Q}_p)\) is \(\mathfrak {c}\)-lineable.

  2. (ii)

    The set \(S^{1}(\mathbb {Q}_p,\mathbb {Q}_p)\setminus S^{2}(\mathbb {Q}_p,\mathbb {Q}_p)\) is \(\mathfrak {c}\)-lineable. In general,

    $$\begin{aligned} S^{r}(\mathbb {Q}_p,\mathbb {Q}_p)\setminus S^{r+1}(\mathbb {Q}_p,\mathbb {Q}_p) \end{aligned}$$

    is \(\mathfrak {c}\)-lineable for any \(r\ge 1\).

Proof

(i). Notice that \(B_{p^{-2n}}(p^n)\subset S_{p^{-n}}(0)\) for every \(n\in {\mathbb {N}}\), therefore \(B_n\cap B_m=\emptyset \) if, and only if, \(n\ne m\). Also, let us define \(f_N:\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) for every \(N\in {\mathcal {N}}\) as follows:

$$\begin{aligned} f_N(x)={\left\{ \begin{array}{ll} p^{2n} &{} \text {if }x\in B_{p^{-2n}}(p^n) \text { with } n\in N,\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

First, notice that \(f_N\) is locally constant outside 0 and, thus, \(f_N\) is differentiable everywhere except maybe at 0 with \(f_N'(x)=0\) for every \(x\in \mathbb {Q}_p\setminus \{0\}\). Moreover, we have

$$\begin{aligned} \left| \frac{f_N(x)-f_N(0)}{x}\right| _p=\left| \frac{f_N(x)}{x}\right| _p={\left\{ \begin{array}{ll} p^{-n} &{} \text {if } x\in B_{p^{-2n}}(p^n) \text { with } n\in N,\\ 0 &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$

i.e., \(\left| \frac{f_N(x)-f_N(0)}{x}\right| _p\rightarrow 0\) as \(x\rightarrow 0\). Hence, \(f_N^\prime (0)=0\). Therefore, \(f_N^\prime \) exists everywhere and is continuous since \(f_N^\prime \equiv 0\), that is, \(f_N\in C^1(\mathbb {Q}_p,\mathbb {Q}_p)\).

It is enough to show that the family of functions \(V=\{f_N:N\in {\mathcal {N}} \}\) is linearly independent over \(\mathbb {Q}_p\) and the vector space generated by V, denoted by \(\text {span}(V)\), satisfies \(\text {span}(V)\setminus \{0\}\subset C^1(\mathbb {Q}_p,\mathbb {Q}_p)\setminus S^{1}(\mathbb {Q}_p,\mathbb {Q}_p)\). Take \(f=\sum _{i=1}^m \alpha _i f_{N_i}\), where \(\alpha _1,\ldots , \alpha _m\in \mathbb {Q}_p\), \(N_1,\ldots , N_m\in {\mathcal {N}}\) are distinct and \(m\in {\mathbb {N}}\). Assume that \(f\equiv 0\) then, by taking \(x=p^n\) with \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0\), we have that \(0=f(x)=\alpha _1 f_{N_1}(x)=\alpha _1 p^{2n}\), i.e., \(\alpha _1=0\). Therefore, applying similar arguments, we arrive at \(\alpha _i=0\) for every \(i\in \{1,\ldots , m \}\). Assume now that \(\alpha _i\ne 0\) for every \(i\in \{1,\ldots , m \}\). Since \(C^1(\mathbb {Q}_p,\mathbb {Q}_p)\) forms a vector space, we have that \(f\in C^1(\mathbb {Q}_p,\mathbb {Q}_p)\). Moreover, by construction we have \(f'\equiv 0\). It remains to prove that \(f\notin S^1(\mathbb {Q}_p,\mathbb {Q}_p)\). To do so, take the sequences

$$\begin{aligned} (x_n)_{n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0}=(p^n)_{n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0} \end{aligned}$$

and

$$\begin{aligned} (y_n)_{n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0}=(p^n-p^{2n})_{n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0}. \end{aligned}$$

Notice that both sequences converge to 0, and \(f(x_n)=\alpha _1 p^{2n}\) and \(f(y_n)=0\) for each \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0\). Hence,

$$\begin{aligned} \frac{f(x_n)-f(y_n)}{x_n-y_n}=\alpha _1, \end{aligned}$$

for every \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0\). Since \(\alpha _1\ne 0\), we have the desired result.

(ii). We will prove the case when \(r=1\) since the general case can be easily deduced. For every nonempty subset N of \({\mathbb {N}}\), let us define \(g_N :\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) as follows: for every \(x=\sum _{n=m}^\infty a_n p^n\in \mathbb {Q}_p\), take

$$\begin{aligned} g_N(x)=\sum _{n=0}^\infty b_n p^{2n}, \end{aligned}$$

where

$$\begin{aligned} b_n={\left\{ \begin{array}{ll} a_n &{} \text {if } n\in N,\\ 0 &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$

for every \(n\in {\mathbb {N}}_0\). For any \(x,y\in \mathbb {Q}_p\), notice that

$$\begin{aligned} |g_N(x)-g_N(y)|_p\le |x-y|_p^2. \end{aligned}$$

Hence,

$$\begin{aligned} \left| \frac{g_N(x)-g_N(z)}{x-z} \right| _p\le |x-z|_p\rightarrow 0 \end{aligned}$$

as \(x\rightarrow z\) for any \(z\in \mathbb {Q}_p\), that is, \(g_N\) is differentiable and \(g_N^\prime \equiv 0\). Moreover,

$$\begin{aligned} \left| \frac{g_N(x)-g_N(y)}{x-y} \right| _p\le |x-y|_p\rightarrow 0, \end{aligned}$$

When \((x,y)\rightarrow (z,z)\) for any \(z\in \mathbb {Q}_p\), and where \((x,y)\in \nabla ^2 \mathbb {Q}_p\). Thus, \(g_N\in S^{1}(\mathbb {Q}_p,\mathbb {Q}_p)\).

We will prove that the family of functions \(W=\{g_N :N\in {\mathcal {N}} \}\) is linearly independent over \(\mathbb {Q}_p\) and \(\text {span}(W)\setminus \{0\}\subset S^{1}(\mathbb {Q}_p,\mathbb {Q}_p)\setminus S^{2}(\mathbb {Q}_p,\mathbb {Q}_p)\). It is easy to see that any linear combination of the functions in W belongs to \(S^{1}(\mathbb {Q}_p,\mathbb {Q}_p)\). Take now \(g=\sum _{i=1}^k \beta _i g_{N_i}\), where \(\beta _1,\ldots ,\beta _k\in \mathbb {Q}_p\), \(N_1,\ldots ,N_k\in {\mathcal {N}}\) are distinct and \(k\in {\mathbb {N}}\). Assume that \(g\equiv 0\) then, by taking \(x=p^{n}\), with \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_k^0\) fixed, we have that \(0=g(x)=\beta _1 p^{2n}\), i.e., \(\beta _1=0\). By applying similar arguments we see that \(\beta _i=0\) for every \(i\in \{1,\ldots ,k \}\). Therefore, assume that \(\beta _i\ne 0\) for every \(i\in \{1,\ldots ,k \}\). For every \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_k^0\), denote

$$\begin{aligned} n_{+}=\min \{l\in N_1^1\cap N_2^0\cap \cdots \cap N_k^0 :l>n \}. \end{aligned}$$

Now consider the sequences \(\overline{x}=(x_n)_{N_1^1\cap N_2^0\cap \cdots \cap N_k^0}\), \(\overline{y}=(y_n)_{N_1^1\cap N_2^0\cap \cdots \cap N_k^0}\) and \(\overline{z}=(z_n)_{n\in N_1^1\cap N_2^0\cap \cdots \cap N_k^0}\) defined as \(x_n=p^n\), \(y_n=0\) and \(z_n=p^{n}+p^{n_+}\) for every \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_k^0\). (Notice that the sequences \(\overline{x}\), \(\overline{y}\) and \(\overline{z}\) converge to 0.) Then,

$$\begin{aligned}&\left| (y_n-z_n)^{-1}\right| _p \left| \frac{g(x_n)-g(y_n)}{x_n-y_n}-\frac{g(x_n)-g(z_n)}{x_n-z_n} \right| _p\\&= \left| (p^n+p^{n_+})^{-1}\right| _p \left| \frac{\beta _1 p^{2n}}{p^n}-\frac{\beta _1 p^{2n}-\beta _1 p^{2n}-\beta _1 p^{2n_{+}} }{p^n-p^n-p^{n_+}} \right| _p\\&= |\beta _1|_p \left| \frac{p^n-p^{n_+}}{p^n+p^{n_+}} \right| _p=|\beta _1|_p\ne 0, \end{aligned}$$

for every \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_k^0\). However, \(g^{\prime \prime }\equiv 0\). This finishes the proof. \(\square \)

Let \({\mathbb {K}}\) be a non-Archimedean field with absolute value \(|\cdot |\) that contains \(\mathbb {Q}_p\). For any \(\alpha >0\), the space of Lipschitz functions from X to \({\mathbb {K}}\) of order \(\alpha \) is defined as

$$\begin{aligned} \text {Lip}_\alpha (X,{\mathbb {K}})=\{f:X\rightarrow {\mathbb {K}} :\exists M>0(|f(x)-f(y)|\le M|x-y|^\alpha ),\forall x,y\in X \}. \end{aligned}$$

Let

$$\begin{aligned} N^1(X,{\mathbb {K}})=\{f\in S^1(X,{\mathbb {K}}):f' \equiv 0 \}. \end{aligned}$$

In view of [42]Exercise 63.C] we have

$$\begin{aligned} N^1(\mathbb {Z}_p,{\mathbb {K}})\setminus \bigcup _{\alpha >1} \text {Lip}_\alpha (\mathbb {Z}_p, {\mathbb {K}})\ne \emptyset . \end{aligned}$$

To prove the next theorem, we need a characterization of the spaces \(N^1(\mathbb {Z}_p,{\mathbb {K}})\) and \(\text {Lip}_\alpha (\mathbb {Z}_p,{\mathbb {K}})\) from [42]. For this we will denote by \((e_n)_{n\in {\mathbb {N}}_0}\) the van der Put base of \(C(\mathbb {Z}_p,{\mathbb {K}})\), which is given by \(e_0\equiv 1\) and \(e_n\) is the characteristic function of \(\{x\in \mathbb {Z}_p:|x-n|_p<1/n \}\) for every \(n\in {\mathbb {N}}\).

Proposition 3.2

  1. (i)

    Let \(f=\sum _{n=0}^\infty a_n e_n \in C(\mathbb {Z}_p,{\mathbb {K}})\). Then \(f\in N^1(\mathbb {Z}_p,{\mathbb {K}})\) if and only if \((|a_n| n)_{n\in {\mathbb {N}}_0}\) converges to 0 (see [42, Theorem 63.3]).

  2. (ii)

    Let \(f=\sum _{n=0}^\infty a_n e_n \in C(\mathbb {Z}_p,{\mathbb {K}})\) and \(\alpha >0\). Then \(f\in \text {Lip}_\alpha (\mathbb {Z}_p,{\mathbb {K}})\) if and only if

$$\begin{aligned} \sup \{|a_n| n^\alpha :n\in {\mathbb {N}}_0 \}<\infty \end{aligned}$$

(see [42, Exercise 63.B]).

The next result shows that there is a vector space of maximum dimension of strictly differentiable functions with zero derivative that are not Lipschitzian. Our next three results can be compared with some results obtained in [6, 11, 31] for the classical case.

Theorem 3.3

The set \(N^1({\mathbb {Z}}_{p},{\mathbb {K}})\setminus \bigcup _{\alpha >1}\mathrm{{Lip}}_{\alpha }({\mathbb {Z}}_{p},{\mathbb {K}})\) is \(\mathfrak {c}\)-lineable (as a \({\mathbb {K}}\)-vector space).

Proof

Fix \(n_1\in {\mathbb {N}}\) and take \(B_1=\{x\in {{\mathbb {Z}}}_p:|x-n_1|_p<1/n_1 \}\). Since \({{\mathbb {Z}}}_p\) and \(B_1\) are clopen sets, we have that \({{\mathbb {Z}}}_p\setminus B_1\) is open and also nonempty. Therefore there exists an open ball \(D_1\subset {{\mathbb {Z}}}_p\setminus B_1\). Furthermore, as \({\mathbb {N}}\) is dense in \({{\mathbb {Z}}}_p\), there exists \(n_2\in {\mathbb {N}}\setminus \{n_1\}\) such that \(B_2=\{ x\in {{\mathbb {Z}}}_p:|x-n_2|_p<1/n_2 \}\subset D_1\). By recurrence, we can construct a set \(M=\{n_k:k\in {\mathbb {N}} \}\subset {\mathbb {N}}\) such that the balls \(B_k=\{x\in {{\mathbb {Z}}}_p:|x-n_k|_p<1/n_k \}\) are pairwise disjoint.

Let \(\sigma :{\mathbb {N}}_0\rightarrow M\) be the increasing bijective function and let \((m_n)_{n\in {\mathbb {N}}}\subset {\mathbb {N}}\) be an increasing sequence such that \(p^{-m_n}n\rightarrow 0\) and \(p^{-m_n}n^\alpha \rightarrow \infty \) for every \(\alpha >1\) when \(n\rightarrow \infty \). (This can be done for instance by taking \(m_n=\left\lfloor \ln (n \ln (n))/\ln (p) \right\rfloor \).) For every \(N\in {\mathcal {N}}_0\), define \(f_N:{{\mathbb {Z}}}_{p}\rightarrow {\mathbb {K}}\) as

$$\begin{aligned} f_N=\sum _{n=0}^\infty 1_N(n) p^{m_{\sigma (n)}} e_{\sigma (n)}. \end{aligned}$$

Since every \(N\in {\mathcal {N}}_0\) is infinite, we have that \(|1_N(n)| p^{-m_{\sigma (n)}} \sigma (n)\rightarrow 0\) when \(n\rightarrow \infty \) and

$$\begin{aligned} \{|1_N(n)| p^{-m_{\sigma (n)}} \sigma (n)^\alpha :n\in {\mathbb {N}}_0 \} \end{aligned}$$

is unbounded for every \(\alpha >1\). Hence, by Theorem 3.2, we have \(f_N\in N^1({\mathbb {Z}}_{p},{\mathbb {K}})\setminus \bigcup _{\alpha >1}\mathrm{{Lip}}_{\alpha }({\mathbb {Z}}_{p},{\mathbb {K}})\) for every \(N\in {\mathcal {N}}_{0}\).

We will prove now that the functions in \(V=\{f_N:N\in {\mathcal {N}}_0 \}\) are linearly independent over \({\mathbb {K}}\) and such that any nonzero linear combination of V over \({\mathbb {K}}\) is contained in \(N^1({\mathbb {Z}}_{p},{\mathbb {K}})\setminus \bigcup _{\alpha >1}\mathrm{{Lip}}_{\alpha }({\mathbb {Z}}_{p},{\mathbb {K}})\). Take \(f=\sum _{i=1}^r a_i f_{N_i}\), where \(a_1,\ldots , a_r\in {\mathbb {K}}\), \(N_1,\ldots , N_r\in {\mathcal {N}}_0\) are distinct and \(r\in {\mathbb {N}}\). Assume that \(f\equiv 0\). Fix \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_r^0\) and take \(x\in {{\mathbb {Z}}}_p\) such that \(x\in B_{\sigma (n)}\), then \(0=f(x)=a_1 p^{m_{\sigma (n)}}\), i.e., \(a_1=0\). By applying similar arguments we have \(a_i=0\) for every \(i\in \{1,\ldots ,r \}\). Assume for the rest of the proof that \(a_i\ne 0\) for every \(i\in \{1,\ldots ,r \}\). Notice that \(f=\sum _{n=0}^\infty \left( \sum _{i=1}^r a_i 1_{N_i}\right) (n) p^{m_{\sigma (n)}} e_{\sigma (n)}\), where \(\left| \left( \sum _{i=1}^r a_i 1_{N_i}\right) (n) p^{m_{\sigma (n)}}\right| \le |p^{m_{\sigma (n)}}| \max \{|a_i|:i\in \{1,\ldots ,r \} \}=p^{-m_{\sigma (n)}} \max \{|a_i|:i\in \{1,\ldots ,r \} \}\). Therefore \(\left| \left( \sum _{i=1}^r a_i 1_{N_i}\right) (n) p^{m_{\sigma (n)}}\right| \sigma (n)\rightarrow 0\) when \(n\rightarrow \infty \). Finally, as \(N_1^1\cap N_2^0\cap \cdots \cap N_r^0\) is infinite, we have that

$$\begin{aligned}&\left\{ \left| \left( \sum _{i=1}^r a_i 1_{N_i}\right) (n) p^{m_{\sigma (n)}}\right| \sigma (n)^\alpha :n\in N_1^1\cap N_2^0\cap \cdots \cap N_r^0 \right\} \\&= \{|a_1| p^{-m_{\sigma (n)}} \sigma (n)^\alpha :n\in N_1^1\cap N_2^0\cap \cdots \cap N_r^0 \} \end{aligned}$$

is unbounded for every \(\alpha >1\). \(\square \)

The next lineability result can be considered as a non-Archimedean counterpart of [27] Theorem 6.1]. To prove it we will make use of the following lemma. (For more information on the usage of the lemma see [23, Lemma 5.2].) In order to understand it, let us consider the functions \(x\mapsto (1+x)^\alpha \) where \(x\in p{{\mathbb {Z}}}_p\) and \(\alpha \in {{\mathbb {Z}}}_p\). It is well known that \((1+x)^\alpha \) is defined analytically by \((1+x)^\alpha = \sum _{i=0}^\infty {\alpha \atopwithdelims ()i} x^i\). Moreover \(x\mapsto (1+x)^\alpha \) is well defined (see [42, Theorem 47.8]), differentiable with derivative \(\alpha (1+x)^{\alpha -1}\), and \(x\mapsto (1+x)^\alpha \) takes values in \({{\mathbb {Z}}}_p\) (in particular \((1+x)^\alpha =1+y\) for some \(y\in p{{\mathbb {Z}}}_p\), see [42, Theorem 47.10]).

Lemma 3.4

If \(\alpha _1,\ldots ,\alpha _n\in {{\mathbb {Z}}}_p\setminus \{0\}\) are distinct, with \(n\in {\mathbb {N}}\), then every linear combination \(\sum _{i=1}^n \gamma _i (1+x)^{\alpha _i}\), with \(\gamma _i\in {\mathbb {Q}}_p\setminus \{0\}\) for every \(1\le i\le n\), is not constant.

Theorem 3.5

The set of everywhere differentiable functions \({\mathbb {Q}}_{p}\rightarrow {\mathbb {Q}}_{p}\) which derivative is unbounded is strongly \(\mathfrak {c}\)-algebrable.

Proof

Let \(\mathcal H\) be a Hamel basis of \({\mathbb {Q}}_p\) over \({\mathbb {Q}}\) contained in \(p{{\mathbb {Z}}}_p\), and for each \(\beta \in {{\mathbb {Z}}}_p\setminus \{0\}\) define \(f_\beta : {\mathbb {Q}}_p\rightarrow {\mathbb {Q}}_p\) by

$$\begin{aligned} f_\beta (x)={\left\{ \begin{array}{ll} p^{-n} (1+y)^\beta &{} \text {if } x=\sum _{k=-n}^0 a_k p^k +y, \\ &{} \text {where } a_{-n}\ne 0,\ n\in {\mathbb {N}}_0 \text { and } y\in p\mathbb {Z}_p,\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

The function \(f_\beta \) is differentiable everywhere for any \(\beta \in {{\mathbb {Z}}}_p\). Indeed, firstly we have that \(f_\beta \) is locally constant on \(p{{\mathbb {Z}}}_p\) as \(f_\beta \restriction p{{\mathbb {Z}}}_p \equiv 0\). Lastly it remains to prove that \(f_\beta \) is differentiable at \(x_0=\sum _{k=-n}^0 a_k p^k +y_0\), i.e., the limit

$$\begin{aligned} \lim _{x\rightarrow x_0} \frac{p^{-m}(1+y)^\beta -p^{-n}(1+y_0)^\beta }{x-x_0} \end{aligned}$$
(3.1)

exists, where the values x are of the form \(x=\sum _{k=-m}^0 b_k p^k +y\). Moreover, as x approaches \(x_0\) in the limit (3.1), we can assume that \(x=\sum _{k=-n}^0 a_k p^k +y\). Hence, the limit in (3.1) can be simplified to

$$\begin{aligned} \lim _{x\rightarrow x_0} \frac{p^{-m}(1+y)^\beta -p^{-n}(1+y_0)^\beta }{x-x_0}&=\lim _{x\rightarrow x_0} \frac{p^{-n}(1+y)^\beta -p^{-n}(1+y_0)^\beta }{x-x_0}\\&=p^{-n} \lim _{y\rightarrow y_0} \frac{(1+y)^\beta -(1+y_0)^\beta }{y-y_0}\\&=p^{-n}\beta (1+y_0)^{\beta -1}. \end{aligned}$$

In particular the derivative of \(f_\beta \) is given by

$$\begin{aligned} f_\beta ^\prime (x)={\left\{ \begin{array}{ll} p^{-n} \beta (1+y)^{\beta -1} &{} \text {if } x=\sum _{k=-n}^0 a_k p^k +y,\\ &{} \text {where } a_{-n}\ne 0,\ n\in {\mathbb {N}}_0, y\in p\mathbb {Z}_p,\\ 0 &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$

and it is unbounded since

$$\begin{aligned} \lim _{n\rightarrow \infty } |p^{-n}\beta (1+y)^{\beta -1}|_p=\lim _{n\rightarrow \infty } p^{n}|\beta (1+y)^{\beta -1}|_p=|\beta |_p\lim _{n\rightarrow \infty } p^{n}=\infty , \end{aligned}$$

where we have used the fact that \(\beta \ne 0\).

Let \(h_1,\ldots ,h_m \in \mathcal H\) be distinct and take P a polynomial in m variables with coefficients in \({\mathbb {Q}}_p\setminus \{0\}\) and without free term, that is, \(P(x_1,\ldots ,x_m)=\sum _{r=1}^d \alpha _r x_1^{k_{r,1}}\cdots x_m^{k_{r,m}}\), where \(d\in {\mathbb {N}}\), \(\alpha _r\in \mathbb {Q}_p\setminus \{0\}\) for every \(1\le r\le d\), \(k_{r,i}\in {\mathbb {N}}_0\) for every \(1\le r\le d\) and \(1\le i\le m\) with \(\overline{k}_r:=\sum _{i=1}^m k_{r,i}\ge 1\), and the m-tuples \((k_{r,1},\ldots ,k_{r,m})\) are pairwise distinct. Assume also without loss of generality that \(\overline{k}_1\ge \cdots \ge \overline{k}_d\). We will prove first that \(P(f_{h_1},\ldots ,f_{h_m})\not \equiv 0\), i.e., the functions in \(\{f_h :h\in \mathcal H \}\) are algebraically independent. Notice that \(P(f_{h_1},\ldots ,f_{h_m})\) is of the form

$$\begin{aligned} {\left\{ \begin{array}{ll} \sum _{r=1}^d p^{-n\overline{k}_r} \alpha _r (1+y)^{\beta _r} &{} \text {if } x=\sum _{k=-n}^0 a_k p^k +y,\\ &{} \text {with } a_{-n}\ne 0,\ n\in {\mathbb {N}}_0, y\in p\mathbb {Z}_p,\\ 0 &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$

where the exponents \(\beta _r:=\sum _{i=1}^m k_{r,i} h_i\) belong to \(p\mathbb {Z}_p\setminus \{0\}\) and are pairwise distinct because \(\mathcal H\) is a Hamel basis of \({\mathbb {Q}}_p\) over \({\mathbb {Q}}\) contained in \(p\mathbb {Z}_p\), \(k_{r,i}\in {\mathbb {N}}_0\), \(\overline{k}_r\ne 0\) and the numbers \(h_1,\ldots ,h_m\) as well as the m-tuples \((k_{r,1},\ldots ,k_{r,m})\) are pairwise distinct. Fix \(n\in {\mathbb {N}}_0\). Since \(p^{-n\overline{k}_r} \alpha _r \ne 0\) for every \(1\le r\le d\), by Lemma 3.1, there is \(y\in p\mathbb {Z}_p\) such that \(\sum _{r=1}^d p^{-n\overline{k}_r} \alpha _r (1+y)^{\beta _r}\ne 0\). Hence, by taking \(x=p^{-n}+y\), we have \(P(f_{h_1},\ldots ,f_{h_m})(x)\ne 0\).

Finally, let us prove that \(P(f_{h_1},\ldots ,f_{h_m})'\) exists and it is unbounded. Clearly \(P(f_{h_1},\ldots ,f_{h_m})\) is differentiable and the derivative is given by

$$\begin{aligned} {\left\{ \begin{array}{ll} \displaystyle \sum _{r=1}^d p^{-n\overline{k}_r} \alpha _r \beta _r (1+y)^{\beta _r-1} &{} \displaystyle \text {if } x=\sum _{k=-n}^0 a_k p^k +y,\\ &{} \text {with } a_{-n}\ne 0,\ n\in {\mathbb {N}}_0, y\in p\mathbb {Z}_p,\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$
(3.2)

Notice that \(\beta _r\ne 1\) for every \(1\le r\le d\) since \(\beta _r\in p\mathbb {Z}_p\). We will now rewrite formula (3.2) in order to simplify the proof. Notice that if some of the exponents \(\overline{k}_r\) are equal, i.e., for instance \(\overline{k_i}=\cdots =\overline{k}_j\) for some \(1\le i<j\le d\), then \(p^{-n\overline{k}_i}\) is a common factor in each summand \(p^{-n\overline{k}_i} \alpha _i \beta _i (1+y)^{\beta _i-1},\ldots ,p^{-n\overline{k}_j} \alpha _j \beta _j (1+y)^{\beta _j-1}\). Therefore, \(P(f_{h_1},\ldots ,f_{h_m})^\prime (x)\) can also be written as

$$\begin{aligned} {\left\{ \begin{array}{ll} \displaystyle \sum _{q=1}^{\widetilde{d}} p^{-n\widetilde{k}_q} \sum _{s=1}^{m_q}\alpha _{q,s}\beta _{q,s} (1+y)^{\beta _{q,s}-1} &{} \displaystyle \text {if } x=\sum _{k=-n}^0 a_k p^k +y,\\ &{} \text {where } a_{-n}\ne 0, \displaystyle n\in {\mathbb {N}}_0\\ &{} \text {and } y\in p\mathbb {Z}_p,\\ 0 &{} \displaystyle \text {otherwise}, \end{array}\right. } \end{aligned}$$
(3.3)

where \(\tilde{d}\in \mathbb {N}\), the \(\widetilde{k}_q\)’s represent the common exponents of \(p^{-n\overline{k}_i}\) with \(\widetilde{k}_1>\cdots >\widetilde{k}_{\widetilde{d}}\), and \(\alpha _{q,s}\) and \(\beta _{q,s}\) are the corresponding terms \(\alpha _r\) and \(\beta _r\), respectively. Now, since \(\alpha _{1,s} \beta _{1,s}\ne 0\) and the exponents \(\beta _{1,s}-1\) are pairwise distinct and not equal to 0 for every \(1\le s\le m_1\), by Lemma 3.1, there exists \(y_1\in p\mathbb {Z}_p\) such that \(\sum _{s=1}^{m_1}\alpha _{1,s}\beta _{1,s} (1+y_1)^{\beta _{1,s}-1}\ne 0\). Take the sequence \((x_n)_{n=1}^\infty \) defined by \(x_n=p^{-n}+y_1\). Since \(\widetilde{k}_1>\cdots >\widetilde{k}_{\widetilde{d}}\), there exists \(n_0\in {\mathbb {N}}\) such that

$$\begin{aligned} |P(f_{h_1},\ldots ,f_{h_m})^\prime (x_n)|_p&=\left| \sum _{q=1}^{\widetilde{d}} p^{-n\widetilde{k}_q} \sum _{s=1}^{m_q}\alpha _{q,s}\beta _{q,s} (1+y_1)^{\beta _{q,s}-1} \right| _p\\&=\left| p^{-n\widetilde{k}_1}\sum _{s=1}^{m_1 }\alpha _{1,s} \beta _{1,s} (1+y_1)^{\beta _{1,s}-1} + \right. \\&\left. + \sum _{q=2}^{\widetilde{d}} p^{-n\widetilde{k}_r} \sum _{s=1}^{m_q}\alpha _{q,s} \beta _{q,s} (1+y_1)^{\beta _{q,s}-1} \right| _p\\&=\left| p^{-n\widetilde{k}_1}\sum _{s=1}^{m_1 }\alpha _{1,s} \beta _{1,s} (1+y_1)^{\beta _{1,s}-1}\right| _p\\&=p^{n\widetilde{k}_1}\left| \sum _{s=1}^{m_1 }\alpha _{1,s} \beta _{1,s} (1+y_1)^{\beta _{1,s}-1}\right| _p, \end{aligned}$$

for every \(n\ge n_0\). Hence, \(\lim _{n\rightarrow \infty } |P(f_{h_1},\ldots ,f_{h_m})^\prime (x_n)|_p=\infty \). \(\square \)

The reader may have noticed that the functions in the proof of Theorem 3.5 have unbounded derivative but the derivative is bounded on each ball of \(\mathbb {Q}_p\). The following result (which proof is a modification of the one in Theorem 3.5) shows that we can obtain a similar optimal result when the derivative is unbounded on each ball centered at a fixed point \(a\in \mathbb {Q}_p\). The functions will not be differentiable at a.

Corollary 3.6

Let \(a\in \mathbb {Q}_p\). The set of continuous functions \({\mathbb {Q}}_{p}\rightarrow {\mathbb {Q}}_{p}\) that are differentiable except at a and which derivative is unbounded on \(\mathbb {Q}_p\setminus (a+\mathbb {Z}_p)\) and on \((a+\mathbb {Z}_p)\setminus \{a\}\) is strongly \(\mathfrak {c}\)-algebrable.

Proof

Fix \(a\in \mathbb {Q}_p\). Let \(\mathcal H\) be a Hamel basis of \({\mathbb {Q}}_p\) over \({\mathbb {Q}}\) contained in \(p{{\mathbb {Z}}}_p\). For every \(\beta \in \mathbb {Z}_p\setminus \{0\}\) take the function \(f_\beta \) defined in the proof of Theorem 3.5 and also define \(g_\beta :\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) by

$$\begin{aligned} g_\beta (x)={\left\{ \begin{array}{ll} p^{n}[p^{-n^2}(x-a)]^\beta &{} \text {if } x\in \overline{B}_{p^{-(n^2+1)}}(a+p^{n^2}) \text { for some } n\in {\mathbb {N}},\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Notice that by applying the change of variable \(y=x-a\) we can assume, without loss of generality, that \(a=0\). Since for any \(x\in \overline{B}_{p^{-(n^2+1)}}(p^{n^2})\) with \(n\in {\mathbb {N}}\), x is of the form \(p^{n^2}+\sum _{k=n^2+1}^\infty a_k p^k\) with \(a_{k}\in \{0,1,\ldots ,p-1\}\) for every integer \(k\ge n^2+1\), we have that \(p^{-n^2}x=1+\sum _{k=n^2+1}^\infty a_k p^{k-n^2}\in 1+p\mathbb {Z}_p\). Thus \(g_\beta \) is well defined. Now, for every \(\beta \in \mathbb {Z}_p\setminus \{0\}\), let \(F_{\beta }:=f_\beta +g_\beta \). It is easy to see that \(F_\beta \) is differentiable at every \(x\in \mathbb {Q}_p\setminus \{0\}\) and, in particular, continuous on \(\mathbb {Q}_p\setminus \{0\}\). Let us prove now that \(F_\beta \) is continuous at 0. Fix \(\varepsilon >0\) and take \(n\in {\mathbb {N}}\) such that \(p^{-n}<\varepsilon \). If \(|x|_p<p^{1-n^2}\), then

$$\begin{aligned} |F_\beta (x)|&={\left\{ \begin{array}{ll} |p^n (p^{-n^2}x)^\beta |_p &{} \text {if } x\in \overline{B}_{p^{-(n^2+1)}}(p^{n^2}),\\ 0 &{} \text {otherwise}, \end{array}\right. }\\&={\left\{ \begin{array}{ll} p^{-n} &{} \text {if } x\in \overline{B}_{p^{-(n^2+1)}}(p^{n^2}),\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

In any case, \(|F_\beta (x)|<\varepsilon \). Hence \(F_\beta \) is continuous. Moreover, \(F_\beta \) is not differentiable at 0. Indeed, by considering the sequence \((x_n)_{n=1}^\infty =(p^{n^2}+p^{n^2+1})_{n=1}^\infty \) which converges to 0 when \(n\rightarrow \infty \) we have

$$\begin{aligned} \lim _{n\rightarrow \infty } \frac{|F_\beta (x_n)-F_\beta (0)|_p}{|x_n|_p}&=\lim _{n\rightarrow \infty } \frac{|p^{n} [p^{-n^2}(p^{n^2}+p^{n^2+1})]^\beta |_p}{|p^{n^2}+p^{n^2+1}|_p}\\&=\lim _{n\rightarrow \infty } \frac{p^{-n} |(1+p)^\beta |_p}{p^{-n^2}}=\lim _{n\rightarrow \infty } p^{n^2-n}=\infty . \end{aligned}$$

In particular, by the chain rule, the derivative of \(F_\beta \) on \(\mathbb {Q}_p\setminus \{0\}\) is as follows

$$\begin{aligned} F_\beta ^\prime (x)={\left\{ \begin{array}{ll} p^{-n} \beta (1+y)^{\beta -1} &{} \displaystyle \text {if } x=\sum _{k=n}^0 a_k p^k +y,\\ &{}\text {with } a_n\ne 0,\ n\in {{\mathbb {Z}}}\setminus {\mathbb {N}}, y\in p\mathbb {Z}_p,\\ p^{n-n^2}\beta (p^{-n^2}x)^{\beta -1} &{} \text {if } x\in \overline{B}_{p^{-(n^2+1)}}(p^{n^2}) \text { for some } n\in {\mathbb {N}},\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

By the proof of Theorem 3.5 the functions in the set \(V=\{F_h :h\in \mathcal H \}\) are algebraically independent, and every function in the algebra \(\mathcal A\) generated by V over \(\mathbb {Q}_p\) that is not the 0 function is continuous, differentiable on \(\mathbb {Q}_p\setminus \{0\}\) and has unbounded derivative on \(\mathbb {Q}_p\setminus \mathbb {Z}_p\). It remains to prove that any nonzero algebraic combination in V has unbounded derivative on \(\mathbb {Z}_p\setminus \{0\}\). To do so, let \(h_1,\ldots ,h_m \in \mathcal H\) be distinct and take P a polynomial in m variables with coefficients in \({\mathbb {Q}}_p\setminus \{0\}\) and without free term. Then, by the chain rule, \(P(f_{h_1},\ldots ,f_{h_m})^\prime \) on \(\overline{B}_{p^{-(n^2+1)}}(p^{n^2})\) is of the form

$$\begin{aligned} p^{-n^2}\sum _{q=1}^d p^{nk_q} \sum _{s=1}^{m_q} \alpha _{q,s} \beta _{q,s} (p^{-n^2}x)^{\beta _{q,s}-1}, \end{aligned}$$

see the proof of Theorem 3.5. Assume without loss of generality that \(k_1<\cdots <k_d\). Since \(\alpha _{1,s} \beta _{1,s}\ne 0\) and the exponents \(\beta _{1,s}- 1\) are pairwise distinct and not 0 for every \(1\le s\le m_1\), by Lemma 3.4, there exists \(y_1\in p\mathbb {Z}_p\) such that \(\sum _{s=1}^{m_1} \alpha _{1,s} \beta _{1,s}(1+y_1)^{\beta _{1,s}-1}\ne 0\). For every \(n\in {\mathbb {N}}\), take \(x_n=p^{n^2}(1+y_1)\). Then, notice that there exists \(n_0\in {\mathbb {N}}\) such that

$$\begin{aligned} |P(F_{h_1},\ldots ,F_{h_m})^\prime (x_n)|_p&=\left| p^{-n^2}\sum _{q=1}^{d} p^{nk_q} \sum _{s=1}^{m_q}\alpha _{q,s}\beta _{q,s} (p^{-n^2}x_n)^{\beta _{q,s}-1} \right| _p\\&=p^{n^2}\left| \sum _{q=1}^{d} p^{nk_q} \sum _{s=1}^{m_q}\alpha _{q,s}\beta _{q,s} (1+y_1)^{\beta _{q,s}-1} \right| _p\\&=p^{n^2}\left| p^{nk_1}\sum _{s=1}^{m_1 }\alpha _{1,s} \beta _{1,s} (1+y_1)^{\beta _{1,s}-1} + \right. \\&\quad \left. + \sum _{q=2}^{d} p^{nk_r} \sum _{s=1}^{m_q} \alpha _{q,s} \beta _{q,s} (1+y_1)^{\beta _{q,s}-1} \right| _p\\&=p^{n^2}\left| p^{nk_1}\sum _{s=1}^{m_1 }\alpha _{1,s} \beta _{1,s} (1+y_1)^{\beta _{1,s}-1}\right| _p\\&=p^{n^2-nk_1}\left| \sum _{s=1}^{m_1 }\alpha _{1,s} \beta _{1,s} (1+y_1)^{\beta _{1,s}-1}\right| _p, \end{aligned}$$

for every \(n\ge n_0\). Therefore \(\lim _{n\rightarrow \infty } |P(F_{h_1},\ldots ,F_{h_m})^\prime (x_n)|_p=\infty \). \(\square \)

In Corollary 3.6 we can replace unbounded derivative with being not Lipschitzian although the conclusion is weaker in terms of lineability as it is shown in the following proposition.

Proposition 3.7

The set of continuous functions \({\mathbb {Q}}_{p}\rightarrow {\mathbb {Q}}_{p}\) which are differentiable except at 0, with bounded derivative on \(\mathbb {Q}_p\setminus \{0\}\) and not Lipschitzian of order \(\alpha >0\) is \(\mathfrak {c}\)-lineable and 1-algebrable.

Proof

Let us prove first the lineability part. For any \(N\in {\mathcal {N}}\), let \(f_N:\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) be:

$$\begin{aligned} f_N(x)={\left\{ \begin{array}{ll} p^{n} &{} \text {if } x\in S_{p^{-n^2}}(0) \text { and } n\in N,\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

For every \(x\in \mathbb {Q}_p\setminus \{0\}\), it is clear that there exists a neighborhood of x such that \(f_N\) is constant since the spheres are open sets. Thus, \(f_N\) is locally constant on \(\mathbb {Q}_p\setminus \{0\}\) which implies that \(f_N\) is continuous, differentiable on \(\mathbb {Q}_p\setminus \{0\}\) and \(f_N^\prime (x)=0\) for every \(x\in \mathbb {Q}_p\setminus \{0\}\). Moreover, it is easy to see that \(f_N\) is continuous at 0. However, \(f_N\) is not differentiable at 0. Indeed, take \(x_n=p^{n^2}\) for every \(n\in N\). It is clear that the sequence \((x_n)_{n\in N}\) converges to 0 and also, for every \(\alpha >0\),

$$\begin{aligned} \frac{|f_N(x_n)|_p}{|x_n|_p^\alpha }=p^{\left( -1+\alpha n\right) n}\rightarrow \infty , \end{aligned}$$

when \(n\in N\) tends to infinity. Therefore \(f_N\) is not differentiable at 0. Furthermore, notice that for any \(M>0\) there are infinitely many \(x\in \mathbb {Z}_p\) such that \(|f_N(x)|_p> M|x|_p^\alpha \). Hence \(f_N\) is not Lipschitzian of order \(\alpha >0\).

It remains to prove that the functions in \(V=\{f_N:N\in {\mathcal {N}} \}\) are linearly independent over \(\mathbb {Q}_p\) and such that the functions in \(\text {span}(V)\setminus \{0\}\) are differentiable except at 0, with bounded derivative on \(\mathbb {Q}_p\setminus \{0\}\) and not Lipschitzian of order \(\alpha >0\). Let \(f=\sum _{i=1}^m \alpha _i f_{N_i}\), where \(\alpha _1,\ldots , \alpha _m\in \mathbb {Q}_p\), \(N_1,\ldots , N_m\in {\mathcal {N}}\) are distinct and \(m\in {\mathbb {N}}\). Assume that \(f\equiv 0\) and take \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0\). Then \(0=f(p^{n^2})=\alpha _1 p^{n}\) which implies that \(\alpha _1=0\). Applying similar arguments we have that \(\alpha _i=0\) for every \(i\in \{1,\ldots , m \}\). Finally, assume that \(\alpha _i\ne 0\) for every \(i\in \{1,\ldots , m \}\). It is clear that f is continuous on \(\mathbb {Q}_p\) and differentiable on \(\mathbb {Q}_p\setminus \{0\}\) with \(f_N^\prime (x)=0\) for every \(x\in \mathbb {Q}_p\setminus \{0\}\). Let \(x_n=p^{n^2}\) for every \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0\) and notice that \((x_n)_{n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0}\) converges to 0. Moreover, for every \(\alpha >0\),

$$\begin{aligned} \frac{|f(x_n)|_p}{|x_n|_p^\alpha }=|\alpha _1|_p p^{\left( -1+\alpha n\right) n}\rightarrow \infty , \end{aligned}$$

when \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_m^0\) tends to infinity. Hence, f is not differentiable at 0, and also for every \(M>0\) there are infinitely many \(x\in \mathbb {Z}_p\) such that \(|f(x)|_p> M|x|_p^\alpha \).

For the algebrability part, let \(g:\mathbb {Q}_p\rightarrow \mathbb {Q}_p\) be defined as:

$$\begin{aligned} g(x)={\left\{ \begin{array}{ll} p^n &{} \text {if } x\in S_{p^{-n^2}}(0) \text { for some } n\in {\mathbb {N}},\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

By applying similar arguments used in the first part of the proof, we have that g is continuous, differentiable on \(\mathbb {Q}_p\setminus \{0\}\) with \(g^\prime (x)=0\) for every \(x\in \mathbb {Q}_p\setminus \{0\}\) and not Lipschitzian of order \(\alpha >0\). To finish the proof, let \(G=\beta g^k\) where \(\beta \in \mathbb {Q}_p\setminus \{0\}\) and \(k\in {\mathbb {N}}\). It is obvious that G is continuous, differentiable on \(\mathbb {Q}_p\setminus \{0\}\) and \(G^\prime (x)=0\) for every \(x\in \mathbb {Q}_p\setminus \{0\}\). Now, let \(x_n=p^{n^2}\) for every \(n\in {\mathbb {N}}\). It is easy to see that \((x_n)_{n\in {\mathbb {N}}}\) converges to 0 and

$$\begin{aligned} \frac{|G(x_n)|_p}{|x_n|_p^\alpha }=|\beta |_p p^{\left( -k+\alpha n\right) n}\rightarrow \infty , \end{aligned}$$

when \(n\rightarrow \infty \). \(\square \)

Let \({\mathcal {B}}\) be the \(\sigma \)-algebra of all Borel subsets of \(\mathbb {Z}_p\) and \(\mu \) be any non-negative real-valued Haar measure on the measurable space \((\mathbb {Z}_p,{\mathcal {B}})\). In particular, if \(\mu \) is normalized, then \(\mu \left( x+p^n\mathbb {Z}_p\right) =p^{-n}\) for any \(x\in \mathbb {Z}_p\) and \(n\in {\mathbb {N}}\). For the rest of the paper \(\mu \) will denote a non-negative real-valued Haar measure on \((\mathbb {Z}_p,{\mathcal {B}})\). As usual, a Borel subset B of \(\mathbb {Z}_p\) is called a null set for \(\mu \) provided that \(\mu (B)=0\). We also say that a Borel subset of \(\mathbb {Z}_p\) is a full set for \(\mu \) if \(\mathbb {Z}_p\setminus B\) is a null set. (See [26, Section 2.2] for more details on the Haar measure.)

It is easy to see that the singletons of \(\mathbb {Z}_p\) are null sets for any Haar measure \(\mu \) on \((\mathbb {Z}_p,{\mathcal {B}})\). Therefore Proposition 3.7 states in particular that, for any Haar measure \(\mu \) on \((\mathbb {Z}_p,{\mathcal {B}})\), the set of continuous functions \(\mathbb {Z}_p\rightarrow \mathbb {Q}_p\) that are differentiable except on a null set for \(\mu \) of cardinality 1, with bounded derivative elsewhere, is \(\mathfrak {c}\)-lineable. The following result shows that a similar version can be obtained when we consider null sets of cardinality \(\mathfrak {c}\) for any Haar measure \(\mu \) on \((\mathbb {Z}_p,{\mathcal {B}})\). In order to prove it, we recall the following definition and result from probability theory.

Definition 3.8

Let \((\Omega ,\mathcal F,P)\) be a probability space and Y be a measurable real-valued function on \(\Omega \). We say that Y is a random variable.

Theorem 3.9

(Strong law of large numbers, see [19, Theorem 22.1]). Let \((Y_n)_{n\in {\mathbb {N}}_0}\) be a sequence of independent and identically distributed random variables on a probability space \((\Omega ,\mathcal F,P)\) such that, for each \(n\in {\mathbb {N}}_0\), \(E[Y_n]=m\) for some \(m\in \mathbb R\) (where E denotes the expected value). Then

$$\begin{aligned} P\left( \left\{ x\in \Omega :\exists \lim _{n\rightarrow \infty } \frac{\sum _{k=0}^{n-1} Y_k(x)}{n}=m \right\} \right) =1. \end{aligned}$$

Theorem 3.10

Let \(\mu \) be a Haar measure on \((\mathbb {Z}_p,{\mathcal {B}})\). The set of continuous functions \(\mathbb {Z}_p\rightarrow \mathbb {Q}_p\) which are differentiable on a full set for \(\mu \) with bounded derivative but not differentiable on the complement having cardinality \(\mathfrak c\) is \(\mathfrak c\)-lineable.

Proof

We will prove the result for \(\mu \) the normalized Haar measure on \((\mathbb {Z}_p,{\mathcal {B}})\) since any null set for the normalized Haar measure is also a null set for any other non-negative real-valued Haar measure on \((\mathbb {Z}_p,{\mathcal {B}})\). This is an immediate consequence of Haar’s Theorem which states that Haar measures are unique up to a positive multiplicative constant (see [26, Theorem 2.20]).

Let \(f:\mathbb {Z}_p\rightarrow \mathbb {Z}_p\) be defined as follows: for every \(x=\sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p\), we have

$$\begin{aligned} f(x)={\left\{ \begin{array}{ll} x &{} \text {if } (x_{2i},x_{2i+1})\ne (0,0) \text { for all } i\in {\mathbb {N}}_0,\\ \displaystyle \sum _{i=0}^{2n+1} x_i p^i &{} \text {if } (x_{2i},x_{2i+1})\ne (0,0) \text { for all } i\le n \\ &{} \text {with } n\in {\mathbb {N}}_0 \text { and } (x_{2n+2},x_{2n+3})= (0,0),\\ 0 &{} \text {if } (x_0,x_1)=(0,0). \end{array}\right. } \end{aligned}$$
(3.4)

The function f is continuous. Indeed, let \(x=\sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p\) and fix \(\varepsilon >0\). Take any \(m\in {\mathbb {N}}_0\) such that \(p^{-(2m+1)}<\varepsilon \). Then for any \(y\in \mathbb {Z}_p\) such that \(|x-y|_p<p^{-(2m+1)}\) we have that y is of the form \(\sum _{i=0}^{2m+1} x_i p^i + \sum _{i=2m+2}^\infty y_i p^i\). Hence, notice that in any possible case of x given in (3.4), we have that \(|f(x)-f(y)|_p< p^{-(2m+1)}<\varepsilon \).

Let us define, for every \(i\in {\mathbb {N}}_0\), the random variables \(Y_i:\mathbb {Z}_p\rightarrow \{0,1\}\) in the following way: for any \(x=\sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p\),

$$\begin{aligned} Y_i(x)={\left\{ \begin{array}{ll} 1 &{} \text {if } (x_{2i},x_{2i+1})=(0,0),\\ 0 &{} \text {if } (x_{2i},x_{2i+1})\ne (0,0). \end{array}\right. } \end{aligned}$$

Notice that the random variables \((Y_i)_{i\in {\mathbb {N}}_0}\) are independent and identically distributed with \(E[Y_i]=\frac{1}{p^2}\) for every \(i\in {\mathbb {N}}_0\). Thus, by the strong law of large numbers, the set

$$\begin{aligned} D=\left\{ x=\sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p:\lim _{n\rightarrow \infty } \frac{\sum _{i=0}^{n-1} Y_i(x)}{n}=\frac{1}{p^2} \right\} \end{aligned}$$

has measure 1. Now, since for every \(i\in {\mathbb {N}}_0\), \(Y_i(x)=0\) for all \(x=\sum _{j=0}^\infty x_j p^j\) that satisfy \((x_{2j},x_{2j+1})\ne (0,0)\) for each \(j\in {\mathbb {N}}_0\), we have that \(\lim _{n\rightarrow \infty } \frac{\sum _{i=0}^{n-1} Y_i(x)}{n}=0\) for all such x. Hence, it is clear that \(E:{=}\left\{ \sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p:(x_{2i},x_{2i+1})\ne (0,0)\text { for all } i\in {\mathbb {N}}_0 \right\} \subset \mathbb {Z}_p\setminus D\). Moreover, by construction \(\text {card}(E)=\mathfrak {c}\). Notice that it is not obvious that E is a Borel set since any Haar measure \(\mu \) on \((\mathbb {Z}_p,{\mathcal {B}})\) is not complete. However, as \(\mathbb {Z}_p\setminus D\) is a null set, we have that if E were a Borel set, then E would be a null set. Let us prove that E is a Borel set. Consider the finite field of p elements \(\mathbb F_p\) endowed with an absolute value \(|\cdot |_T\)–the trivial absolute value. Then \(\mathbb F_p\) is a discrete topological space, which implies that the product space \(\mathbb F_p^2:=\mathbb F_p\times \mathbb F_p\) has the discrete topology. (Recall that the finite product of discrete topological spaces has the discrete topology.) For every \(n\in {\mathbb {N}}_0\), let \(\pi _n:\mathbb {Z}_p\rightarrow \mathbb F_p^2\) be defined as \(\pi _n(x)=(x_{2n},x_{2n+1})\) for every \(x=\sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p\). Let \(n\in {\mathbb {N}}_0\), \(x\in \mathbb {Z}_p\) and fix \(\varepsilon >0\). Take an integer \(m>n\). Then for every \(y\in \mathbb {Z}_p\) such that \(|x-y|_p<p^{-(2m+1)}\) we have that \(\pi _n(x)=\pi _n(y)\), i.e., \(|\pi _n(x)-\pi _n(y)|_T=0<\varepsilon \). Hence \(\pi _n\) is continuous. Note that \(E=\bigcap _{n=0}^\infty \pi _n^{-1}(\{(x,y)\in \mathbb F_p^2 :(x,y)\ne (0,0) \})\), where \(\pi _n^{-1}(\{(x,y)\in \mathbb F_p^2 :(x,y)\ne (0,0) \})\) is closed since \(\pi _n\) is continuous and \(\{(x,y)\in \mathbb F_p^2 :(x,y)\ne (0,0) \}\) is closed in \(\mathbb F_p^2\). Hence, E is closed since it is the countable intersection of closed sets and, therefore, a Borel set.

Let us analyze now the differentiability of f. On the one hand, if for \(x=\sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p\) there exists \(i_0\in {\mathbb {N}}_0\) such that \((x_{2i_0},x_{2i_0+1})=(0,0)\), then it is clear that f is constant on some neighborhood of x, and hence differentiable at x. On the other hand, if f were differentiable at \(x=\sum _{i=0}^\infty x_i p^i\in \mathbb {Z}_p\) satisfying \((x_{2i},x_{2i+1})\ne (0,0)\) for all \(i\in {\mathbb {N}}_0\), then we would have \(f^\prime (x)=1\). Assume, by means of contradiction, that f is differentiable at x. For every \(n\in {\mathbb {N}}_0\), take \(\overline{x}_n:=\sum _{i=0}^{2n+1} x_i p^i + \sum _{i=2n+4}^\infty y_i p^i\) with \(y_{2n+4}\ne 0\), then

$$\begin{aligned} \frac{f(x)-f(\overline{x}_n)}{x-\overline{x}_n}&= \frac{\sum _{i=0}^\infty x_i p^i-\sum _{i=0}^{2n+1} x_i p^i}{\sum _{i=2n+2}^\infty x_{i} p^{i}-\sum _{i=2n+4}^\infty y_i p^{i} }\\&= \frac{\sum _{i=2n+2}^\infty x_{i} p^{i}}{\sum _{i=2n+2}^\infty x_{i} p^{i}-\sum _{i=2n+4}^\infty y_i p^{i}}\\&= \frac{\sum _{i=2n+2}^\infty x_{i} p^{i}-\sum _{i=2n+4}^\infty y_i p^{i}+\sum _{i=2n+4}^\infty y_i p^{i} }{\sum _{i=2n+2}^\infty x_{i} p^{i}-\sum _{i=2n+4}^\infty y_i p^{i}}\\&= 1+\frac{\sum _{i=2n+4}^\infty y_i p^{i}}{\sum _{i=2n+2}^\infty x_{i} p^{i}-\sum _{i=2n+4}^\infty y_i p^{i}}. \end{aligned}$$

Now, as \(y_{2n+4} \ne 0\), we have

$$\begin{aligned} \left| \frac{\sum _{i=2n+4}^\infty y_i p^{i}}{\sum _{i=2n+2}^\infty x_{i} p^{i}-\sum _{i=2n+4}^\infty y_i p^{i}} \right| _p={\left\{ \begin{array}{ll} p^{-2} &{} \text {if } x_{2n+2}\ne 0,\\ p^{-1} &{} \text {if } x_{2n+3}\ne 0. \end{array}\right. } \end{aligned}$$

Thus we have \(\lim _{n\rightarrow \infty } |x-\overline{x}_n|_p=0\) and \(\lim _{n\rightarrow \infty } \left| \frac{f(x)-f(\overline{x}_n)}{x-\overline{x}_n}-1\right| _p\ge p^{-2}\ne 0\), a contradiction.

Let us define the function \(g:\mathbb {Z}_p\rightarrow \mathbb {Q}_p\) by:

$$\begin{aligned} g(x)={\left\{ \begin{array}{ll} p^n f(x^\prime ) &{} \text {if } x=p^n+p^{n+1} x^\prime \text { with } n\in {\mathbb {N}} \text { and } x^\prime \in \mathbb {Z}_p,\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Notice that g is well defined since the sets \(B_n:=p^n+p^{n+1}\mathbb {Z}_p\) are pairwise disjoint. (The sets \(B_n\) are the closed balls \(\overline{B}_{p^{-(n+1)}}(p^n)\).) If \(x\in \mathbb {Z}_p\setminus \left( \{0\} \cup \bigcup _{n=1}^\infty B_n\right) \), then there exists an open neighborhood \(U^x\) of x such that g is identically zero on \(U^x\), i.e., g is differentiable at x. Now, as \(g(p^n+p^{n+1}x)=p^n f(x)\) for every \(n\in {\mathbb {N}}\) and \(x\in \mathbb {Z}_p\), and since f is continuous, it is obvious that g is continuous on \(\bigcup _{n=1}^\infty B_n\). Moreover, g is also continuous at 0. To prove it fix \(\varepsilon >0\) and take \(n\in {\mathbb {N}}\) such that \(p^{-n}<\varepsilon \). If \(x\in \mathbb {Z}_p\) is such that \(|x|_p=p^{-n}\), then \(x=x_n p^n+p^{n+1}x^\prime \) with \(x_n\ne 0\). Furthermore,

$$\begin{aligned} |g(0)-g(x)|_p&={\left\{ \begin{array}{ll} |p^n f(x^\prime )|_p &{} \text {if } x_n=1,\\ 0 &{} \text {otherwise}, \end{array}\right. } ={\left\{ \begin{array}{ll} p^{-n}|f(x^\prime )|_p &{} \text {if } x_n=1,\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

Hence, \(|g(0)-g(x)|_p\le p^{-n}<\varepsilon \). Therefore we have proven that g is continuous on \(\mathbb {Z}_p\). Moreover, g is differentiable also on \(\bigcup _{n=1}^\infty (B_n\setminus E_n)\) (with bounded derivative) as f is differentiable on \(\bigcup _{n=1}^\infty (B_n\setminus E_n)\), where \(E_n:=p^n+p^{n+1}E\); and g is not differentiable on \(\bigcup _{n=1}^\infty E_n\) since f is not differentiable on \(\bigcup _{n=1}^\infty E_n\). Notice that once again \(\text {card}(E_n)=\mathfrak {c}\) for every \(n\in {\mathbb {N}}_0\).

Let us prove that \(E_n\) is a Borel set with \(\mu (E_n)=0\) for every \(n\in {\mathbb {N}}\). To do so, let us consider the restricted measure \(\mu _n=p^{n+1}\mu \) on the measurable space \((B_n,{\mathcal {B}}_n)\), where \({\mathcal {B}}_n\) is the \(\sigma \)-algebra of all Borel subsets of \(B_n\). Notice that \({\mathcal {B}}_n=\{B\cap B_n:B\in {\mathcal {B}} \}\) and \((B_n,{\mathcal {B}}_n,\mu _n)\) is a probability space. Define now for every \(i\in {\mathbb {N}}_0\) the random variables \(Y_{n,i}:B_n\rightarrow \{0,1\}\) as follows: for \(x=p^n+p^{n+1}\sum _{i=0}^\infty x_i p^i\in B_n\), we have

$$\begin{aligned} Y_{n,i}(x)={\left\{ \begin{array}{ll} 1 &{} \text {if } (x_{2i},x_{2i+1})=(0,0),\\ 0 &{} \text {if } (x_{2i},x_{2i+1}) \ne (0,0). \end{array}\right. } \end{aligned}$$

Once again the random variables \((Y_{n,i})_{i\in {\mathbb {N}}_0}\) are independent and identically distributed with \(E[Y_{n,i}]=\frac{1}{p^2}\) for every \(i\in {\mathbb {N}}_0\). Thus, the set

$$\begin{aligned}{} & {} \left\{ x=p^n+p^{n+1}\sum _{i=0}^\infty x_i p^i\in B_n :\lim _{m\rightarrow \infty } \frac{\sum _{i=0}^{m-1} Y_{n,i}(x)}{m}= \frac{1}{p} \right\} =\\{} & {} \quad = p^n+p^{n+1}D=:D_{n} \end{aligned}$$

is a full set for \(\mu _n\). By considering for each \(k\in {\mathbb {N}}_0\) the function \(\pi _{n,k}:B_n\rightarrow \mathbb F_p^2\) given by \(\pi _{n,k}(x)=(x_{2k},x_{2k+1})\) for every \(x=p^n+p^{n+1}\sum _{i=0}^\infty x_i p^i\in B_n\) and applying similar arguments as above, we have that \(\pi _{n,k}\) is continuous. Hence \(E_n=\bigcap _{k=0}^\infty \pi _{n,k}(\{(x,y)\in \mathbb F_p^2:(x,y) \ne (0,0) \})\) is once again a Borel set. Furthermore, since \(E_n\subset B_n\setminus D_n\) we have that \(E_n\) is a null set for \(\mu _n\). Thus \(\mu (E_n)=p^{-(n+1)}\mu _n(E_n)=0\) for every \(n\in {\mathbb {N}}\).

Finally let us prove that g is not differentiable at 0. Since every neighborhood containing 0 on \(\mathbb {Z}_p\) contains points x such that \(g(x)=0\), if g were differentiable at 0 then \(g^\prime (0)=0\). Assume that g is differentiable at 0. As \(p^n+p^{n+1}\sum _{i=0}^\infty p^i=p^n \sum _{i=0}^\infty p^i\in B_n\) for every \(n\in {\mathbb {N}}\), we have that

$$\begin{aligned} \left| \frac{g\left( p^n+p^{n+1}\sum _{i=0}^\infty p^i \right) -g(0)}{p^n+p^{n+1}\sum _{i=0}^\infty p^i} \right| _p=\left| \frac{p^n f\left( \sum _{i=0}^\infty p^i \right) }{p^n \sum _{i=0}^\infty p^i} \right| _p=\left| \frac{p^n \sum _{i=0}^\infty p^i}{p^n \sum _{i=0}^\infty p^i} \right| _p=1, \end{aligned}$$

where \(\lim _{n\rightarrow \infty } \left| p^n+p^{n+1}\sum _{i=0}^\infty p^i \right| _p=\lim _{n\rightarrow \infty } p^{-n}=0\), a contradiction.

For every \(N\in {\mathcal {N}}\), let us define \(f_N:\mathbb {Z}_p\rightarrow \mathbb {Q}_p\) by:

$$\begin{aligned} f_N(x)=g(x)\sum _{n\in N} 1_{B_n}(x). \end{aligned}$$

Since \(B_n\cap B_m=\emptyset \) for every distinct \(n,m\in {\mathbb {N}}\), the function \(f_N\) is well defined. Furthermore, since each \(N\in {\mathcal {N}}\) is infinite, we can apply the above arguments to prove that \(f_N\) is continuous and differentiable on a full set for \(\mu \) with bounded derivative but not differentiable on the complement having cardinality \(\mathfrak c\).

It remains to prove that the functions in \(V=\{f_N:N\in {\mathcal {N}} \}\) are linearly independent over \(\mathbb {Q}_p\) and any nonzero linear combination over \(\mathbb {Q}_p\) of the functions in V satisfies the necessary properties. Let \(F:=\sum _{i=1}^k a_i f_{N_i}\), where \(k\in {\mathbb {N}}\), \(a_1,\ldots ,a_k\in \mathbb {Q}_p\), and \(N_1,\ldots ,N_k\in {\mathcal {N}}\) are distinct. We begin by showing the linear independence. Assume that \(F\equiv 0\). Fix \(n\in N_1^1\cap N_2^0\cap \cdots \cap N_k^0\) and take \(x=p^n+p^{n+1}\sum _{i=0}^\infty p^i\in B_n\). Then, \(0=F(x)=a_1 f_{N_1}(x)=a_1 \sum _{i=0}^\infty p^i\) if and only if \(a_1=0\). By repeating the same argument, it is easy to see that \(a_i=0\) for every \(i\in \{1,\ldots ,k \}\). Assume now that \(a_i\ne 0\) for every \(i\in \{1,\ldots ,k \}\). Then F is continuous but also differentiable on

$$\begin{aligned} \Delta :=\mathbb {Z}_p\setminus \left( \{0\}\cup \left( \bigcup _{n\in \bigcup _{i=1}^k N_i} E_n \right) \right) \end{aligned}$$

(with bounded derivative). Applying similar arguments as above, we have that F is not differentiable at 0. Let \(x\in E_n\) with \(n\in \bigcup _{i=1}^k N_i\). We will analyze the differentiability of F at x depending on the values that F takes on \(B_n\). We have two possible cases.

Case 1: If F is identically 0 on \(B_n\), then F is differentiable at x.

Case 2: If F is not identically 0 on \(B_n\), then there exists \(a\in \mathbb {Q}_p\setminus \{0\}\) such that \(F=ag\). Hence F is not differentiable at x since g is not differentiable at x. Notice that Case 2 is always satisfied.

To finish the proof, it is enough to show that \(\Delta \) is a full set for \(\mu \), but this is an immediate consequence of the fact that \(\{0\}\cup \left( \bigcup _{n\in \bigcup _{i=1}^k N_i} E_n \right) \) is the countable union of null sets for \(\mu \) since it implies that

$$\begin{aligned} \mu \left( \{0\}\cup \left( \bigcup _{n\in \bigcup _{i=1}^k N_i} E_n \right) \right) =0. \end{aligned}$$

\(\square \)