EXAMPLES::
sage: OctonionMatrixAlgebra(3)
- Module of 3 by 3 matrices with entries in Octonion algebra with base
- ring Algebraic Real Field over the scalar ring Algebraic Real Field
+ Module of 3 by 3 matrices with entries in Octonion algebra over
+ Algebraic Real Field over the scalar ring Algebraic Real Field
::
sage: OctonionMatrixAlgebra(3,scalars=QQ)
- Module of 3 by 3 matrices with entries in Octonion algebra with
- base ring Rational Field over the scalar ring Rational Field
+ Module of 3 by 3 matrices with entries in Octonion algebra over
+ Rational Field over the scalar ring Rational Field
::
- sage: O = Octonions(RR)
+ sage: O = OctonionAlgebra(RR)
sage: A = OctonionMatrixAlgebra(1,O)
sage: A
- Module of 1 by 1 matrices with entries in Octonion algebra with
- base ring Real Field with 53 bits of precision over the scalar
- ring Algebraic Real Field
+ Module of 1 by 1 matrices with entries in Octonion algebra over
+ Real Field with 53 bits of precision over the scalar ring
+ Algebraic Real Field
sage: A.one()
- ┌─────────────────────┐
- │ 1.00000000000000*e0 │
- └─────────────────────┘
+ ┌──────────────────┐
+ │ 1.00000000000000 │
+ └──────────────────┘
+
+ The matrix algebra does **not** inherit the ``gens()`` behavior
+ from the entry algebra; we get a basis here::
+
sage: A.gens()
- (â\94\8câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\90
- │ 1.00000000000000*e0 │
- â\94\94â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\98,
- â\94\8câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\90
- │ 1.00000000000000*e1 │
- â\94\94â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\98,
- â\94\8câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\90
- │ 1.00000000000000*e2 │
- â\94\94â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\98,
- â\94\8câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\90
- │ 1.00000000000000*e3 │
- â\94\94â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\98,
- â\94\8câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\90
- │ 1.00000000000000*e4 │
- â\94\94â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\98,
+ (┌──────────────────┐
+ │ 1.00000000000000 │
+ └──────────────────┘,
+ ┌────────────────────┐
+ │ 1.00000000000000*i │
+ └────────────────────┘,
+ ┌────────────────────┐
+ │ 1.00000000000000*j │
+ └────────────────────┘,
+ ┌────────────────────┐
+ │ 1.00000000000000*k │
+ └────────────────────┘,
+ ┌────────────────────┐
+ │ 1.00000000000000*l │
+ └────────────────────┘,
┌─────────────────────┐
- │ 1.00000000000000*e5 │
+ │ 1.00000000000000*li │
└─────────────────────┘,
┌─────────────────────┐
- │ 1.00000000000000*e6 │
+ │ 1.00000000000000*lj │
└─────────────────────┘,
┌─────────────────────┐
- │ 1.00000000000000*e7 │
+ │ 1.00000000000000*lk │
└─────────────────────┘)
::
sage: A = OctonionMatrixAlgebra(2)
- sage: e0,e1,e2,e3,e4,e5,e6,e7 = A.entry_algebra().gens()
+ sage: e0,e1,e2,e3,e4,e5,e6,e7 = A.entry_algebra_gens()
sage: A([ [e0+e4, e1+e5],
....: [e2-e6, e3-e7] ])
- â\94\8câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬â\94\80────────┐
- │ e0 + e4 │ e1 + e5 │
- â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80────────┤
- │ e2 - e6 │ e3 - e7 │
- â\94\94â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80────────┘
+ â\94\8câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬────────┐
+ │ 1 + l │ i + li │
+ â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼────────┤
+ │ j - lj │ k - lk │
+ â\94\94â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´────────┘
::
sage: A1 = OctonionMatrixAlgebra(1,scalars=QQ)
sage: A2 = OctonionMatrixAlgebra(1,scalars=QQ)
sage: cartesian_product([A1,A2])
- Module of 1 by 1 matrices with entries in Octonion algebra with
- base ring Rational Field over the scalar ring Rational Field (+)
- Module of 1 by 1 matrices with entries in Octonion algebra with
- base ring Rational Field over the scalar ring Rational Field
+ Module of 1 by 1 matrices with entries in Octonion algebra over
+ Rational Field over the scalar ring Rational Field (+)
+ Module of 1 by 1 matrices with entries in Octonion algebra over
+ Rational Field over the scalar ring Rational Field
TESTS::
"""
def __init__(self, n, entry_algebra=None, scalars=AA, **kwargs):
if entry_algebra is None:
- entry_algebra = Octonions(field=scalars)
+ from sage.algebras.octonion_algebra import OctonionAlgebra
+ entry_algebra = OctonionAlgebra(scalars)
super().__init__(n,
entry_algebra,
scalars,