I need to prove the following result:
For a monic polynomial $f \in \mathbb{F}_{q}[x]$, define $$\phi(f) = \# \left(\dfrac{\mathbb{F}_{q}[x]}{f\mathbb{F}_{q}[x]}\right)^*$$ $$N(f) = \# \left(\dfrac{\mathbb{F}_{q}[x]}{f\mathbb{F}_{q}[x]}\right) = q^{\deg f}.$$ Prove that $$\sum_{g\mid f} \phi(g) = N(f).$$
Well, my intention is to mimic the proof for the Euler totient function for numbers. So firstly I observed that if $\deg f = m$ then the set $A := \dfrac{\mathbb{F}_{q}[x]}{f\mathbb{F}_{q}[x]}$ consists of all polynomials $h$ such that $\deg h \leq m-1$. And $h \in A^*$ iff $\deg h \leq m-1$ and $(h,f) =1$.
Then I defined the set $A_{d} = \{ h \in \mathbb{F}_{q}[x] \mid \deg h \leq m-1$ and $ (h,f)=d \}$ for $d$ dividing $f$, which is clearly a subset of $A$. My intention was to prove that the cardinality of $A_{d}$ equals the cardinality of $\left(\dfrac{\mathbb{F}_{q}[x]}{\frac fd\mathbb{F}_{q}[x]}\right)^* = \phi(f/d)$, and then since $A_{d}$ and $A_{h}$ are disjoint if $d \neq h$, we can conclude the result. But I'm not sure. Actually I don't think that my set $A_{d}$ has the same cardinality as $\left(\dfrac{\mathbb{F}_{q}[x]}{\frac fd\mathbb{F}_{q}[x]}\right)^*$. Could someone help me?