uconf.core.operad

Typing protocols for operad-like objects used in this project.

Note

This package works exclusively with connected operads, i.e. operads P satisfying P(0) = 0 and P(1) = k (the ground field, spanned by the unit). Connectedness implies that every internal vertex of a tree in the bar construction has arity >= 2, which bounds the number of vertices in arity n by n - 1. All concrete models and wrappers in this package are connected.

Module Attributes

OperadLike

Type alias for accepted operad inputs (class or factory instance).

Classes

OperadComponent(n, base_ring)

Structural contract for one fixed-arity operad component.

OperadFactory(*args, **kwargs)

Structural contract for operad factories and wrappers.

class uconf.core.operad.OperadComponent(n, base_ring)[source]

Bases: ComponentProtocol, Protocol

Structural contract for one fixed-arity operad component.

Parameters:

n (int)

static compose(x, input, y)[source]

Computes x \circ_i y.

Parameters:
  • x (Element)

  • input (int)

  • y (Element)

Return type:

Element

static unit(base_ring)[source]

Returns the unit element of the operad.

Parameters:

base_ring (Any)

Return type:

Element

static unit_key()[source]

Returns the basis key of the unit element in arity 1.

Return type:

Any

class uconf.core.operad.OperadFactory(*args, **kwargs)[source]

Bases: Protocol

Structural contract for operad factories and wrappers.

Factory instances (for example shifted/Hadamard wrappers) are callable by arity and expose operadic structure maps at the factory level.

unit(base_ring)[source]

Returns the unit element of the operad.

Return type:

Any

unit_key()[source]

Returns the basis key of the unit element in arity 1.

Return type:

Any

compose(x, i, y)[source]

Computes x \circ_i y.

Parameters:
  • x (Any)

  • i (int)

  • y (Any)

Return type:

Any

uconf.core.operad.OperadLike: TypeAlias = type[uconf.core.operad.OperadComponent] | uconf.core.operad.OperadFactory

Type alias for accepted operad inputs (class or factory instance).