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.