]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: fix the dimension of the complex Hermitian simple EJA.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 6 Jul 2019 13:29:51 +0000 (09:29 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 29 Jul 2019 03:19:01 +0000 (23:19 -0400)
mjo/eja/euclidean_jordan_algebra.py

index c83c78056a2774a01400fbb76381a5b9d7352c15..d6235d33ee2edd77f24d1b304e8d4d80b4342d9f 100644 (file)
@@ -604,6 +604,43 @@ def _real_symmetric_basis(n, field=QQ):
     return S
 
 
+def _complex_hermitian_basis(n, field=QQ):
+    """
+    Returns a basis for the space of complex Hermitian n-by-n matrices.
+
+    TESTS::
+
+        sage: set_random_seed()
+        sage: n = ZZ.random_element(1,5).abs()
+        sage: all( M.is_symmetric() for M in _complex_hermitian_basis(n) )
+        True
+
+    """
+    F = QuadraticField(-1, 'I')
+    I = F.gen()
+
+    # This is like the symmetric case, but we need to be careful:
+    #
+    #   * We want conjugate-symmetry, not just symmetry.
+    #   * The diagonal will (as a result) be real.
+    #
+    S = []
+    for i in xrange(n):
+        for j in xrange(i+1):
+            Eij = matrix(field, n, lambda k,l: k==i and l==j)
+            if i == j:
+                Sij = _embed_complex_matrix(Eij)
+                S.append(Sij)
+            else:
+                # Beware, orthogonal but not normalized! The second one
+                # has a minus because it's conjugated.
+                Sij_real = _embed_complex_matrix(Eij + Eij.transpose())
+                S.append(Sij_real)
+                Sij_imag = _embed_complex_matrix(I*Eij - I*Eij.transpose())
+                S.append(Sij_imag)
+    return S
+
+
 def _multiplication_table_from_matrix_basis(basis):
     """
     At least three of the five simple Euclidean Jordan algebras have the
@@ -767,20 +804,25 @@ def ComplexHermitianSimpleEJA(n, field=QQ):
     """
     The rank-n simple EJA consisting of complex Hermitian n-by-n
     matrices over the real numbers, the usual symmetric Jordan product,
-    and the real-part-of-trace inner product. It has dimension `n^2 over
+    and the real-part-of-trace inner product. It has dimension `n^2` over
     the reals.
+
+    TESTS:
+
+    The degree of this algebra is `n^2`::
+
+        sage: set_random_seed()
+        sage: n = ZZ.random_element(1,5).abs()
+        sage: J = ComplexHermitianSimpleEJA(n)
+        sage: J.degree() == n^2
+        True
+
     """
-    F = QuadraticField(-1, 'i')
-    i = F.gen()
-    S = _real_symmetric_basis(n, field=F)
-    T = []
-    for s in S:
-        T.append(s)
-        T.append(i*s)
-    embed_T = [ _embed_complex_matrix(t) for t in T ]
-    Qs = _multiplication_table_from_matrix_basis(embed_T)
+    S = _complex_hermitian_basis(n)
+    Qs = _multiplication_table_from_matrix_basis(S)
     return FiniteDimensionalEuclideanJordanAlgebra(field, Qs, rank=n)
 
+
 def QuaternionHermitianSimpleEJA(n):
     """
     The rank-n simple EJA consisting of self-adjoint n-by-n quaternion