X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=204a537df12d2ab4d3d27764c20c830ec324a68a;hb=fe7ba85535340f4506513cb3c73b483693526023;hp=9b028809c6ca46efd13d974fd99b176d1761754e;hpb=5264b3ce110d63d79b76ec3fa05daecd38a78e7c;p=sage.d.git diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 9b02880..204a537 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -797,9 +797,22 @@ def random_eja(): -def _real_symmetric_basis(n, field=QQ): +def _real_symmetric_basis(n, field): """ Return a basis for the space of real symmetric n-by-n matrices. + + SETUP:: + + sage: from mjo.eja.eja_algebra import _real_symmetric_basis + + TESTS:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: B = _real_symmetric_basis(n, QQbar) + sage: all( M.is_symmetric() for M in B) + True + """ # The basis of symmetric matrices, as matrices, in their R^(n-by-n) # coordinates. @@ -816,7 +829,7 @@ def _real_symmetric_basis(n, field=QQ): return tuple(S) -def _complex_hermitian_basis(n, field=QQ): +def _complex_hermitian_basis(n, field): """ Returns a basis for the space of complex Hermitian n-by-n matrices. @@ -857,7 +870,7 @@ def _complex_hermitian_basis(n, field=QQ): return tuple(S) -def _quaternion_hermitian_basis(n, field=QQ): +def _quaternion_hermitian_basis(n, field): """ Returns a basis for the space of quaternion Hermitian n-by-n matrices. @@ -1237,7 +1250,7 @@ class RealSymmetricEJA(FiniteDimensionalEuclideanJordanAlgebra): """ def __init__(self, n, field=QQ, **kwargs): - S = _real_symmetric_basis(n, field=field) + S = _real_symmetric_basis(n, field) Qs = _multiplication_table_from_matrix_basis(S) fdeja = super(RealSymmetricEJA, self) @@ -1306,7 +1319,7 @@ class ComplexHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra): """ def __init__(self, n, field=QQ, **kwargs): - S = _complex_hermitian_basis(n) + S = _complex_hermitian_basis(n, field) Qs = _multiplication_table_from_matrix_basis(S) fdeja = super(ComplexHermitianEJA, self) @@ -1383,7 +1396,7 @@ class QuaternionHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra): """ def __init__(self, n, field=QQ, **kwargs): - S = _quaternion_hermitian_basis(n) + S = _quaternion_hermitian_basis(n, field) Qs = _multiplication_table_from_matrix_basis(S) fdeja = super(QuaternionHermitianEJA, self)