# A residue formula for finite fields

I'm looking for a way to prove the following proposition, which is an exercise from a book about Algebraic Geometric Codes that I'm trying to read:

If $$\mathcal P$$ is a set of $$n$$ points in $$\Bbb F_q$$ (a field with cardinality $$q$$) and $$g_i(x)=\prod_{P_j\in\mathcal P,P_j\neq P_i} (x-P_j)^{-1}$$, then for any polynomial $$f$$ with $$\deg f\leq n-2$$ we have that $$\sum_{P_i\in\mathcal P}f(P_i)g_i(P_i)=0$$

Note that this is somewhat similar to the residue formula over $$\Bbb C$$ in the sense that the function $$g$$ is holomorphic everywhere except for a finite set of points (maybe including the point at infinity in the case of $$\Bbb C$$), and because we may think of the $$i$$'th summand as $$\text{Res}_{P_i}fg$$ where $$g=\prod_{P_i\in\mathcal P}(x-P_i)^{-1}$$

I tried to mimic the residue formula proof for $$\Bbb C$$ but I couldn't make sense of how to cope with the integral along a circle (what is the radius, and how to even translate these points to being inside/outside of a circle).

• "except for a finite set of points" ... There are only finitely many points in $\Bbb{F}_q$. So even if $\mathcal{P} = \Bbb{F}_q$, $g$ is "holomorphic" (whatever that means when there are no complex numbers in sight) "everywhere except for a finite set of points". Of course, every $\Bbb{F}_1 \smallsetminus \mathcal{P}$ is a finite set, so this statement tells us very little. Mar 16, 2021 at 9:41
• Of course. That was meant more for the analogous $\Bbb C$ version, in my case it is kind of moot. Mar 16, 2021 at 9:53
• There appears to a typo somewhere in what you've written. If $\ q=5\$, $\ P_1=0, P_2=1\$, and $\ f(x)\$ is the degree zero polynomial $\ f(x)=2\$, then $\ g(x)=\frac{1}{x(x-1)}\$, and $\ \sum_\limits{i=1}^2f(x)g(x)(x-P_i)=\frac{2}{x-1}+\frac{2}{x}=\frac{2(2x-1)}{x(x-1)}\$. This expression is zero only for $\ x=3\$. It is undefined at $\ x=0\$ and $\ x=1$, and has values $\ 3\$ and $\ 2\$ at $\ x=2\$ and $\ x=4\$ respectively, so not even when it's well-defined is it always zero. Mar 16, 2021 at 11:31
• @lonzaleggiera Thank you, I did make a mistake, I was trying to make this look as similar to the complex version as possible and didn't plug in $P_i$ into $g$. Edited. Mar 16, 2021 at 13:36
• Rather than comparing with Cauchy's integral formula, you may get a lot more mileage comparing with the Lagrange interpolation formula (which observation was only possible once you "plug[ged] $P_i$ into $g$"). However, this is probably not an effective way to make progress. Mar 16, 2021 at 18:51