Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I do not see what is your question. But just in case, the method lagrange_polynomial works for polynomials over finite fields as well. For instance with random chosen points:

sage: F = GF(17)
sage: points = [(F.random_element(), F.random_element()) for _ in range(3)]
sage: points # check that we don't have two evaluations for a same point!
[(15, 11), (5, 10), (8, 7)]
sage: R = F['x']
sage: R.lagrange_polynomial(points)
14*x^2 + 4*x + 14

If the question is about the algorithm to perform such a computation, note that the definition of the Lagrange polynomial perfectly works over finite fields, so that there is no special difficulty.