# A generalization of the Euler Phi function

Let $R$ be a Dedekind domain and $f\in R$ a nonzero element. Then $(f)$ admits a unique factorization into prime ideals $(f)=P_1^{e_1}\cdots P_k^{e_k}$. Our definition for the generalization of the Euler Phi function will rely on this decomposition.

Definition 1: In the situation above, we define $\phi_R(f)=\# R/(f)^\times$ to be the Phi function of $R$.

This phi function satisfies a multiplicative property much as the original does. To see this, let $P,Q$ be two distinct nonzero prime ideals. Since $P,Q$ are nonzero prime ideals of a Dedekind domain, they are both maximal, and we have $P+Q=R$. Further, we have $r(P^e+Q^f)=r(r(P^e)+r(Q^f))=r(P+Q)=r(R)=R$. By the Chinese remainder theorem this gives an isomorphism $R/P^eQ^f\cong R/P^e\times R/Q^f$ and thus $(R/P^eQ^f)^\times \cong (R/P^e\times R/Q^f)^\times$. Putting this all together shows to give a complete calculation of $\phi_R$ it suffices to give a calculation of $\#R/P^e$ for every prime ideal $P$ and every power $e$. The feasibility of this task is probably hopeless in general. However, for integers of the fields $\mathbb{Q}$ and $\mathbb{F}_q(t)$ there is a complete description of this function.

Proposition 2: (The Euler Phi) We have the following formulas for $\mathbb{Z}$:

1. $\phi_\mathbb{Z}(p)= p-1$ when $p$ is prime
2. $\phi_\mathbb{Z}(p^m)=p^m-p^{m-1}$ for any $m\geq 1$ and $p$ prime
3. $\phi_\mathbb{Z}(n)=n\prod\limits_{p\mid n} (1-\frac{1}{p})$.

Proposition 3: Similarly, we have the following formulas for $\mathbb{F}_q[t]$:

1. $\phi_{\mathbb{F}_q[t]}(f)=q^d-1$ when $f$ is irreducible of degree $d$
2. $\phi_{\mathbb{F}_q[t]}(f^m)=q^{md}-q^{md-d}$ for any $m\geq 1$ and $f$ irreducible of degree $d$
3. $\phi_{\mathbb{F}_q[t]}(g)=q^{\text{deg}(g)}\prod\limits_{f\mid g} (1-\frac{1}{q^\text{deg}(f)})$.

The proof for proposition 2 is pretty standard in elementary number theory texts and the proof for proposition 3 follows essentially these same arguments so they are omitted. In fact, I’m including them so I can remember this problem in the future (and it took me longer than I would like to admit to show property 2 of proposition 3 – and no effort should be wasted). In the future, if I find formulas for the Phi function of other Dedekind domains, I will include them here.