uconf.algebraic.free_algebra

Free P-algebra on a dg-module M.

The free P-algebra on a dg-module M is the composite product

\[\operatorname{Free}_P(M) = P \circ M = \bigoplus_{n\geq 1} P(n) \otimes_{S_n} M^{\otimes n}\]

with:

  • Degree: deg(p_key, m_tuple) = deg_P(p_key) + Σ_i deg_M(m_i).

  • Differential d = d_P + d_M from the Koszul sign rule (Leibniz rule).

  • P-algebra structure γ: P(k) ⊗ Free_P(M)^⊗k → Free_P(M) given by the full operad substitution on the P-decorations and concatenation of M-tuples.

Quasi-planar requirement: P must be a quasi-planar operad, i.e. each component P(n) satisfies P(n) P_pl(n) k[S_n] and exposes a planarize linear map. The basis uses only planar P-keys, so two corollas (p·σ, m_tuple) and (p, σ·m_tuple) are identified as the same element.

The basis keys are pairs (p_key, m_tuple) where:

  • p_key is a planar basis key of P(n) for n = len(m_tuple) 1.

  • m_tuple is a tuple of n values, one per input.

The inclusion η: M → Free_P(M) sends a basis key m to (id_key, (m,)) where id_key is the unique basis key of P(1).

Reference: Loday-Vallette “Algebraic Operads”, Section 5.2.

Classes

FreeAlgebraModule(operad_cls, inner_module, *)

Underlying dg-module of the free P-algebra P M.

FreeOperadAlgebra(operad_cls, inner_module)

Free P-algebra on a dg-module M.

class uconf.algebraic.free_algebra.FreeAlgebraModule(operad_cls, inner_module, *, name=None)[source]

Bases: CombinatorialFreeModule

Underlying dg-module of the free P-algebra P M.

Basis keys are (p_key, m_tuple) pairs where p_key is a planar basis key of P(n) and m_tuple has length n. The differential is the Leibniz rule d = d_P + d_M with Koszul signs. Non-planar keys are automatically normalised via planarize (permuting the m_tuple).

The operad P must be quasi-planar: each component P(n) must expose a planarize linear map decomposing elements into planar representative ⊗ symmetric group element.

This class is normally not instantiated directly; use FreeOperadAlgebra instead.

Parameters:
  • operad_cls (QuasiPlanarLike)

  • inner_module (CombinatorialFreeModule)

  • name (ClassVar[str])

__init__(operad_cls, inner_module, *, name=None)[source]

Initialize the free P-algebra module P M.

Parameters:
  • operad_cls (type[OperadComponent] | OperadFactory | type[CooperadComponent] | CooperadFactory) – Arity-indexed quasi-planar operad provider. Each component operad_cls(n, base_ring) must expose planarize.

  • inner_module (CombinatorialFreeModule) – Generating dg-module M (a CombinatorialFreeModule).

  • name (str | None) – Display name override. Defaults to P M.

Raises:

TypeError – If the operad is not quasi-planar (no planarize).

property connectivity: int

Minimum degree of any basis element.

The arity-1 term (id, (m,)) has degree deg_M(m), so the connectivity equals that of the inner module.

degree_on_basis(key)[source]

Degree = deg_P(p_key) + Σ_i deg_M(m_i).

Return type:

int

basis_iter(d)[source]

Iterate over basis elements of total degree d.

Uses the isomorphism P(n) ⊗_{S_n} M^{⊗n} P_pl(n) M^{⊗n} and enumerates only planar P(n)-decorations.

Raises:

ValueError – when arity is unbounded (P and M both admit degree-0 generators).

Parameters:

d (int)

Return type:

Iterator[Any]

graded_basis[source]

/home/runner/work/uconf/uconf/src/uconf/algebraic/free_algebra.py (starting at line 493)

Type:

File

basis_weight_iter(d, w)[source]

Iterate over basis elements of total degree d and weight w.

The weight of (p_key, m_tuple) is the arity len(m_tuple). Only basis elements with exactly w inputs (arity w) are returned.

Parameters:
  • d (int) – Homological degree.

  • w (int) – Weight (arity) to enumerate.

Yields:

Elements of this module with degree d and weight w.

Return type:

Iterator[Any]

graded_basis_by_weight[source]

/home/runner/work/uconf/uconf/src/uconf/algebraic/free_algebra.py (starting at line 570) Cached family of basis elements of degree d and weight w.

Type:

File

FreeAlgebraModule.Element[source]

alias of Element

class uconf.algebraic.free_algebra.FreeOperadAlgebra(operad_cls, inner_module)[source]

Bases: OperadAlgebra

Free P-algebra on a dg-module M.

Constructs the composite product P M as a FreeAlgebraModule and equips it with the canonical P-algebra structure.

The action γ(q; a_1, ..., a_k) applies the full operad substitution q(p_1, ..., p_k) P(Σn_i) and concatenates the M-tuples. The result is normalised via planarize: if the composed P-element has a non-planar key r·σ, the output carries r (planar) and σ · m_concat (permuted M-entries).

Quasi-planar requirement: P must be quasi-planar (expose planarize on each component). Non-quasi-planar operads such as Commutative or Lie are not accepted.

Parameters:
  • operad_cls (QuasiPlanarLike) – Quasi-planar operad provider P (class or factory instance).

  • inner_module (CombinatorialFreeModule) – The generating dg-module M.

The inclusion η: M Free_P(M) is:

m_key  ↦  free_algebra.module.term((id_key, (m_key,)))

where id_key is the unique basis key of P(1).

Examples:

from uconf import Associative
from sage.all import QQ, CombinatorialFreeModule, GradedModulesWithBasis

M = CombinatorialFreeModule(QQ, ['a', 'b'],
                            category=GradedModulesWithBasis(QQ))
M.degree_on_basis = lambda _: 1
M.boundary_on_basis = lambda _: M.zero()
F = FreeOperadAlgebra(Associative, M)
a = F.include('a')
b = F.include('b')
# Non-planar Ass(2) key: result is normalised to planar key with swapped M-tuple
result = F.act(Associative(2, QQ)((2, 1)), [a, b])
# → corolla ((1,2), (B['b'], B['a']))
include(m_key)[source]

Return the image of m_key under the inclusion η: M → P ∘ M.

Parameters:

m_key – A basis key of the inner module M (or any object stored as an M-label in the free algebra).

Returns:

The element module.term((id_key, (m_key,))) where id_key is the unique basis key of P(1).