+# -*- coding: utf-8 -*-
+
from itertools import izip
from sage.matrix.constructor import matrix
Return ``self`` raised to the power ``n``.
Jordan algebras are always power-associative; see for
- example Faraut and Koranyi, Proposition II.1.2 (ii).
+ example Faraut and Korányi, Proposition II.1.2 (ii).
We have to override this because our superclass uses row
vectors instead of column vectors! We, on the other hand,
True
Ensure that the determinant is multiplicative on an associative
- subalgebra as in Faraut and Koranyi's Proposition II.2.2::
+ subalgebra as in Faraut and Korányi's Proposition II.2.2::
sage: set_random_seed()
sage: J = random_eja().random_element().subalgebra_generated_by()
...
ValueError: element is not invertible
+ Proposition II.2.3 in Faraut and Korányi says that the inverse
+ of an element is the inverse of its left-multiplication operator
+ applied to the algebra's identity, when that inverse exists::
+
+ sage: set_random_seed()
+ sage: J = random_eja()
+ sage: x = J.random_element()
+ sage: (not x.operator().is_invertible()) or (
+ ....: x.operator().inverse()(J.one()) == x.inverse() )
+ True
+
"""
if not self.is_invertible():
raise ValueError("element is not invertible")
- def subalgebra_generated_by(self):
+ def subalgebra_generated_by(self, orthonormalize_basis=False):
"""
Return the associative subalgebra of the parent EJA generated
by this element.
0
"""
- return FiniteDimensionalEuclideanJordanElementSubalgebra(self)
+ return FiniteDimensionalEuclideanJordanElementSubalgebra(self, orthonormalize_basis)
def subalgebra_idempotent(self):
TESTS:
- The trace inner product is commutative, bilinear, and satisfies
- the Jordan axiom:
+ The trace inner product is commutative, bilinear, and associative::
sage: set_random_seed()
sage: J = random_eja()
....: a*x.trace_inner_product(z) )
sage: actual == expected
True
- sage: # jordan axiom
+ sage: # associative
sage: (x*y).trace_inner_product(z) == y.trace_inner_product(x*z)
True