# corresponding to trivial spaces (e.g. it returns only the
# eigenspace corresponding to lambda=1 if you take the
# decomposition relative to the identity element).
- trivial = self.subalgebra(())
+ trivial = self.subalgebra((), check_axioms=False)
J0 = trivial # eigenvalue zero
J5 = VectorSpace(self.base_ring(), 0) # eigenvalue one-half
J1 = trivial # eigenvalue one
sage: (J0, J5, J1) = J.peirce_decomposition(c1)
sage: (f0, f1, f2) = J1.gens()
sage: f0.spectral_decomposition()
- [(0, c2), (1, c0)]
+ [(0, 1.000000000000000?*c2), (1, 1.000000000000000?*c0)]
"""
A = self.subalgebra_generated_by(orthonormalize=True)
"""
if elt in self.superalgebra():
- return super()._element_constructor_(elt.to_matrix())
+ # If the subalgebra is trivial, its _matrix_span will be empty
+ # but we still want to be able convert the superalgebra's zero()
+ # element into the subalgebra's zero() element. There's no great
+ # workaround for this because sage checks that your basis is
+ # linearly-independent everywhere, so we can't just give it a
+ # basis consisting of the zero element.
+ m = elt.to_matrix()
+ if self.is_trivial() and m.is_zero():
+ return self.zero()
+ else:
+ return super()._element_constructor_(m)
else:
return super()._element_constructor_(elt)
r"""
Return the embedding from this subalgebra into the superalgebra.
+ SETUP::
+
+ sage: from mjo.eja.eja_algebra import HadamardEJA
+
EXAMPLES::
sage: J = HadamardEJA(4)