uconf.core.twisting

Operadic twisting morphisms α: C → P.

A twisting morphism between a connected dg-cooperad C and a connected dg-operad P is a degree -1 map

α: C̄ → P

(from the coaugmentation coideal of C to P) satisfying the Maurer-Cartan equation

∂α + α ⋆ α = 0

where ⋆ denotes the pre-Lie convolution product.

The pre-Lie product (α ⋆ β)(c) is defined for c ∈ C(n) as follows: apply the infinitesimal decomposition Δ_{(1)} to c to get Σ c_L ⊗_i c_R, then compose on the operad side:

(α ⋆ β)(c) = Σ_i α(c_L) ∘_i β(c_R)

The Maurer-Cartan equation ∂α + α ⋆ α = 0 is equivalent to requiring that the twisted differential on the (co)free (co)algebra squares to zero.

Reference: Loday-Vallette “Algebraic Operads”, Section 6.4 and 11.1.

Classes

TwistingMorphism(cooperad, operad, ...[, name])

An operadic twisting morphism α: C → P.

class uconf.core.twisting.TwistingMorphism(cooperad, operad, morphism_fn, *, name=None)[source]

Bases: object

An operadic twisting morphism α: C → P.

A twisting morphism is a degree -1 linear map from the coaugmentation coideal C̄ of a cooperad C to an operad P, satisfying the Maurer-Cartan equation ∂α + α ⋆ α = 0.

The map is specified by a callable morphism_fn(c_elem) -> p_elem that takes an element of C(n) (for any n ≥ 2) and returns an element of P(n). The map should be zero on C(1) (the coaugmentation coideal kills the counit).

Parameters:
  • cooperad (CooperadLike) – The source cooperad C (a CooperadLike).

  • operad (OperadLike) – The target operad P (an OperadLike).

  • morphism_fn (Callable) – A callable (c_element) -> p_element implementing the degree -1 linear map. The function receives an element of C(n) and must return an element of P(n) (of one degree lower).

  • name (str | None) – Optional display name for the twisting morphism.

Example:

from uconf import Associative
from uconf.constructions import BarConstruction
from uconf.morphisms.canonical_twisting import canonical_projection

# π: B(Ass) → Ass is the canonical projection
pi = canonical_projection(Associative)
assert pi.cooperad is BarConstruction(Associative)
assert pi.operad is Associative
star(other, c_elem)[source]

Compute the pre-Lie convolution product (self ⋆ other)(c_elem).

For c ∈ C(n), the pre-Lie product is:

(α ⋆ β)(c) = Σ_{S, m} (-1)^{|c_L|} (α(c_L) ∘_{min(S)} β(c_R)) · σ_S

where the sum is over all reduced splits Δ_{(1)}(c) = Σ c_L ⊗_S c_R with |S| = n_r ≥ 2, m = n - n_r + 1 ≥ 2, and σ_S is the shuffle permutation that maps the consecutive block {min(S), …, min(S)+n_r-1} back to the (possibly non-contiguous) leaf set S. For contiguous S, σ_S = id.

The Koszul sign (-1)^{|c_L|} comes from permuting the degree-(-1) map β past the graded element c_L.

When the cooperad component provides _iter_all_splits (e.g. the bar construction cooperad), all internal-edge splits—including those with non-contiguous leaf sets—are enumerated and the shuffle permutation σ_S is applied to the composed operad element. Otherwise the method falls back to infinitesimal_cocompose, which only handles contiguous splits.

Parameters:
  • other (TwistingMorphism) – Another twisting morphism β: C → P (same cooperad and operad).

  • c_elem – An element of C(n) for some n ≥ 2.

Returns:

An element of P(n) (the pre-Lie product evaluated on c_elem).

partial_alpha(c_elem)[source]

Compute ∂α(c) = ∂_P(α(c)) + α(∂_C(c)).

This is the boundary of α as a map of graded modules (before the Maurer-Cartan equation twist).

The sign convention is ∂α = ∂_P ∘ α - (-1)^{|α|} α ∘ ∂_C. Since |α| = -1, we have (-1)^{|α|} = -1, so: ∂α(c) = ∂_P(α(c)) + α(∂_C(c)).

Note: some references use ∂α = ∂_P ∘ α + α ∘ ∂_C; this is the same since |α| = -1.

Parameters:

c_elem – An element of C(n).

Returns:

An element of P(n).

maurer_cartan(c_elem)[source]

Evaluate the Maurer-Cartan expression ∂α + α ⋆ α on c_elem.

If α is a valid twisting morphism, this should return zero for all c.

Note

The star method uses infinitesimal_cocompose which may not capture all decompositions for non-planar cooperads. For a robust MC check, use check_maurer_cartan() which verifies d² = 0 on the twisted complex.

Parameters:

c_elem – An element of C(n) for some n ≥ 2.

Returns:

An element of P(n). Zero if and only if the MC equation holds for this input.

check_maurer_cartan(max_arity, base_ring, *, verbose=False)[source]

Verify the Maurer-Cartan equation ∂α + α ⋆ α = 0 up to arity max_arity.

The MC equation is verified indirectly by constructing the twisted bar complex B_α(A) for a trivial P-algebra A and checking d² = 0 on all basis elements. This is equivalent to the MC equation but avoids the subtlety of non-contiguous leaf orderings in the cooperad cocomposition.

Parameters:
  • max_arity (int) – Maximum arity of the bar trees to check.

  • base_ring – Coefficient ring.

  • verbose (bool) – If True, print diagnostic information.

Returns:

True if d² = 0 on all checked elements (equivalent to MC).

Return type:

bool