File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
src/sage/rings/number_field Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -204,8 +204,6 @@ def _from_absolute_ideal(self, id):
204
204
r"""
205
205
Convert the absolute ideal id to a relative number field ideal.
206
206
207
- Assumes id.number_field() == self.absolute_field('a').
208
-
209
207
WARNING: This is an internal helper function.
210
208
211
209
TESTS::
@@ -218,18 +216,18 @@ def _from_absolute_ideal(self, id):
218
216
True
219
217
sage: J.absolute_norm()
220
218
22584817
221
- sage: J.absolute_ideal()
222
- Fractional ideal (22584817, -1473/812911*a^5 + 8695/4877466*a^4 - 1308209/4877466*a^3 + 117415/443406*a^2 - 22963264/2438733*a - 13721081784272/2438733)
223
- sage: J.absolute_ideal().norm()
219
+ sage: Labs.<c> = L.absolute_field(); Labs # random (polynomial not unique)
220
+ Number Field in c with defining polynomial x^6 + 217*x^4 - 2*x^3 + 15127*x^2 + 422*x + 338032
221
+ sage: Jabs = J.absolute_ideal(names='c')
222
+ sage: Jabs == Labs.ideal(22584817, -1473/812911*c^5 + 8695/4877466*c^4 - 1308209/4877466*c^3 + 117415/443406*c^2 - 22963264/2438733*c - 13721081784272/2438733)
223
+ True
224
+ sage: Jabs.norm()
224
225
22584817
225
-
226
- sage: J._from_absolute_ideal(J.absolute_ideal()) == J
226
+ sage: J._from_absolute_ideal(Jabs) == J
227
227
True
228
228
"""
229
- L = self .number_field ()
230
- K = L .absolute_field ('a' )
231
- to_L = K .structure ()[0 ]
232
- return L .ideal ([to_L (_ ) for _ in id .gens ()])
229
+ f , _ = id .number_field ().structure ()
230
+ return self .number_field ().ideal ([f (_ ) for _ in id .gens ()])
233
231
234
232
def free_module (self ):
235
233
r"""
You can’t perform that action at this time.
0 commit comments