if not n.mod(2).is_zero():
raise ValueError("the matrix 'M' must be a complex embedding")
- field = M.base_ring() # This should already have sqrt2
+ # If "M" was normalized, its base ring might have roots
+ # adjoined and they can stick around after unembedding.
+ field = M.base_ring()
R = PolynomialRing(field, 'z')
z = R.gen()
F = NumberField(z**2 + 1,'i', embedding=CLF(-1).sqrt())