def _convert_map_from_(self, R): """ Finds conversion maps from R to this ring. EXAMPLES:: sage: QpFP(7).convert_map_from(Zmod(343)) Lifting morphism: From: Ring of integers modulo 343 To: 7-adic Field with floating precision 20 """ from sage.rings.finite_rings.integer_mod_ring import IntegerModRing_generic if isinstance(R, IntegerModRing_generic): N = R.cardinality() p = self.prime() n = N.exact_log(p) if N == p**n: from sage.rings.padics.padic_generic import ResidueLiftingMap return ResidueLiftingMap._create_(R, self)
def _convert_map_from_(self, R): """ Finds conversion maps from R to this ring. EXAMPLES:: sage: QpFP(7).convert_map_from(Zmod(343)) Lifting morphism: From: Ring of integers modulo 343 To: 7-adic Field with floating precision 20 """ from sage.rings.finite_rings.integer_mod_ring import IntegerModRing_generic if isinstance(R, IntegerModRing_generic): N = R.cardinality() p = self.prime() n = N.exact_log(p) if N == p**n: from sage.rings.padics.padic_generic import ResidueLiftingMap return ResidueLiftingMap._create_(R, self)