uconf.core.quasi_planar

Quasi-planar structure for operads and cooperads.

A quasi-planar operad/cooperad is free as a symmetric module:

P(n) = P_pl(n) ⊗ k[S_n]

with planarize decomposing any element into its planar part and symmetric group factor. The differential then splits as:

d(x ⊗ id) = Σ_σ d_σ(x) ⊗ σ

where each d_σ is a degree -1 map P_pl(n) P_pl(n).

This module provides:

  • QuasiPlanarMixin — adds a generic d_sigma method to any graded module that already has planarize and boundary.

Classes

QuasiPlanarMixin()

Mixin providing d_sigma from boundary and planarize.

QuasiPlanarProtocol(n, base_ring)

Structural contract for a quasi-planar operad/cooperad component.

class uconf.core.quasi_planar.QuasiPlanarProtocol(n, base_ring)[source]

Bases: ComponentProtocol, Protocol

Structural contract for a quasi-planar operad/cooperad component.

A class satisfies this protocol when it exposes planarize and boundary (both linear maps) and arity().

Parameters:

n (int)

planar_basis_iter(d)[source]

Returns an iterator over the planar basis keys of this component.

Parameters:

d (int)

Return type:

Iterable

graded_planar_basis(d)[source]

Returns the planar basis of this component in degree d.

Parameters:

d (int)

Return type:

Family

class uconf.core.quasi_planar.QuasiPlanarMixin[source]

Bases: object

Mixin providing d_sigma from boundary and planarize.

Mix this into any CombinatorialFreeModule component that already implements planarize (element → C_pl ⊗ k[S_n]) and boundary.

The d_sigma method computes the σ-component of the differential restricted to planar generators:

d_σ(x) = π_σ(d(x))

where π_σ is the projection onto the σ-factor of the symmetric decomposition P(n) = P_pl(n) k[S_n].

is_planar_key(key)[source]

Return True if key is a planar basis key.

A key is planar when planarize(term(key)) yields only the identity permutation factor.

Parameters:

key (Any)

Return type:

bool

d_sigma(x, sigma)[source]

Return the sigma-component of boundary(x).

Given a planar element x P_pl(n) (or any element), compute boundary(x) and project onto the sigma-factor:

d_σ(x) = Σ_{basis b in d(x)} coeff(b) · planar(b)
          where planarize(b) has σ-component

Parameters

x : element of this component sigma : permutation in S_n (Sage element, list, or tuple)

Returns

The planar element d_σ(x) P_pl(n) such that the σ-component of d(x) is d_σ(x) σ.

Parameters:
  • x (Any)

  • sigma (Any)

Return type:

Any

d_sigma_decompose(x)[source]

Decompose boundary(x) into all σ-indexed components at once.

Returns a dictionary {σ: d_σ(x)} containing only the non-zero components. This is equivalent to calling d_sigma(x, σ) for every σ S_n, but computes boundary and planarize only once instead of once per permutation query.

Parameters

x : element of this component

Returns

dict

Mapping from permutation σ to the non-zero planar element d_σ(x) P_pl(n).

Parameters:

x (Any)

Return type:

dict[Any, Any]

d_sigma_iterate(x, sigmas)[source]

Apply d_sigma iteratively for a sequence of permutations.

Computes d_{σ₁} d_{σ₂} ··· d_{σₖ}(x) where sigmas = (σ₁, σ₂, ..., σₖ).

Parameters

x : element of this component sigmas : iterable of permutations

Returns

The result of applying d_{σₖ}, then d_{σ_{k-1}}, …, then d_{σ₁}.

Parameters:
  • x (Any)

  • sigmas (Iterable[Any])

Return type:

Any