lexicographically and then within each component the basis
elements (i,j,k) ordered arbitrarily.
+ ..NOTE::
+
+ In the Vinberg (upper triangular) convention, we start at the
+ left and build the clan down and to the right. In the Ishi
+ (lower triangular) convention, we start on the right and build
+ up and to the left.
+
SETUP::
sage: from mjo.clan.random import random_clan
In my "Automorphisms of hyperbolic polynomials" paper, I claim
that the following inner product is zero if and only if the clan
- product itself is zero::
+ product itself is zero. First test on the basis, and then a bunch
+ of random elements for good measure::
sage: C = random_clan(nontrivial=True)
sage: while C.rank() < 2:
....: # need rank >= 2 for the off-diagonal to exist
....: C = random_clan(nontrivial=True)
- sage: r = C.rank() - 1
- sage: j = ZZ.random_element(r)
- sage: xs = ( C.random_element().elt(r,j) for _ in range(10) )
- sage: ys = ( C.random_element().elt(r,j) for _ in range(10) )
+ sage: r = 0 # Ishi convention
+ sage: all( x.inner_product(y).is_zero() == (x*y).is_zero()
+ ....: for i in range(1, C.rank())
+ ....: for x in C.basis()
+ ....: for y in C.basis()
+ ....: if x.elt(i, r) == x and y.elt(i, r) == y )
+ True
sage: all( x.inner_product(y).is_zero() == (x*y).is_zero()
- ....: for x in xs
- ....: for y in ys )
+ ....: for i in range(1, C.rank())
+ ....: for _ in range(1000)
+ ....: if (x := C.random_element().elt(i, r))
+ ....: if (y := C.random_element().elt(i, r)) )
True
"""