-
-
Notifications
You must be signed in to change notification settings - Fork 702
Closed
Description
The ticket stands to improve the AlgebraicConverter in sage.symbolic.expression_converters and make it works with number fields.
As mentioned on ask the following fails
sage: K = QuadraticField(3)
sage: K(sqrt(3))
Traceback (most recent call last):
...
TypeError: ...
The following gives an answer with a wrong parent
sage: x = K(3)**(1/2); x
sqrt(3)
sage: a.parent()
Symbolic Ring
while it is possible to do
sage: y = K(3).sqrt(); y
a
sage: y == K.gen()
True
Finally, we hopefully have
sage: K.gen() == sqrt(3)
sqrt(3) == sqrt(3)
sage: bool(K.gen() == sqrt(3))
True
Component: number fields
Author: Dave Morris
Branch/Commit: a5fc9f9
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/14602