]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/clan/unital_clan.py: fix VinbergClan element classes
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 15 Feb 2026 16:42:40 +0000 (11:42 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 15 Feb 2026 16:42:40 +0000 (11:42 -0500)
When building elements from lists/matrices, be sure to construct
them in the clan and not just in the underlying vector space.

mjo/clan/unital_clan.py

index c560199ca0b33bde8f2b00237107f973d84da647..626918345e8510c41c5fb9efa2ca0121daaab76f 100644 (file)
@@ -744,12 +744,11 @@ class VinbergClan(NormalDecomposition):
         if not A[0,0] == B[0,0]:
             raise ValueError(f"A and B must agree in the (0,0) position")
 
-        R5 = self._vector_space
-        return ( A[0,0]*R5((0,0,1)) +
-                 A[1,0]*R5((1,0,1)) +
-                 A[1,1]*R5((1,1,1)) +
-                 B[1,0]*R5((2,0,1)) +
-                 B[1,1]*R5((2,2,1)) )
+        return ( A[0,0]*self((0,0,1)) +
+                 A[1,0]*self((1,0,1)) +
+                 A[1,1]*self((1,1,1)) +
+                 B[1,0]*self((2,0,1)) +
+                 B[1,1]*self((2,2,1)) )
 
     def from_list(self, l):
         r"""
@@ -769,8 +768,7 @@ class VinbergClan(NormalDecomposition):
             (2, 1, 4, 2, -1)
 
         """
-        V = self._vector_space
-        return V.sum_of_terms(zip(V.basis().keys(), l))
+        return self.sum_of_terms(zip(self.basis().keys(), l))
 
     def from_lists(self, l1, l2):
         r