from sage.matrix.constructor import matrix
+from sage.misc.cachefunc import cached_method
from mjo.eja.eja_algebra import FiniteDimensionalEJA
from mjo.eja.eja_element import FiniteDimensionalEJAElement
True
"""
- return self.parent().superalgebra()(self.to_matrix())
+ return self.parent().superalgebra_embedding()(self)
return self._superalgebra
+ @cached_method
+ def superalgebra_embedding(self):
+ r"""
+ Return the embedding from this subalgebra into the superalgebra.
+
+ EXAMPLES::
+
+ sage: J = HadamardEJA(4)
+ sage: A = J.one().subalgebra_generated_by()
+ sage: iota = A.superalgebra_embedding()
+ sage: iota
+ Linear operator between finite-dimensional Euclidean Jordan algebras represented by the matrix:
+ [1/2]
+ [1/2]
+ [1/2]
+ [1/2]
+ Domain: Euclidean Jordan algebra of dimension 1 over Algebraic Real Field
+ Codomain: Euclidean Jordan algebra of dimension 4 over Algebraic Real Field
+ sage: iota(A.one()) == J.one()
+ True
+
+ """
+ from mjo.eja.eja_operator import FiniteDimensionalEJAOperator
+ mm = self._module_morphism(lambda j: self.superalgebra()(self.monomial(j).to_matrix()),
+ codomain=self.superalgebra())
+ return FiniteDimensionalEJAOperator(self,
+ self.superalgebra(),
+ mm.matrix())
+
+
+
Element = FiniteDimensionalEJASubalgebraElement