uconf.models.lie¶
Finite-arity model of the Lie operad in a Hall-type basis.
Classes
|
Lie operad component in arity |
- class uconf.models.lie.Lie(n, base_ring)[source]¶
Bases:
CombinatorialFreeModuleLie operad component in arity
n.Basis keys are permutations of
(1, ..., n-1)and encode nested brackets[x_i, -]ending inx_n.Computational data (PBW matrix, its left-inverse, word/basis-key lists, and associative expansions) are cached via
sage.misc.cachefunc.cached_method(). SinceCombinatorialFreeModuleinherits fromUniqueRepresentation,Lie(n, base_ring)always returns the same instance for a given(n, base_ring)pair, so these instance-level caches are automatically shared across all callers—includingcompose(), which creates a newLieparent on each invocation.EXAMPLES:
sage: from sage.all import QQ sage: from uconf import Lie sage: L3 = Lie(3, QQ) sage: x = L3((1, 2)) sage: x.arity() 3 sage: x.permute([2, 1, 3]).parent() is L3 True
- connectivity: ClassVar[int] = 0¶
All components live in degree 0 (the Lie operad is concentrated in degree 0).
- basis_iter(d)[source]¶
Iterate over the canonical Lie basis in this fixed arity and the given degree.
- Parameters:
d (int)
- Return type:
Iterator[Element]
- graded_basis[source]¶
/home/runner/work/uconf/uconf/src/uconf/models/lie.py (starting at line 285) Return the
Familyof all basis elements in degreed.- Type:
File
- degree_on_basis(element)[source]¶
Return homological degree on basis elements (always
0here).- Return type:
int
- static compose(x, i, y)[source]¶
Operadic composition
x \circ_i yin the Lie operad.Parameters¶
- x, y:
Lie-operad elements over the same base ring.
- i:
Input slot of
xinto whichyis inserted.
Returns¶
- Lie.Element
The composite in arity
x.arity() + y.arity() - 1.
The implementation follows the algorithmic approach described in Bremner–Dotsenko Algebraic Operads: An Algorithmic Companion:
Expand
xandyinto the associative word basis once each, combining all terms into single dicts before the composition loop. This avoids calling_assoc_from_basis_key()redundantly for every outer word ofx(the bottleneck in the original code).Perform variable-substitution and renaming in a single double loop over the pre-aggregated word dicts.
Recover the Lie coordinates via a pre-cached left-inverse matrix (one matrix–vector multiply) rather than a fresh linear solve.
EXAMPLES:
sage: from sage.all import QQ sage: from uconf import Lie sage: x = Lie(2, QQ)((1,)) sage: y = Lie(2, QQ)((1,)) sage: Lie.compose(x, 2, y).arity() 3