SETUP::
+ sage: from mjo.clan.random import random_clan
sage: from mjo.clan.vinberg_clan import VinbergClan
sage: from mjo.clan.jordan_spin_clan import JordanSpinClan
sage: from mjo.clan.t_algebra_clan import (ComplexHermitianClan,
hyperbolic polynomials" paper, although in Vinberg's notation we
would "delete" the ``r``th idempotent leaving a superdiagonal::
- sage: clans = [VinbergClan(),
- ....: RealSymmetricClan(4),
- ....: ComplexHermitianClan(3),
- ....: JordanSpinClan(5)]
+ sage: C = random_clan()
sage: all(
- ....: all(
- ....: (bi*bj).coefficient((0,0,1)).is_zero()
- ....: for bi in C.basis()
- ....: for bj in C.basis()
- ....: if not bi == C.idempotent(0)
- ....: and not bj == C.idempotent(0)
- ....: )
- ....: for C in clans
+ ....: (bi*bj).coefficient((0,0,1)).is_zero()
+ ....: for bi in C.basis()
+ ....: for bj in C.basis()
+ ....: if not bi == C.idempotent(0)
+ ....: and not bj == C.idempotent(0)
....: )
True
this subalgebra. Rather than create a true, non-unital subclan, we
can just set the coordinates of the first idempotent to zero.
- sage: clans = [VinbergClan(),
- ....: RealSymmetricClan(4),
- ....: ComplexHermitianClan(3),
- ....: JordanSpinClan(5)]
- sage: def subunit(C):
- ....: # Unit of the subclan
- ....: return sum(C.idempotent(i) for i in range(1, C.rank()))
sage: def subelt(C):
....: # random subclan element
+ ....: if C.rank() == 0:
+ ....: return C.zero()
....: x = C.random_element()
....: return x - x.coefficient((0,0,1))*C.idempotent(0)
+ sage: C = random_clan()
+ sage: subclan_unit = C.sum(C.idempotent(i)
+ ....: for i in range(1, C.rank()))
sage: all(
- ....: x.leftreg().trace() == u.inner_product_vinberg(x)
- ....: for C in clans
+ ....: x.leftreg().trace() == subclan_unit.inner_product_vinberg(x)
....: for x in [subelt(C) for _ in range(10)]
- ....: if (u := subunit(C))
....: )
True