From: Michael Orlitzky Date: Sun, 10 Nov 2019 14:40:25 +0000 (-0500) Subject: eja: make two subalgebra tests more general. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=372770929343f5a75e8e8231894b466b3382dd9d;p=sage.d.git eja: make two subalgebra tests more general. All of the subalgebra tests are element-subalgebra tests, because I copied them from the element-subalgebra class. I'll slowly make them more robust. --- diff --git a/mjo/eja/eja_subalgebra.py b/mjo/eja/eja_subalgebra.py index 1030348..024dfbe 100644 --- a/mjo/eja/eja_subalgebra.py +++ b/mjo/eja/eja_subalgebra.py @@ -177,11 +177,16 @@ class FiniteDimensionalEuclideanJordanSubalgebra(FiniteDimensionalEuclideanJorda EXAMPLES:: sage: J = RealSymmetricEJA(3) - sage: x = sum( i*J.gens()[i] for i in range(6) ) - sage: basis = tuple( x^k for k in range(J.rank()) ) - sage: K = FiniteDimensionalEuclideanJordanSubalgebra(J,basis) - sage: [ K(x^k) for k in range(J.rank()) ] - [f0, f1, f2] + sage: X = matrix(QQ, [ [0,0,1], + ....: [0,1,0], + ....: [1,0,0] ]) + sage: x = J(X) + sage: basis = ( x, x^2 ) # x^2 is the identity matrix + sage: K = FiniteDimensionalEuclideanJordanSubalgebra(J, basis) + sage: K(J.one()) + f1 + sage: K(J.one() + x) + f0 + f1 :: @@ -223,21 +228,25 @@ class FiniteDimensionalEuclideanJordanSubalgebra(FiniteDimensionalEuclideanJorda EXAMPLES:: sage: J = RealSymmetricEJA(3) - sage: x = J.monomial(0) + 2*J.monomial(2) + 5*J.monomial(5) - sage: basis = (x^0, x^1, x^2) + sage: E11 = matrix(QQ, [ [1,0,0], + ....: [0,0,0], + ....: [0,0,0] ]) + sage: E22 = matrix(QQ, [ [0,0,0], + ....: [0,1,0], + ....: [0,0,0] ]) + sage: b1 = J(E11) + sage: b2 = J(E22) + sage: basis = (b1, b2) sage: K = FiniteDimensionalEuclideanJordanSubalgebra(J,basis) sage: K.vector_space() - Vector space of degree 6 and dimension 3 over... + Vector space of degree 6 and dimension 2 over... User basis matrix: - [ 1 0 1 0 0 1] - [ 1 0 2 0 0 5] - [ 1 0 4 0 0 25] - sage: (x^0).to_vector() - (1, 0, 1, 0, 0, 1) - sage: (x^1).to_vector() - (1, 0, 2, 0, 0, 5) - sage: (x^2).to_vector() - (1, 0, 4, 0, 0, 25) + [1 0 0 0 0 0] + [0 0 1 0 0 0] + sage: b1.to_vector() + (1, 0, 0, 0, 0, 0) + sage: b2.to_vector() + (0, 0, 1, 0, 0, 0) """ return self._vector_space