From: Michael Orlitzky Date: Tue, 17 Feb 2026 02:37:11 +0000 (-0500) Subject: mjo/clan/clan_element.py: add the Vinberg inner product X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=9109474162705d518acf4062ec1f7a4d00ea0734;p=sage.d.git mjo/clan/clan_element.py: add the Vinberg inner product --- diff --git a/mjo/clan/clan_element.py b/mjo/clan/clan_element.py index 6b08e53..e550119 100644 --- a/mjo/clan/clan_element.py +++ b/mjo/clan/clan_element.py @@ -45,6 +45,36 @@ class ClanElement(IndexedFreeModuleElement): for (bj, yj) in other.items() ) + def inner_product_vinberg(self, other): + r""" + The Vinberg inner product of ``self`` and ``other``. + + It is convenient to have this available independent of the + inner product used to define the clan. + + SETUP:: + + sage: from mjo.clan.unital_clan import SnClan + + EXAMPLES: + + From the definition of "Sp(z)" and Lemma 2 (pp. 380--382), + it follows that for a symmetric matrix this is twice the + usual trace:: + + sage: C = SnClan(3) + sage: X = matrix(QQ, [[2,6,10],[6,10,14],[10,14,18]]) + sage: Y = matrix(QQ, [[2,1,0],[1,1,1],[0,1,4]]) + sage: (X*Y).trace() + 126 + sage: X = C.from_matrix(X) + sage: Y = C.from_matrix(Y) + sage: X.inner_product_vinberg(Y) + 252 + + """ + return (self*other).leftreg().trace() + def leftreg(self): r""" Return the left-regular representation of this element.