]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/clan/jordan_spin_clan.py: fix n=0 case
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 4 Mar 2026 14:40:03 +0000 (09:40 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 4 Mar 2026 14:40:03 +0000 (09:40 -0500)
mjo/clan/jordan_spin_clan.py

index ee0991c5b0b027910ce4673d7d6dbe88d1b43595..a90476c3eaf6f86692dd7a71fd9244639719f77a 100644 (file)
@@ -101,7 +101,9 @@ class JordanSpinClan(NormalDecomposition):
     def __init__(self, n, scalar_field=QQ, **kwargs):
         from sage.modules.free_module import VectorSpace
 
-        if n == 1:
+        if n == 0:
+            indices = []
+        elif n == 1:
             # The T-algebra construction requires n >= 2, but we
             # know that in dimension one this clan corresponds to
             # a single ray, and is essentially the real numbers.
@@ -115,6 +117,9 @@ class JordanSpinClan(NormalDecomposition):
         two = scalar_field(2)
 
         def cp(x,y):
+            if n == 0:
+                return x
+
             # Keep in mind, x and y will be (basis) elements of RN
             x = x.to_vector()
             y = y.to_vector()