From 187e05395cf3ae434fb817e4a18a0d5f938033b1 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 21 Feb 2026 09:57:29 -0500 Subject: [PATCH] mjo/clan/clan.py: add SETUP:: blocks These are now(?) necessary with the new all.py exports. --- mjo/clan/clan.py | 70 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/mjo/clan/clan.py b/mjo/clan/clan.py index c1fa9cc..017c2c8 100644 --- a/mjo/clan/clan.py +++ b/mjo/clan/clan.py @@ -18,6 +18,10 @@ class Clans(Category_over_base_ring): r""" The category of clans over the given base ring. + SETUP:: + + sage: from mjo.clan.clan import Clans + EXAMPLES:: sage: Clans(QQ) @@ -187,6 +191,10 @@ class NormalDecomposition(UnitalClan): r""" Return the i'th idempotent in this clan. + SETUP:: + + sage: from mjo.clan.clan import SnClan + EXAMPLES:: sage: C = SnClan(3) @@ -208,6 +216,10 @@ class NormalDecomposition(UnitalClan): r""" Return the unit element of this clan. + SETUP:: + + sage: from mjo.clan.clan import SnClan + EXAMPLES:: sage: C = SnClan(4) @@ -234,6 +246,10 @@ class NormalDecomposition(UnitalClan): we know the (number of) idempotents used for the normal decomposition. + SETUP:: + + sage: from mjo.clan.clan import HnClan + EXAMPLES:: sage: C = HnClan(2) @@ -322,6 +338,11 @@ class MatrixClan(NormalDecomposition): r""" Construct an element of this clan from a Hermitian matrix. + SETUP:: + + sage: from mjo.clan.clan import HnClan, SnClan + sage: from mjo.hurwitz import ComplexMatrixAlgebra + EXAMPLES:: sage: C = SnClan(2) @@ -333,7 +354,6 @@ class MatrixClan(NormalDecomposition): :: - sage: from mjo.hurwitz import ComplexMatrixAlgebra sage: C = HnClan(2) sage: A = ComplexMatrixAlgebra(2, QQbar, QQ) sage: X = A([ [ 2, 1 + 2*I], @@ -373,6 +393,10 @@ class MatrixClan(NormalDecomposition): This is a shortcut for :meth:`from_matrix`, as the clan knows what the ambient matrix space was. + SETUP:: + + sage: from mjo.clan.clan import HnClan, SnClan + EXAMPLES:: sage: C = HnClan(2) @@ -406,6 +430,10 @@ class SnClan(MatrixClan): ordering of Ishi, based on the up-hat and down-hat products of Vinberg. + SETUP:: + + sage: from mjo.clan.clan import SnClan + EXAMPLES: The rank of this clan is the size of the matrices:: @@ -485,6 +513,10 @@ class SnClan(MatrixClan): r""" The string representation of this clan. + SETUP:: + + sage: from mjo.clan.clan import SnClan + EXAMPLES:: sage: SnClan(5) @@ -501,6 +533,10 @@ class HnClan(MatrixClan): ordering of Ishi, based on the up-hat and down-hat products of Vinberg. + SETUP:: + + sage: from mjo.clan.clan import HnClan + EXAMPLES: The rank of this clan is the size of the matrices:: @@ -587,6 +623,10 @@ class HnClan(MatrixClan): r""" The string representation of this clan. + SETUP:: + + sage: from mjo.clan.clan import HnClan + EXAMPLES:: sage: HnClan(1) @@ -638,6 +678,12 @@ class VinbergClan(NormalDecomposition): e[(2,2,1)] = [0,0], [0,0] [0,0] [0,1] + SETUP:: + + sage: from mjo.clan.clan import VinbergClan + + EXAMPLES: + Check the unit element:: sage: C = VinbergClan() @@ -799,6 +845,10 @@ class VinbergClan(NormalDecomposition): r""" The string representation of this clan. + SETUP:: + + sage: from mjo.clan.clan import VinbergClan + EXAMPLES:: sage: VinbergClan() @@ -846,14 +896,16 @@ class VinbergClan(NormalDecomposition): This is effectively a guess, based on the work done by Ishi and Koufany for the **dual** Vinberg cone. + SETUP:: + + sage: from mjo.clan.clan import VinbergClan + TESTS: Evidence for the conjecture that these preserve the two trace inner products:: sage: C = VinbergClan() - sage: isinstance(C, Clan) - True sage: A = C.random_isotropy_cone_automorphism() sage: A(C.one()) == C.one() True @@ -911,6 +963,10 @@ class VinbergClan(NormalDecomposition): Construct an element of this clan from a pair of symmetric matrices. + SETUP:: + + sage: from mjo.clan.clan import VinbergClan + EXAMPLES:: sage: C = VinbergClan() @@ -955,6 +1011,10 @@ class VinbergClan(NormalDecomposition): list of five numbers and returns a clan element. It is a trivial wrapper around :meth:`from_vector`. + SETUP:: + + sage: from mjo.clan.clan import VinbergClan + EXAMPLES:: sage: C = VinbergClan() @@ -973,6 +1033,10 @@ class VinbergClan(NormalDecomposition): This is a shortcut for :meth:`from_matrix`, as the clan knows what the ambient matrix space was. + SETUP:: + + sage: from mjo.clan.clan import VinbergClan + EXAMPLES:: sage: C = VinbergClan() -- 2.51.0