From: Michael Orlitzky Date: Wed, 4 Mar 2026 14:40:03 +0000 (-0500) Subject: mjo/clan/jordan_spin_clan.py: fix n=0 case X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=267dcc90b325ee94b7f20d2c38554bf17f1c8b9c;p=sage.d.git mjo/clan/jordan_spin_clan.py: fix n=0 case --- diff --git a/mjo/clan/jordan_spin_clan.py b/mjo/clan/jordan_spin_clan.py index ee0991c..a90476c 100644 --- a/mjo/clan/jordan_spin_clan.py +++ b/mjo/clan/jordan_spin_clan.py @@ -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()