uconf.algebraic.algebra

Algebras over dg-operads (P-algebras).

An algebra over a dg-operad P is a dg-module A together with a collection of structure maps

γ_n : P(n) ⊗_{S_n} A^{⊗n} → A

satisfying: - Unit: γ_1(id; a) = a for the operadic unit id ∈ P(1). - Composition: γ_{m+n-1}(p ∘_i q; …) = γ_m(p; …, γ_n(q; …), …). - Equivariance: γ_n(p·σ; a_1,…,a_n) = γ_n(p; a_{σ^{-1}(1)}, …, a_{σ^{-1}(n)}). - Chain map: ∂_A ∘ γ_n = γ_n ∘ (∂_P ⊗ id + …) (Leibniz rule).

Reference: Loday-Vallette “Algebraic Operads”, Chapter 12.

Classes

OperadAlgebra(module, operad_cls, structure_map)

A dg-module equipped with a P-algebra structure.

StructureMap(*args, **kwargs)

Type contract for operad action callables.

class uconf.algebraic.algebra.StructureMap(*args, **kwargs)[source]

Bases: Protocol[OperadElementInputType, AlgebraElementType]

Type contract for operad action callables.

class uconf.algebraic.algebra.OperadAlgebra(module, operad_cls, structure_map)[source]

Bases: Generic[OperadElementType, AlgebraElementType], UniqueRepresentation

A dg-module equipped with a P-algebra structure.

Wraps an underlying CombinatorialFreeModule (the module A) and an operad class operad_cls (satisfying uconf.operad.OperadComponent) together with an explicit structure map.

The structure map is supplied as a callable via structure_map:

    alg = OperadAlgebra(module, Associative, my_map)

where ``my_map(p_element, algebra_elements) → A.Element``.
Parameters:
  • module (CombinatorialFreeModule) – Underlying dg-module (a CombinatorialFreeModule).

  • operad_cls (OperadLike) – Operad provider (class or factory, OperadComponent-compatible).

  • structure_map (StructureMap[OperadElementType, AlgebraElementType]) – Callable implementing the P-algebra action γ.

act(p_element, algebra_elements)[source]

Apply the P-algebra structure map γ(p; a_1, …, a_n).

Parameters:
  • p_element (OperadElementType) – An element of operad_cls(n) for some arity n.

  • algebra_elements (Sequence[AlgebraElementType]) – A list of n elements of the algebra module.

Returns:

An element of the algebra module A.

Raises:
  • TypeError – If p_element is not an element of operad_cls.

  • ValueError – If len(algebra_elements) != p_element.arity().

Return type:

AlgebraElementType

boundary(a)[source]

Apply the differential ∂_A to an algebra element.

Parameters:

a (AlgebraElementType) – An element of the algebra module.

Returns:

The boundary ∂_A(a) in the module.

Return type:

AlgebraElementType