From: Michael Orlitzky Date: Wed, 4 Mar 2026 13:03:40 +0000 (-0500) Subject: mjo/clan/trivial_clan.py: new TrivialClan class X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=c663eb888e84996d7c7046a675d4dd8e4c4e1bc3;p=sage.d.git mjo/clan/trivial_clan.py: new TrivialClan class Does exactly what you would expect: nothing. --- diff --git a/mjo/clan/trivial_clan.py b/mjo/clan/trivial_clan.py new file mode 100644 index 0000000..41b5e32 --- /dev/null +++ b/mjo/clan/trivial_clan.py @@ -0,0 +1,88 @@ +from mjo.clan.normal_decomposition import NormalDecomposition + +class TrivialClan(NormalDecomposition): + r""" + The trivial (dimension = rank = zero) clan. + + It satisfies the axioms. + + SETUP:: + + sage: from mjo.clan.trivial_clan import TrivialClan + + EXAMPLES: + + sage: C = TrivialClan() + sage: C.dimension() + 0 + sage: C.basis() + Finite family {} + sage: C.rank() + 0 + sage: C.one() + 0 + + TESTS: + + Verifying the axioms (vacuously):: + + sage: C = TrivialClan() + sage: e = C.basis() + sage: r = C.rank() + sage: all( e[i,j,k]*e[i,j,k] == e[i,j,k] + ....: for (i,j,k) in e.keys() + ....: if i == j ) + True + sage: all( C.idempotent(i)*e[j,i,k] == e[j,i,k]/2 + ....: for (i,j,k) in e.keys() + ....: if i < j ) + True + sage: all( C.idempotent(i)*e[i,k,z] == e[i,k,z]/2 + ....: for (i,k,z) in e.keys() + ....: if k < i) + True + sage: all( (C.idempotent(i)*e[j,k,l]).is_zero() + ....: for i in range(r) + ....: for (j,k,l) in e.keys() + ....: if k <= j and i not in [j,k] ) + True + sage: all( (e[i,k,l]*C.idempotent(i)).is_zero() + ....: for (i,k,l) in e.keys() + ....: if k < i ) + True + sage: all( (e[j,k,l]*C.idempotent(i)).is_zero() + ....: for i in range(r) + ....: for (j,k,l) in e.keys() + ....: if i not in [j,k] ) + True + + """ + from sage.rings.rational_field import QQ + def __init__(self, scalar_field=QQ, **kwargs): + from sage.modules.free_module import VectorSpace + R0 = VectorSpace(scalar_field, []) + + def cp(x,y): + return x + + def ip(x,y): + return scalar_field.zero() + + super().__init__(R0, cp, ip, **kwargs) + + + def __repr__(self) -> str: + r""" + The string representation of this clan. + + SETUP:: + + sage: from mjo.clan.trivial_clan import TrivialClan + + EXAMPLES:: + + sage: TrivialClan() + Trivial clan over Rational Field + + """ + return f"Trivial clan over {self.base_ring()}"