Open mezzarobba opened 2 years ago
Description changed:
---
+++
@@ -50,4 +50,7 @@
sage: a.as_number_field_element()
-My is that `number_field_elements_from_algebraic()` essentially converts `a` from an `ANExtensionElement` to an `ANRoot` `exact_generator`. Then the minimal polynomial is evaluated on the `ANRoot` to check that the embedding being set up makes sense. (Is it necessary to perform this check at all, in this context?) The evaluation results in an expression tree that is exactified to check that it is zero—which would have been obvious if the evaluation point has been kept in `ANExtensionElement` form.
+
+My understanding is that `number_field_elements_from_algebraic()` essentially converts `a` from an `ANExtensionElement` to an `ANRoot` `exact_generator`. Then the minimal polynomial is evaluated on the `ANRoot` to check that the embedding being set up makes sense. (Is it necessary to perform this check at all, in this context?) The evaluation results in an expression tree that is `exactify()`ed to check that it is zero—which would have been obvious if the evaluation point has been kept in `ANExtensionElement` form.
+
+Even then, exactifying an expression of the form pol(a) where pol ∈ ℚ[x] should be easy once a is exactified, and exactifying an `ANRoot` defined over ℚ (by an irreducible polynomial, in our case) should be easy... See #33810 about that part.
number_field_elements_from_algebraics()
also seems to waste a lot of time trying to decide if the number(s) to be converted are real.
Description changed:
---
+++
@@ -2,39 +2,48 @@
sage: P.
We can check that internally, `a` is represented as a number field element, and `a.exactify()` has nothing to do:
Somehow this is fast now.
Consider:
We can check that internally,
a
is represented as a number field element, anda.exactify()
has nothing to do:However, this does not finish in reasonable time:
My understanding is that
number_field_elements_from_algebraic()
essentially convertsa
from anANExtensionElement
to anANRoot
exact_generator
. Then the minimal polynomial is evaluated on theANRoot
to check that the embedding being set up makes sense. (Is it necessary to perform this check at all, in this context?) The evaluation results in an expression tree that isexactify()
ed to check that it is zero—which would have been obvious if the evaluation point has been kept inANExtensionElement
form.Even then, exactifying an expression of the form pol(a) where pol ∈ ℚ[x] should be easy once a is exactified, and exactifying an
ANRoot
defined over ℚ (by an irreducible polynomial, in our case) should be easy... See #33810 about that part.CC: @mwageringel @jplab @videlec @slel
Component: number fields
Issue created by migration from https://trac.sagemath.org/ticket/33811