From c819d9f266f844546557df23e78a52588746b024 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 15 Feb 2026 11:42:40 -0500 Subject: [PATCH] mjo/clan/unital_clan.py: fix VinbergClan element classes 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 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mjo/clan/unital_clan.py b/mjo/clan/unital_clan.py index c560199..6269183 100644 --- a/mjo/clan/unital_clan.py +++ b/mjo/clan/unital_clan.py @@ -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 -- 2.51.0