“…Remark 5.20 For primes p | D where f has good reduction we can compute the Cartier-Manin matrix directly from its definition, but we can more efficiently treat p * 4 (f ) by simply applying Algorithm 5.16 to the nondegenerate reduction of f modulo p. In our implementation we do the same for good primes p | * 4 (f ) greater than 3 by applying a random linear transformation to the reduction of f modulo p until we obtain a nondegenerate polynomial f ∈ F p [x 0 , x 1 , x 2 ] that defines an isomorphic curve. For p > 3 such a nondegenerate polynomial is guaranteed to exist by Proposition 3.2 of [7], and in practice we can find one quickly. Note that we have assumed f (x 0 , x 1 , x 2 ) = 0 is a model for X that is smooth a p, but if not, replace f modulo p with the reduction of a model for X that is smooth at p. Before describing our average polynomial-time algorithms to compute A p for p N coprime to D, we briefly recall some background material on remainder trees and forests.…”