8
$\begingroup$

This was a problem I came up with a while ago. The idea is to consider functions $f:\mathbb{Z}/n\mathbb{Z}\to\mathbb{Z}/n\mathbb{Z}$ that satisfy $f(xy)=xf(y)+yf(x)$ for all $x,y\in\mathbb{Z}/n\mathbb{Z}$ (this is similar to the Leibniz rule for the derivative of a product). The goal is for any $n$, determine the number of such functions that satisfy this property.


Case when n is prime

Of course there is the trivial $f$ that maps everything to $0$. It can be shown that when $n$ is prime that this is the only such function. To do this, first note that by induction we have that every function satisfying this property must also satisfy the power rule i.e. $f(x^m)=mx^{m-1}f(x)$ for integers $m\geq 0$. So for any $x\neq 0$ we must have that since $x^n\equiv x\mod n$ it must be the case that $f(x)=f(x^n)=nx^{n-1}f(x)=0$ (arithmetic done in $\mathbb{Z}/n\mathbb{Z}$). And then it's easy to see that $f(0)=0$.


Case when n=8

Unfortunately, this is about as far as I can get mathematically. Through a somewhat tedious argument, I was able to write out a solution that characterizes all such functions when $n=8$. I'll omit the argument but the result is that there are $16$ such functions, and they can be constructed by forcing $f(0)=0, f(1)=0$. The pair $(f(2),f(6))$ can come from any of the four $\{(0,0),(2,6),(4,4),(6,2)\}$. The triplet $(f(3),f(5),f(7))$ can come from any of the four $\{(0,0,0),(0,4,4),(4,0,4),(4,4,0)\}$. And these choices are independent of each other resulting in $4\times 4=16$ choices.


Simulation results for general n

For general $n$, one can also think of $f$ as a vector of $n$ entries in $\mathbb{Z}/n\mathbb{Z}$ and hence the requirement that $f(xy)-xf(y)-yf(x)=0$ for all $x,y\in\mathbb{Z}/n\mathbb{Z}$ is a system of $n^2$ linear equations. I wrote a (long, barely documented, and also barely comprehensible to me) computer program to attempt to do some form of RREF (my friends say it could be related to Smith normal form) and in general I notice the pattern that if $n$ has prime factorization $\prod p_i^{e_i}$ where $e_i\geq 1$ then the number of such functions will be $\prod p_i^{2e_i-2}$. I have confirmed this pattern for $n=4,8,16,32,64,128,9,27,81,243,5,25,125,6,12$. I can post the code if people are interested, but again I don't really remember how exactly it works. I was wondering if anyone had ideas for how to go about proving this.

I wasn't able to find much on the internet about this. When making the problem I was inspired by the idea of the formal derivative on rings, but unfortunately this means every google search I make will be about that and not what I'm interested in.

$\endgroup$
5
  • $\begingroup$ I wrote that formula $\prod p_i^{e_i}\mapsto \prod p_i^{2e_i-2}$ works for the specific values of $n$ that I tested. There are $4$ functions for $n=4$ and $1$ for $n=6$. $\endgroup$ Commented Apr 15 at 17:23
  • $\begingroup$ Setting $x=y=0$ shows that $f(0)=0$. Setting $x=y=1$ shows that $f(1)=0$. Using Carmichael's function $\lambda(n)$ and the factorization height $h(n)$, we have $$x^{h+\lambda}=x^h\pmod n$$ for all $x$ (including e.g. $x=0$ or a factor of $n$). Then $$f(x^{h+\lambda})=f(x^h)$$ $$(h+\lambda)x^{h+\lambda-1}f(x)=hx^{h-1}f(x)$$ $$\Big((h+\lambda)x^\lambda-h\Big)x^{h-1}f(x)=0$$ $\endgroup$ Commented Apr 16 at 1:14
  • $\begingroup$ @mr_e_man how is factorization height defined? $\endgroup$ Commented Apr 16 at 1:31
  • $\begingroup$ $h(n)$ is the largest exponent in the prime factorization of $n$. $\endgroup$ Commented Apr 16 at 1:33
  • $\begingroup$ Another idea is to use the Chinese Remainder Theorem somehow, if you're splitting $n$ into prime powers. $\endgroup$ Commented Apr 16 at 2:06

1 Answer 1

4
$\begingroup$

Because you didn't assume additivity, intuitions from derivations or Kahler differentials are completely destroyed. Note that all functions from a commutative ring $R$ to itself that satisfies the Leibniz rule form a $R$-module, but I don't know how to apply this yet. Nonetheless, your formula can be shown to be correct after some messy work.

In order to apply Chinese Remainder Theorem, we show $f$ respects factorization with the following easy observations:

  • If $I$ is an ideal of a ring $R$, then $f(I\cdot I)\subset I$ (where $I\cdot I = \{xy:\forall x, y\in I\}$, not necessarily the ideal $I^2$ generated by $I\cdot I$.)

  • If $i\in R$ is an idempotent, then $f(iR)\subset iR$. (By letting $I=(iR)$ in the above.)

Therefore any $f$ on $\mathbb Z/n\mathbb Z\simeq \prod_{i}\mathbb Z/p_i^{e^i}\mathbb Z$ must send each ideal $Z/p_i^{e_i}\mathbb Z$ to itself. Now it suffices to assume $n=p^e$ is a prime power.

Edit. There is indeed a gap in the above argument. To illustrate, let's consider $R=A\times B$ instead, we have shown that $f(A\times\{0\})\subset A\times\{0\}$ and $f(\{0\}\times B)\subset \{0\}\times B$, but this doesn't prove $f(x,y)=f(x,0)+f(0,y)$, so that $f$ can be constructed componentwisely. I was implicitly assuming $f$ is additive. To fix this, note that for any idempotent $i$, $f(i)=0$. Indeed $$\begin{align}f(i)=f(i^2)=2if(i)&\Rightarrow i f(i) = i (2if(i))\\ &\Rightarrow i f(i)= 2i f(i)\Rightarrow if(i)=0\\ &\Rightarrow f(i)=2if(i)=0\end{align}$$ Therefore in the case $R=A\times B$, $f(1,0)=f(0,1)=0$. And we also have $f(xy)=xf(y)$ as long as $f(x)=0$, hence $$\begin{align}f(x,y)& =(1,1)\cdot f(x,y) \\ &= (1,0)f(x,y)+(0,1)f(x,y)\\ &=f((1,0)(x,y))+f((0,1)(x,y))\\ &=f(x,0)+f(0,y)\end{align}$$


When $p$ is odd, $(\mathbb Z/p^e\mathbb Z)^{\times}$ is cyclic, and let $r$ be a generator (this is the only place where $p$ being odd is used). We claim

  • Leibniz rule implies both $p\mid f(r)$ and $p\mid f(p)$

By letting $x=y=1$ in the Leibniz rule, we get $f(1)=0$. As $r^n=1$ for $n=\phi(p^e)=p^e-p^{e-1}$, we have $0=f(1)=f(r^n)=nr^{n-1}f(r)$. Note that $p^{e-1}\mid\mid n, p\nmid r$, we must have $p\mid f(r)$.

To show $p\mid f(p)$ a bit tricky, indeed if we follow the above method, through $0=f(0)=f(p^e)=ep^{e-1}f(p)$ we may only conclude $p\mid e$ or $p\mid f(p)$. To get $p\mid f(p)$ (in the case of $p\mid e$, but the following argument doesn't need this assumption), we have to combine $r$ and $p$. Let $r^a=1+p^{e-1}$, that is $r^a\equiv 1\mod p^{e-1}$, since $r$ is also a primitive root mod $p^{e-1}$, there must be $\phi(p^{e-1})\mid a$ hence $p^{e-2}\mid a$.

$$f(p)=f((1+p^{e-1})p)=f(r^ap)=r^af(p)+ar^{a-1}f(r)p$$

Note that we have $p^{e-1}\mid a$ and $p\mid f(r)$ combined imply the second term of the RHS must be $0$. Therefore

$$f(p)=r^af(p)=(1+p^{e-1})f(p)\Rightarrow p^{e-1}f(p)=0\Rightarrow p\mid f(p)$$


Next we show the "opposite" also holds:

  • Given $x, y\in p(\mathbb Z/p^e\mathbb Z)$, there exists a unique $f$ such that $f(r)=x, f(p)=y$.

The uniqueness is easy, as every element $s$ can be written as $r^mp^n$, so

$$\begin{align}f(r^mp^n)&=f(r^m)p^n+r^mf(p^n)\\ &=p^nmr^{m-1}f(r) + np^{n-1}r^mf(p)\end{align}$$

To show existence, we would like to define $f(r^mp^n)$ by the above formula. And we can check that the above formula indeed constructs a $f$ that satisfies the Leibniz rule (straightforward and skipped). But wait a sec, where have we used $p\mid f(r), p\mid f(p)$? Well, the problem is elements may not have a unique factorization of the form $r^mp^n$, so we need to show $f(r^mp^n)=p^nmr^{m-1}f(r) + np^{n-1}r^mf(p)$ is well-defined, that is the RHS only depends on $r^mp^n$, not specific $m, n$.

Let $s=r^{m_1}p^{n_1}=r^{m_2}p^{n_2}$, if $s=0$, then $n_1, n_2\ge e$, it's easy to check the RHS is zero in both cases, so it doesn't depend on the choice of $m, n$. If $s\not=0$, we must have $n_1=n_2$, and shall use $n$ to replace them. We are left to show

$$p^nm_1r^{m_1-1} f(r) + r^{m_1} n p^{n-1} f(p) = p^nm_2r^{m_2-1} f(r) + r^{m_2} n p^{n-1} f(p)$$

Indeed, since $p\mid f(p)$, we can write $f(p)=p\alpha$, so $r^{m_1} p^{n-1} f(p)= r^{m_1}p^n \alpha = s \alpha$. This proves the second terms on both sides are equal to $ns\alpha$. We're left to show

$$\begin{align}p^n m_1 r^{m_1-1} f(r) = p^n m_2 r^{m_2-1} f(r) &\Leftrightarrow p^n m_1 r^{m_1} f(r) = p^n m_2 r^{m_2} f(r) \\ &\Leftrightarrow m_1 s f(r) = m_2 s f(r) \\ &\Leftrightarrow sf(r)(m_1-m_2)=0 \\ &\Leftrightarrow p^{e-n}\mid f(r)(m_1-m_2) \\ &\Leftarrow p^{e-n-1} \mid m_1-m_2\end{align}$$

To show the last expression, $$\begin{align} r^{m_1}p^n=r^{m_2}p^n &\Leftrightarrow r^{m_1-m_2}p^n=p^n\\ &\Leftrightarrow (r^{m_1-m_2}-1)p^n=0 \\ &\Leftrightarrow p^{e-n}\mid r^{m_1-m_2}-1\end{align}$$

Again, $r^{m_1-m_2}\equiv 1$ mod $p^{e-n}$ implies $\phi(p^{e-n})\mid m_1-m_2$, hence $p^{e-n-1}\mid m_1-m_2$.


How about $p=2$? If $e\le 2$, then $(\mathbb Z/2^e\mathbb Z)^*$ is still cyclic so the above argument works. If $e\ge 3$, $(\mathbb Z/2^e\mathbb Z)^*=\langle-1, 3\rangle\simeq(\mathbb Z/2\mathbb Z)\oplus(\mathbb Z/2^{e-2}\mathbb Z)$, and with similar technique, we should be able to show,

  • $\forall x,y,z\in\mathbb Z/2^e\mathbb Z$, there exists a unique $f$ such that $f(-1)=x, f(3)=y, f(2)=z$ iff $$\begin{cases}x\in 2^{e-1}(\mathbb Z/2^e\mathbb Z)=\{\overline{0}, \overline{2^{e-1}}\} \\ y\in 4(\mathbb Z/2^e\mathbb Z) \\ z\in 2(\mathbb Z/2^e\mathbb Z)\end{cases}$$

So in total, there are exactly $2\cdot \frac{2^e}{4}\cdot \frac{2^e}{2}=2^{2e-2}$ functions that satisfy the Leibniz rule.

$\endgroup$
7
  • $\begingroup$ Is it a problem that $\mathbb{Z}/p_i^{e_i}\mathbb{Z}$ isn't actually an ideal of $\mathbb{Z}/n\mathbb{Z}$? I'm struggling a bit to wrap my head around the fact that you've applied a ring homomorphism $\phi$ to map $\mathbb{Z}/n\mathbb{Z}$ to $\prod\mathbb{Z}/p_i^{e_i}\mathbb{Z}$ and now are working with $f$ on this codomain. I'm not sure yet if this is a problem, but any elaboration would be appreciated. $\endgroup$ Commented Apr 17 at 12:31
  • $\begingroup$ Also I'm not here yet, but another part on my mind is just because the $f$ you've found satisfies the leibniz rule on each of those ideals, does that necessarily mean that the $f$ you've found also satisfies the leibniz rule when $x,y$ are taken from different ideals? I think it should be fine because CRT, but I'm not entirely sure if this is a problem. $\endgroup$ Commented Apr 17 at 12:33
  • 1
    $\begingroup$ @AlanAbraham I suppressed the notation a bit. I mean $I_i=\{0\}\times\cdots\{0\}\times\mathbb Z/p_i^{e_i}\times\{0\}\times\cdots\times\{0\}$ is an ideal of $\prod_i \mathbb Z/(p_i^{e_i})$ that is generated by an idempotent. Now to think of $f:I_i\rightarrow I_i$, whether $I_i$ is considered as a ring or an ideal is irrelevant, because only addition and multiplication within itslef matters. $\mathbb Z/n$ to $\prod \mathbb Z/p_i^{e_i}$ is not just a ring homomorphism, but an isomorphism, so every function on either can be translated to one on the other and all ring theoretical properties survive $\endgroup$ Commented Apr 17 at 15:38
  • $\begingroup$ @AlanAbraham Maybe the general idea of Transport of Structure helps (In this case, one can "transfer" a "Leibniz function" to another isomorphic object). As for why $f$ would satisfies Leibniz, you should be able to show if $f: A\rightarrow A$ and $g:B\rightarrow B$ both satisfy Leibniz, then so does $f\times g$ on $A\times B$. The key here is $xy=0$ for $x,y$ from distinct ideals $A, B$ separately. $\endgroup$ Commented Apr 17 at 15:46
  • 2
    $\begingroup$ @AlanAbraham While it is indeed not an issue if we have $(x,0), (0, y)$ from different ideals as I have mentioned, there is still a problem on how to deal with $(x,1)$ and $(1,y)$ or more generally $(x,y)$. I fixed the gap in new edit. $\endgroup$ Commented Apr 18 at 5:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.