# algebra needs to be over the field extension.
R = PolynomialRing(field, 'z')
z = R.gen()
- field = NumberField(z**2 - 2, 'sqrt2', embedding=RLF(2).sqrt())
+ p = z**2 - 2
+ if p.is_irreducible():
+ field = NumberField(p, 'sqrt2', embedding=RLF(2).sqrt())
S = _real_symmetric_basis(n, field)
Qs = _multiplication_table_from_matrix_basis(S)
# algebra needs to be over the field extension.
R = PolynomialRing(field, 'z')
z = R.gen()
- field = NumberField(z**2 - 2, 'sqrt2', embedding=RLF(2).sqrt())
+ p = z**2 - 2
+ if p.is_irreducible():
+ field = NumberField(p, 'sqrt2', embedding=RLF(2).sqrt())
+
S = _complex_hermitian_basis(n, field)
Qs = _multiplication_table_from_matrix_basis(S)