Interpolation of a rational function Assume I am given two polynomials $f(x)$ and $g(x)$ with coefficients from a field $\mathbb{F}_p$, where $p$ is a prime.
Now I know that the set of these polynomials is a ring and not a field, meaning that not every polynomial has an inverse.
However, as I understood from a paper that I am reading the following is always possible:
Given evaluation points $f(\alpha_1), g(\alpha_1), f(\alpha_2), g(\alpha_2), \dots$ for some distinct values $\alpha_i$, one can first compute evaluation points $h(\alpha_i) := f(\alpha_i)/g(\alpha_i)$ and then interpolate the polynomial $h(x) = f(x)/g(x)$ from them such that the interpolated polynomial $h$ contains the correct roots in the numerator and denominator.
For example if the polynomial f has roots $a, b, c$ and $g$ has roots $b$, $c$, and $d$, then the interpolated rational function $h$ will have a numerator with the root $a$ and the denominator will have the root $d$.
My confusion stems from the fact that $g(x)$ may not have an inverse, yet we can interpolate a polynomial $1/g(x)$, which is basically an inverse or not?
P.S. In case it helps, I only care about polynomials of the form $f(x) = (x-a_1)(x-a_2)...x(a_k)$, where for all $i \neq j$ it holds that $a_i \neq a_j$.
 A: 
a field $\mathbb{F}_p$, where $p$ is a prime.

In the paper $p$ is not necessarily a prime, see the last paragraph of Section 3.1. “For the rest of the paper we will interpret all bitstrings as elements of $\mathbb{F}_q$, without specifying a choice of $q$”.

Given evaluation points $f(\alpha_1), g(\alpha_1), f(\alpha_2), g(\alpha_2), \dots$ for some distinct values $\alpha_i$, one can first compute evaluation points $h(\alpha_i) := f(\alpha_i)/g(\alpha_i)$ and then interpolate the polynomial $h(x) = f(x)/g(x)$ from them such that the interpolated polynomial $h$ contains the correct roots in the numerator and denominator....
My confusion stems from the fact that $g(x)$ may not have an inverse, yet we can interpolate a polynomial $1/g(x)$, which is basically an inverse or not?

I guess you are speaking about Theorems 4.1 and B.1. They deal with rational functions $f=P/Q$, which are more general than polynomials $P$. Given a support set $\{(k_i,r_i)\}$ such that $f(k_i)=r_i$ for each $i$ we don’t interpolate $f$ as a polynomial, we recover it. For zeroes of $Q$ are provided tagged values, see Section 4.3. Theorem B.1 is parallel to Theorem 4.1 and assures that under the given conditions we indeed can recover $f$, that is reconstruct $P$ and $Q$ uniquely from a support set for $f$.
