Curves sharing points over finite fields, and their mutual divisibility Consider in $\mathbb{A}^2(\mathbb{F}_q)$ two $\mathbb{F}_q$-rational curves $\mathcal{X}:f(x,y)=0$ and  $\mathcal{Y}:g(x,y)=0$, and let $\mathcal{Y}$ be absolutely irreducible. Suppose also that $\emptyset\ne \{P\in\mathbb{A}^2(\mathbb{F}_q)\,:\,g(P)=0\}=V(g)\subseteq V(f)$, i.e. all the $\mathbb{F}_q$-rational points of $\mathcal{Y}$ also belong to $\mathcal{X}$.
When is it possible to say that $g(x,y)$ divides $f(x,y)$ ($\mathcal{Y}$ is a component of $\mathcal{X}$)?
I already known from Bézout theorem (applying it in the projective plane defined over the algebraic closure of $\mathbb{F}_q$) that this holds when the number of $\mathbb{F}_q$-rational points of $\mathcal{Y}$ strictly lower than $\deg(f)\cdot\deg(g)$. Do there exist some other (less restrictive?) conditions for making this happen?
Example: Take $\mathbb{F}_q$ as a field of characteristic $p\ge 5$ and consider $\mathcal{Y}$ as an elliptic curve defined by its Weierstrass equation, i.e. $g(x,y)=y^2-x^3-ax-b$ for given $a,b\in\mathbb{F}_q$, having $N:=|\mathcal{Y}(\mathbb{F}_q)|$ $\mathbb{F}_q$-rational points. We also know from Hasse bound that $|N-(q+1)|\le 2\sqrt{q}$.
If I have another curve $\mathcal{X}:f(x,y)=0$ which annihilates on all those $N$ points, is it possible to say that $y^2-x^3-ax-b\, |\, f(x,y)$ when $N\le 3\cdot \deg(f)$?
 A: If $N = 3 \cdot \deg (f)$ and $\mathcal Y$ has exactly one two-torsion point, you can conclude that $\mathcal Y$ is a component of $\mathcal X$.
This is because Bezout's theorem implies that, if $\mathcal Y$ is not a component of $\mathcal X$, all the multiplicities are $1$, so the sum of all the $\mathbb F_q$-points in $\mathcal Y$ equals the class of $\mathcal X$ in the group of line bundles on $\mathcal Y$, which after shifting both sides to degree $0$ by subtracting a suitable multiple of the point at infinity, gives an identity in the group law of $\mathcal Y$. The class of $\mathcal X$ is always the identity because $\mathcal O(\deg(f))$ has a section vanishing only at $\infty$, but if $\mathcal Y$ has a single $2$-torsion point, the sum of all the points of $\mathcal Y$ is that $2$-torsion point.
However, that is the only improvement. If $3d > N$ or $3d=N$ and $\mathcal Y$ has zero or three $2$-torsion points, then such an $f$ always exists. To check this, first find a nonzero section of $H^0 ( \mathcal Y, \mathcal O(d))$ vanishing at all the $\mathbb F_q$-points. For example, we can choose it to vanish to order $1$ at every $\mathbb F_q$-point except to order $2$ at the unique $2$-torsion point if one exists and to order $3d+1-N$ or $3d-N$ at the point at $\infty$ depending on if the $2$-torsion point exists. Then use the exact sequence
$$ H^0 ( \mathbb P^2, \mathcal O(d)) \to H^0 ( \mathcal Y, \mathcal O(d)) \to H^1 ( \mathcal P^2 , \mathcal O(d-3))  $$ and the vanishing of $ H^1 ( \mathcal P^2 , \mathcal O(d-3))$ to lift your chosen section to a section $f \in H^0 ( \mathbb P^2, \mathcal O(d)) $. The vanishing set of $f$ will not contain $\mathcal Y$ because we chose $f$ to be nonzero on $\mathcal Y$.
For higher genus curves, we can use Riemann-Roch to guarantee a section vanishing on all the $\mathbb F_q$-points, which if $\mathcal Y$ is smooth of genus $g$ and degree $e$, guarantees the existence of $f$ of degree $d$ whenever $d e \geq N + g$.
