The following code reduces an elliptic curve defined over Qp or Zp to the residue field. Currently it doesn't work for extensions of p-adics due to a coercion problem in p-adics.

{{{id=1| def pAdic_reduction(self): OK = E.base_ring().integer_ring() Fv = OK.residue_field() return self.change_ring(Fv) /// }}} {{{id=3| F = pAdicField(5); E = EllipticCurve(F,[1,2,3,4,5]); pAdic_reduction(E) /// Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 4*x over Finite Field of size 5 }}} {{{id=6| EEE = EllipticCurve([1,2,3,4,5]); EEE /// Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field }}} {{{id=5| EEE = EllipticCurve([1,2,3,4,5]); EEE /// Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field }}} {{{id=12| /// }}}