From 7f0d37c93d47fc53af08a2c34e6a0c70f9b8163f Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 14 Feb 2026 15:17:54 -0500 Subject: [PATCH] mjo/clan/unital_clan.py: begin sorting out the Vinberg clan init --- mjo/clan/unital_clan.py | 51 ++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/mjo/clan/unital_clan.py b/mjo/clan/unital_clan.py index d838093..0e497bb 100644 --- a/mjo/clan/unital_clan.py +++ b/mjo/clan/unital_clan.py @@ -562,29 +562,64 @@ class VinbergClan(NormalDecomposition): from sage.modules.free_module import VectorSpace M2 = MatrixSpace(scalar_field, 2) - b = Mn.basis() + b = M2.basis() from sage.sets.family import Family S2_basis = Family({ (i,j,1) : a*(b[(i,j)] + b[(j,i)]) - for i in range(n) + for i in range(2) for j in range(i+1) if (a := 1 - (i == j)/scalar_field(2)) }) - # Mn.submodule() destroys our basis keys, so use + # M2.submodule() destroys our basis keys, so use # SubmoduleWithBasis directly. self._S2 = SubmoduleWithBasis(S2_basis, support_order=b.keys(), ambient=M2) - R5 = VectorSpace(scalar_field, 5) + # We need an Ishi basis (i,j,k) for R^5 if we want to use + # NormalDecomposition. + R5 = VectorSpace(scalar_field, [ + (0,0,1), + (1,0,1), + (1,1,1), + (2,1,1), + (2,2,1) + ]) + + def unlift(pair): + A,B = pair + return ( A[(0,0,1)]*R5((0,0,1)) + + A[(1,0,1)]*R5((1,0,1)) + + A[(1,1,1)]*R5((1,1,1)) + + B[(1,0,1)]*R5((2,1,1)) + + B[(1,1,1)]*R5((2,2,1)) ) def lift(v): - - return - - super().__init__(R5, MatrixClan._cp, MatrixClan._ip, **kwargs) + M1 = ( self._S2((0,0,1))*v[(0,0,1)] + + self._S2((1,0,1))*v[(1,0,1)] + + self._S2((1,1,1))*v[(1,1,1)] ) + M2 = ( self._S2((0,0,1))*v[(0,0,1)] + + self._S2((1,0,1))*v[(2,1,1)] + + self._S2((1,1,1))*v[(2,2,1)] ) + return (M1,M2) + + def cp(x,y): + X1,X2 = lift(x) + Y1,Y2 = lift(y) + Z1 = MatrixClan._down_hat(X1)*Y1 + Y1*MatrixClan._up_hat(X1) + Z2 = MatrixClan._down_hat(X2)*Y2 + Y2*MatrixClan._up_hat(X2) + return unlift(Z1,Z2) + + def ip(x,y): + two = x.base_ring()(2) + p = cp(x,y) / two + return sum( p[idx] + for idx in p.monomial_coefficients() + if idx[0] == idx[1] ) + + super().__init__(R5, cp, ip, **kwargs) def __repr__(self) -> str: r""" -- 2.51.0