SETUP::
- sage: from mjo.eja.eja_algebra import RealSymmetricEJA
+ sage: from mjo.eja.eja_algebra import (RealSymmetricEJA,
+ ....: random_eja)
EXAMPLES:
...
ArithmeticError: vector is not in free module
+ TESTS:
+
+ Ensure that we can convert any element of the parent's
+ underlying vector space back into an algebra element whose
+ vector representation is what we started with::
+
+ sage: set_random_seed()
+ sage: J = random_eja()
+ sage: v = J.vector_space().random_element()
+ sage: J(v).vector() == v
+ True
+
"""
# Goal: if we're given a matrix, and if it lives in our
# parent algebra's "natural ambient space," convert it
Jordan algebras are always power-associative; see for
example Faraut and Koranyi, Proposition II.1.2 (ii).
- .. WARNING:
-
- We have to override this because our superclass uses row vectors
- instead of column vectors! We, on the other hand, assume column
- vectors everywhere.
+ We have to override this because our superclass uses row
+ vectors instead of column vectors! We, on the other hand,
+ assume column vectors everywhere.
SETUP::
sage: from mjo.eja.eja_algebra import random_eja
- EXAMPLES::
+ TESTS:
+
+ The definition of `x^2` is the unambiguous `x*x`::
sage: set_random_seed()
sage: x = random_eja().random_element()
- sage: x.operator()(x) == (x^2)
+ sage: x*x == (x^2)
True
A few examples of power-associativity::
sage: J.zero().characteristic_polynomial()
t^3
+ TESTS:
+
The characteristic polynomial of an element should evaluate
to zero on that element::
sage: lhs == rhs
True
- Test the first polarization identity from my notes, Koecher Chapter
- III, or from Baes (2.3)::
+ Test the first polarization identity from my notes, Koecher
+ Chapter III, or from Baes (2.3)::
sage: set_random_seed()
sage: J = random_eja()
"""
Return whether or not this element is invertible.
- We can't use the superclass method because it relies on
- the algebra being associative.
-
ALGORITHM:
The usual way to do this is to check if the determinant is
whether or not the paren't algebra's zero element is a root
of this element's minimal polynomial.
+ Beware that we can't use the superclass method, because it
+ relies on the algebra being associative.
+
SETUP::
sage: from mjo.eja.eja_algebra import random_eja