@@ -1117,57 +1117,13 @@ cdef class pAdicGenericElement(LocalGenericElement):
11171117 extdeg = parent. absolute_degree( ) // ( base. absolute_degree( ) * polydeg)
11181118 return -extdeg * poly[polydeg-1 ]
11191119
1120- def algdep( self, n) :
1121- """
1122- Return a polynomial of degree at most `n` which is approximately
1123- satisfied by this number. Note that the returned polynomial need not be
1124- irreducible, and indeed usually won't be if this number is a good
1125- approximation to an algebraic number of degree less than `n`.
1126-
1127- ALGORITHM: Uses the PARI C-library :pari:`algdep` command.
1128-
1129- INPUT:
1130-
1131- - ``self`` -- a `p`-adic element
1132- - ``n`` -- integer
1133-
1134- OUTPUT: polynomial; degree `n` polynomial approximately satisfied by ``self``
1135-
1136- EXAMPLES::
1137-
1138- sage: K = Qp( 3,20,'capped-rel','series') ; R = Zp( 3,20,'capped-rel','series')
1139- sage: a = K( 7/19) ; a
1140- 1 + 2* 3 + 3^ 2 + 3^ 3 + 2* 3^ 4 + 2* 3^ 5 + 3^ 8 + 2* 3^ 9 + 3^ 11 + 3^ 12
1141- + 2* 3^ 15 + 2* 3^ 16 + 3^ 17 + 2* 3^ 19 + O( 3^ 20)
1142- sage: a. algdep( 1)
1143- 19* x - 7
1144- sage: K2 = Qp( 7,20,'capped-rel')
1145- sage: b = K2. zeta( ) ; b. algdep( 2)
1146- x^ 2 - x + 1
1147- sage: K2 = Qp( 11,20,'capped-rel')
1148- sage: b = K2. zeta( ) ; b. algdep( 4)
1149- x^ 4 - x^ 3 + x^ 2 - x + 1
1150- sage: a = R( 7/19) ; a
1151- 1 + 2* 3 + 3^ 2 + 3^ 3 + 2* 3^ 4 + 2* 3^ 5 + 3^ 8 + 2* 3^ 9 + 3^ 11 + 3^ 12
1152- + 2* 3^ 15 + 2* 3^ 16 + 3^ 17 + 2* 3^ 19 + O( 3^ 20)
1153- sage: a. algdep( 1)
1154- 19* x - 7
1155- sage: R2 = Zp( 7,20,'capped-rel')
1156- sage: b = R2. zeta( ) ; b. algdep( 2)
1157- x^ 2 - x + 1
1158- sage: R2 = Zp( 11,20,'capped-rel')
1159- sage: b = R2. zeta( ) ; b. algdep( 4)
1160- x^ 4 - x^ 3 + x^ 2 - x + 1
1161- """
1162- # TODO: figure out if this works for extension rings. If not, move this to padic_base_generic_element.
1163- from sage. arith. misc import algdep
1164- return algdep( self, n)
1165-
11661120 def algebraic_dependency( self, n) :
11671121 """
11681122 Return a polynomial of degree at most `n` which is approximately
1169- satisfied by this number. Note that the returned polynomial need not
1170- be irreducible, and indeed usually won't be if this number is a good
1123+ satisfied by this number.
1124+
1125+ Note that the returned polynomial need not be irreducible, and
1126+ indeed usually will not be if this number is a good
11711127 approximation to an algebraic number of degree less than `n`.
11721128
11731129 ALGORITHM: Uses the PARI C-library :pari:`algdep` command.
@@ -1177,7 +1133,9 @@ cdef class pAdicGenericElement(LocalGenericElement):
11771133 - ``self`` -- a `p`-adic element
11781134 - ``n`` -- integer
11791135
1180- OUTPUT: polynomial; degree `n` polynomial approximately satisfied by ``self``
1136+ OUTPUT:
1137+
1138+ polynomial; degree `n` polynomial approximately satisfied by ``self``
11811139
11821140 EXAMPLES::
11831141
@@ -1205,7 +1163,12 @@ cdef class pAdicGenericElement(LocalGenericElement):
12051163 sage: b = R2. zeta( ) ; b. algebraic_dependency( 4)
12061164 x^ 4 - x^ 3 + x^ 2 - x + 1
12071165 """
1208- return self. algdep( n)
1166+ # TODO: figure out if this works for extension rings.
1167+ # If not, move this to padic_base_generic_element.
1168+ from sage. arith. misc import algebraic_dependency
1169+ return algebraic_dependency( self, n)
1170+
1171+ algdep = algebraic_dependency
12091172
12101173 #def exp_artin_hasse( self) :
12111174 # """
0 commit comments