from sage.misc.table import table
from sage.modules.free_module import FreeModule, VectorSpace
from sage.rings.integer_ring import ZZ
-from sage.rings.number_field.number_field import NumberField, QuadraticField
+from sage.rings.number_field.number_field import QuadraticField
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.rational_field import QQ
from sage.rings.real_lazy import CLF, RLF
z = R.gen()
p = z**2 - 2
if p.is_irreducible():
- field = NumberField(p, 'sqrt2', embedding=RLF(2).sqrt())
+ field = field.extension(p, 'sqrt2', embedding=RLF(2).sqrt())
basis = tuple( s.change_ring(field) for s in basis )
self._basis_normalizers = tuple(
~(self.natural_inner_product(s,s).sqrt()) for s in basis )
field = M.base_ring()
R = PolynomialRing(field, 'z')
z = R.gen()
- F = NumberField(z**2 + 1,'i', embedding=CLF(-1).sqrt())
+ F = field.extension(z**2 + 1, 'i', embedding=CLF(-1).sqrt())
i = F.gen()
# Go top-left to bottom-right (reading order), converting every
"""
R = PolynomialRing(field, 'z')
z = R.gen()
- F = NumberField(z**2 + 1, 'I', embedding=CLF(-1).sqrt())
+ F = field.extension(z**2 + 1, 'I')
I = F.gen()
# This is like the symmetric case, but we need to be careful: