ComCH documentation

ComCH is a Python 3 package for the study of commutativity up to coherent homotopies.

Motivation

Commutativity up to coherent homotopies is a concept originated in algebraic topology. It has found modern uses in topological data analysis, motion planning, condensed matter physics and several other areas. An important challenge for the application of the mathematical ideas surrounding this concept, which are often defined non-constructively, is to describe them in effective terms suitable for concrete computations. This package, a specialized computer algebra system, serves to bridge this gap between theoretical concepts and concrete applications.

Mathematical overview

After the pioneering work of Steenrod, Adem, Serre, Cartan, Araki-Kudo, Dyer-Lashof, Stashef, Boardman-Vogt, May, and many others, today there is a rich theory of commutativity up to coherent homotopies whose modern framework is provided by operads and PROPs, and where \(E_n\)-operads play a central role parameterizing the different levels of homotopical commutativity. In this package, we focus on the category of chain complexes, and consider two models of the \(E_\infty\) equipped with filtrations by \(E_n\)-operads. These are respectively due to McClure-Smith and Berger-Fresse and are known as the surjection and Barratt-Eccles operads.

Installation

This package is written in Python 3 and has no dependencies. It can be installed from a terminal simply entering:

python3 -m pip install comch

comch.free_module: Free Modules

comch.free_module.FreeModuleElement([data, ...])

Element in a free \(\mathbb{Z}/n \mathbb{Z}\)-module.

class comch.free_module.FreeModuleElement(data=None, torsion=None)[source]

Element in a free \(\mathbb{Z}/n \mathbb{Z}\)-module.

Let \(R\) be a ring and \(B\) a set. The free \(R\)-module generated by \(B\) consists of all \(R\)-linear combination of elements in \(B\)

\[R[B] = \Big\{ \sum_i r_ib_i\ |\ r_i \in R, b_i \in B \Big\}.\]

This class models elements in free \(\mathbb Z/n \mathbb Z\)-modules with \(\mathbb Z/0 \mathbb Z = \mathbb Z\). The ring is specified via the class attribute torsion corresponding to the non-negative integer \(n\).

torsion

The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Type:

int

default_torsion = 0

Used if torsion is None during initialization.

Type:

Class attribute

__init__(data=None, torsion=None)[source]

Initializes self.

Parameters:
  • data (dict) – Dictionary representing a linear combination of basis elements. Items in the dict correspond to pairs (basis_element: coefficient).

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Example

>>> print(FreeModuleElement())
0
>>> print(FreeModuleElement({'a': 1, 'b': -1, 'c': 0}))
a - b
__add__(other)[source]

Addition: self + other.

Parameters:

other (comch.free_module.FreeModuleElement object) – The element to add to self.

Returns:

The sum of self and other.

Return type:

comch.free_module.FreeModuleElement object

Example

>>> FreeModuleElement({'a': 1, 'b': 2}) + FreeModuleElement({'a': 1})
FreeModuleElement({'a': 2, 'b': 2})
__sub__(other)[source]

Diference: self - other.

Parameters:

other (comch.free_module.FreeModuleElement object) – The element to subtract from self.

Returns:

The difference of self and other.

Return type:

comch.free_module.FreeModuleElement object

Example

>>> FreeModuleElement({'a': 1, 'b': 2}) - FreeModuleElement({'a': 1})
FreeModuleElement({'b': 2})
__rmul__(c)[source]

Left action: c * self.

Parameters:

c (int) – The element to act self with.

Returns:

The action of c on self.

Return type:

comch.free_module.FreeModuleElement object

Example

>>> 3 * FreeModuleElement({'a':1, 'b':2})
FreeModuleElement({'b': 6, 'a': 3})
__truediv__(c)[source]

Division of self by c.

When c has a multiplicative inverse in the ground ring, divides self by c.

Parameters:

c (int) – The element to divide self by.

Returns:

The action of 1/c on self.

Return type:

comch.free_module.FreeModuleElement object

Example

>>> FreeModuleElement({'a': 1, 'b': 2}, torsion=5) / 3
FreeModuleElement({'b': 4, 'a': 2})
__neg__()[source]

Additive inverse: - self.

Returns:

The additive inverse of self.

Return type:

comch.free_module.FreeModuleElement object

Example

>>> - FreeModuleElement({'a': 1, 'b': 2})
FreeModuleElement({'a': -1, 'b': -2})
__iadd__(other)[source]

In place addition: self = self + other.

Parameters:

other (comch.free_module.FreeModuleElement object) – The element to add to self.

Example

>>> x = FreeModuleElement({'a': 1, 'b': 2})
>>> x += FreeModuleElement({'a': 3, 'b': 6})
>>> x
FreeModuleElement({'b': 8, 'a': 4})
__isub__(other)[source]

In place difference: self = self - other.

Parameters:

other (comch.free_module.FreeModuleElement object) – The element to subtract from self.

Example

>>> x = FreeModuleElement({'a': 1, 'b': 2})
>>> x -= FreeModuleElement({'a': 3, 'b': 6})
>>> x
FreeModuleElement({'a': -2, 'b': -4})
preferred_rep()[source]

The preferred representative of self.

Consisting of pairs basis_element: coefficient with coefficient different from 0 and in the set \(\{1, \dots, r-1\}\) if torsion is an int denoted \(r\).

Example

>>> FreeModuleElement({'a': 1, 'b': 2, 'c': 0})
FreeModuleElement({'b': 2, 'a': 1})
set_torsion(torsion)[source]

Sets the torsion of self.

Parameters:

torsion (int) – The new torsion of self

Example

>>> FreeModuleElement({'a': 1, 'b': 2}).set_torsion(2)
FreeModuleElement({'a': 1})
create(other=None)[source]

Initializes with the same type and attribute values as self.

Parameters:

other (dict or None, default: None) – Data to be initialized.

Returns:

The initialized object with the given data

Return type:

type(self) object

Example

>>> x =  FreeModuleElement({'a': 1})
>>> x + x.create({'b': 1})
FreeModuleElement({'a': 1, 'b': 1})
zero()[source]

Initializes 0 with same type and attribute values as self.

Returns:

The initialized empty object

Return type:

type(self) object

Example

>>> x = FreeModuleElement({'a': 1})
>>> x + x.zero() == x
True

comch.symmetric: Symmetric Groups and Rings

comch.symmetric.SymmetricGroupElement(iterable)

Element in a finite symmetric group.

comch.symmetric.SymmetricRingElement([data, ...])

Element in the group ring of finite symmetric groups.

comch.symmetric.SymmetricRing()

Produces symmetric ring elements of interest.

class comch.symmetric.SymmetricGroupElement(iterable)[source]

Element in a finite symmetric group.

We refer to elements in the group of permutations of \(r\) elements \(\mathrm S_r\) as symmetric group elements of arity \(r\). An element \(\pi \in \mathrm S_r\) can be thought of as a bijection from \(\{1,\dots,r\}\) to itself, and can be represented by the tuple of its images \((\pi(1), \dots, \pi(r))\).

__init__(iterable)[source]

Initializes self.

Parameters:

interable (:class:'iterable') – Used to create a tuple representing a permutation of (1,…,r) for some r.

Example

>>> print(SymmetricGroupElement((1,3,2)))
(1,3,2)
property sign

Sign of self.

The sign is defined as the mod 2 number of transpositions required to express the element.

Returns:

The sign of self.

Return type:

class: int

Example

>>> SymmetricGroupElement((5,2,4,3,1)).sign
1
to_cycles(singletons=False)[source]

Collection of cycles representing self.

Parameters:

singletons (bool) – Show cycles of length 1.

Returns:

The representation of self as a product of cycles.

Return type:

class: list of tuple

Example

>>> SymmetricGroupElement((5,2,4,3,1)).to_cycles()
[(1, 5), (3, 4)]
property arity

Arity of self

The arity of a symmetric group element is defined as the cardinality of its domain.

Returns:

The arity of self.

Return type:

class: ‘int’

Example

>>> SymmetricGroupElement((5,2,4,3,1)).arity
5
__mul__(other)[source]

Product: self * other.

This product agrees with the composition of bijections: self \(\circ\) other.

Returns:

The product of self and other.

Return type:

class: comch.symmetric.SymmetricGroupElement object

Example

>>> x = SymmetricGroupElement((1,3,2))
>>> y = SymmetricGroupElement((2,3,1))
>>> print(y * x)
(2,1,3)
inverse()[source]

Multiplicative inverse: self\(^{-1}\).

Returns:

The multiplicative inverse of self.

Return type:

class: comch.symmetric.SymmetricGroupElement object

Examples

>>> pi = SymmetricGroupElement((2,3,1))
>>> print(pi.inverse())
(3,1,2)
__pow__(times)[source]

Iterated product of self: self * … * self.

Returns:

The product of self with itself times number of times.

Return type:

class: comch.symmetric.SymmetricGroupElement object

Example

>>> x = SymmetricGroupElement((2,3,4,5,1))
>>> print(x**5)
(1,2,3,4,5)
compose(other, position)[source]

Operadic compositions: self \(\circ_{position}\) other.

The (operadic) composition of symmetric elements is defined as follows: Given \(\pi \in \Sigma_r\), \(\tau \in \Sigma_{s}\) and \(i \in \{1, \dots, r\}\) produces a permutation in \(\Sigma_{r + s - 1}\). We begin by considering \(\{1, 2, \dots, r + s - 1\}\) as an ordered set \(R\) with \(r\) elements by grouping the subset \(S = \{i, \dots, i+s-1\}\) into a single element, then applying \(\pi\) to \(R\) and \(\sigma\) to the \(S\), and, finally, forgetting the grouping. More precisely, for integers \(r, s \geq 1\) and \(i \in \{1, \ldots, r\}\) the partial composition is the linear map

\[\circ_i : \Sigma_r \otimes \Sigma_s \to \Sigma_{r+s-1}\]

is defined for \(\pi = (\pi(1), \dots, \pi(r))\) and \(\sigma = (\sigma(1), \dots, \sigma(s))\) to be the sequence obtained by replacing in position \(i\) of the sequence \(\pi\) the sequence obtained by adding \(i-1\) to the entries of \(s\) and adding \(s-1\) to the entries of \(\pi\) that whose value is greater than \(i\).

Returns:

The composition of self and other.

Return type:

class: comch.symmetric.SymmetricGroupElement object

Example

>>> x = SymmetricGroupElement((1,3,2))
>>> y = SymmetricGroupElement((2,1))
>>> print(x.compose(y, 1))
(2,1,4,3)
class comch.symmetric.SymmetricRingElement(data=None, torsion=None)[source]

Element in the group ring of finite symmetric groups.

Let \(R\) be a ring and \(\Gamma\) a group. The free \(R\)-module generated by \(\Gamma\) is a ring with product defined by linearly extending the group product, i.e.,

\[\left( \sum_i r_ia_i \right) \left( \sum_j s_jb_j \right) = \sum_{i,j} (r_is_j)(a_ib_{j}).\]

Elements in the group rings \(\mathbb Z[\mathrm S_r]\) or \(\mathbb Z/n\mathbb Z[\mathrm S_r]\) are referred to as symmetric ring elements.

Parameters:
  • data (int or None, default: None) – Dictionary representing a linear combination of basis elements. Items in the dictionary correspond to basis_element: coefficient pairs. Each basis_element must create a SymmetricGroupElement and coefficient must be an int.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

torsion

The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Type:

int

Example

>>> print(SymmetricGroupElement((1,3,2)))
(1,3,2)
__init__(data=None, torsion=None)[source]

Initializes self.

Parameters:
  • data (dict) – Dictionary representing a linear combination of basis elements. Items in the dict correspond to pairs (basis_element: coefficient).

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Example

>>> print(FreeModuleElement())
0
>>> print(FreeModuleElement({'a': 1, 'b': -1, 'c': 0}))
a - b
property arity

Return the arity of self if homogeneous and None otherwise.

self is said to be homogeneous if all basis elements belong to the same arity.

Returns:

The arity of self if homogeneous or None else

Return type:

None or comch.free_module.FreeModuleElement object

Example

>>> SymmetricRingElement({(5,2,4,3,1): 1}).arity
5
>>> SymmetricRingElement({(2,3,1): 1, (1,2): 1}).arity
__mul__(other)[source]

Linear product in the symmetric group ring: self * other.

Parameters:

other (comch.symmetric.SymmetricRingElement object or comch.symmetric.SymmetricGroupElement object or int) – The element to multiply with self.

Returns:

The product of self and other.

Return type:

comch.symmetric.SymmetricRingElement object

Examples

>>> p = SymmetricRingElement({(4,3,2,1): 1, (1,2,3,4): 2})
>>> print(3 * p)
3(4,3,2,1) + 6(1,2,3,4)
>>> q = SymmetricRingElement({(4,1,2,3): 1})
>>> print(p * q)
(1,4,3,2) + 2(4,1,2,3)
__pow__(times)[source]

Iterated product of self: self * … * self.

Returns:

The iterated product of self.

Return type:

comch.symmetric.SymmetricRingElement object

Examples

>>> p = SymmetricRingElement({(4,3,2,1): 1, (1,2,3,4): 2})
>>> p ** 2
SymmetricRingElement({(1, 2, 3, 4): 3})
compose(other, position)[source]

Linear operadic compositions: self \(\circ_{position}\) other.

The operadic composition is defined by extending linearly the operadic composition of symmetric group elements.

Parameters:
Returns:

The composition of self and other at position.

Return type:

comch.symmetric.SymmetricRingElement object

Examples

>>> x = SymmetricRingElement({(2,3,1): 1, (1,2,3): -1})
>>> y = SymmetricRingElement({(2,1): 1, (1,2): 1})
>>> print(x.compose(y, 2))
(3,2,4,1) + (2,3,4,1) - (1,3,2,4) - (1,2,3,4)
class comch.symmetric.SymmetricRing[source]

Produces symmetric ring elements of interest.

static identity_element(arity, torsion=None)[source]

The identity \(\mathrm{id}\) in \(\mathrm S_r\).

Parameters:
  • arity (int positive) – The arity of \(\mathrm S_r\), i.e., \(r\)

  • torsion (int positive) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Returns:

The identity element (1,…,r).

Return type:

comch.symmetric.SymmetricRingElement object

Examples

>>> print(SymmetricRing.identity_element(3))
(1,2,3)
static rotation_element(arity, torsion=None)[source]

The element \(\rho\).

Defined as the preferred generator of the cyclic subgroup of order \(r\) in \(\mathrm S_r\). Explicitely,

\[\begin{split}\rho(i) = \begin{cases} i+1 & i < r, \\ 1 & i = r. \end{cases}\end{split}\]
Parameters:
  • arity (int positive) – The arity of \(\mathrm S_r\), i.e., \(r\)

  • torsion (int positive) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Returns:

The rotation element (2,3,…,r-1).

Return type:

comch.symmetric.SymmetricRingElement object

Examples

>>> print(SymmetricRing.rotation_element(3))
(2,3,1)
static transposition_element(arity, torsion=None)[source]

The element \(\rho - \mathrm{id}\).

Parameters:
  • arity (int positive) – The arity of \(\mathrm S_r\), i.e., \(r\)

  • torsion (int positive) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Returns:

The transposition element \(\rho - \mathrm{id}\).

Return type:

comch.symmetric.SymmetricRingElement object

Examples

>>> print(SymmetricRing.transposition_element(3))
(2,3,1) - (1,2,3)
static norm_element(arity, torsion=None)[source]

The element \(\mathrm{id} + \rho + \cdots + \rho^{r-1}\).

Parameters:
  • arity (int positive) – The arity of \(\mathrm S_r\), i.e., \(r\)

  • torsion (int positive) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Returns:

The norm element \(\mathrm{id} + \rho + \cdots + \rho^{r-1}\).

Return type:

comch.symmetric.SymmetricRingElement object

Examples

>>> print(SymmetricRing.norm_element(3))
(1,2,3) + (2,3,1) + (3,1,2)

comch.surjection: The surjection operad

comch.surjection.SurjectionElement([data, ...])

Element in the surjection operad.

comch.surjection.Surjection()

Produces surjection elements of interest.

class comch.surjection.SurjectionElement(data=None, torsion=None, convention=None)[source]

Element in the surjection operad.

For a positive integer \(r\) let \(\mathcal X(r)_d\) be the free \(R\)-module generated by all functions \(s : \{1, \dots, d+r\} \to \{1, \dots, r\}\) modulo the \(R\)-submodule generated by degenerate functions, i.e., those which are either non-surjective or have a pair of equal consecutive values. There is a left action of \(\mathrm S_r\) on \(\mathcal X(r)\) which is up to signs defined on basis elements by \(\pi \cdot s = \pi \circ s\). We represent a surjection \(s\) as the sequence of its values \(\big( s(1), \dots, s(n+r) \big)\). The boundary map in this complex is defined up to signs by

\[\partial s = \sum_{i=1}^{r+d} \pm \big(s(1),\dots,\widehat{s(i)},\dots,s(n+r)\big).\]

We refer to [McS] and [BF], where this operad was introduced, for their corresponding sign conventions, and to the corresponding methods below for the operadic composition and complexity filtration.

References

[McS]: J. McClure, and J. Smith. “Multivariable cochain operations and little n-cubes.” Journal of the American Mathematical Society 16.3 (2003): 681-704.

[BF]: C. Berger, and B. Fresse. “Combinatorial operad actions on cochains.” Mathematical Proceedings of the Cambridge Philosophical Society. Vol. 137. No. 1. Cambridge University Press, 2004.

convention

The sign convention used.

Type:

string ‘Berger-Fresse’ or ‘McClure-Smith’.

default_convention = 'Berger-Fresse'

Used if convention is None during initialization.

Type:

Class attribute

__init__(data=None, torsion=None, convention=None)[source]
Parameters:
  • data (dict or None, default: None) – Dictionary representing a linear combination of basis elements. Items in the dictionary correspond to basis_element: coefficient pairs. Each basis_element must create a tuple of int and coefficient must be an int.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Examples

>>> s = SurjectionElement()
>>> print(s)
0
>>> s = SurjectionElement({(1,2,1,3,1,3): 1})
>>> print(s)
(1,2,1,3,1,3)
property arity

Arity of self.

Defined as None if self is not homogeneous. The arity of a basis surjection element agrees with the maximum value it attains.

Returns:

The arity of self.

Return type:

int

Example

>>> SurjectionElement({(1,2,1,3,1): 1}).arity
3
property degree

Degree of self.

Defined as None if self is not homogeneous. The degree of a basis surjection agrees with the cardinality of its domain minus its arity.

Returns:

The degree of self.

Return type:

int

Example

>>> SurjectionElement({(1,2,1,3,1): 1}).arity
3
property complexity

Complexity of self.

Defined as None if self is not homogeneous. The complexity of a finite binary sequence (i.e. a sequence of two distinct values) is defined as the number of consecutive distinct elements in it. For example, (1,2,2,1) and (1,1,1,2) have complexities 2 and 1 respectively. The complexity of a basis surjection element is defined as the maximum value of the complexities of its binary subsequences. Notice that for arity 2, the complexity of an element is equal to its degree plus 1. It is proven in [McCS] that the subcomplex generated by basis surjection elements of complexity at most \(n\) define a suboperad of \(\mathcal X\) modeling an \(E_{n+1}\)-operad.

Returns:

The complexity of self.

Return type:

int

Example

>>> SurjectionElement({(1,2,1,3,1): 1}).complexity
2
property filtration

Filtration by sum of all pairwise complexities.

Returns:

The filtration level of self.

Return type:

int

Example

>>> SurjectionElement({(1,2,1,3,2): 1}).filtration
6
boundary()[source]

Boundary of self.

Up to signs, it is defined by taking the sum of all elements obtained by removing one entry at the time. Explicitly, for basis surjection elements we have

\[\partial s = \sum_{i=1}^{r+d} \pm s \circ \delta_i = \sum_{i=1}^{r+d} \pm \big(s(1),\dots,\widehat{s(i)},\dots,s(n+r)\big).\]
Returns:

The boundary of self with the corresponiding sign convention.

Return type:

comch.surjection.SurjectionElement

Example

>>> s = SurjectionElement({(3,2,1,3,1,3): 1})
>>> s.convention = 'Berger-Fresse'
>>> print(s.boundary())
(2,1,3,1,3) - (3,2,3,1,3) - (3,2,1,3,1)
>>> s.convention = 'McClure-Smith'
>>> print(s.boundary())
(3,2,3,1,3) - (2,1,3,1,3) - (3,2,1,3,1)
__rmul__(other)[source]

Left action: other * self

Left multiplication by a symmetric group element or an integer. Defined up to signs on basis elements by applying the permutation to the values of the surjection.

Parameters:

other (int or comch.symmetric.SymmetricRingElement.) – The element to left act on self with.

Returns:

The product: other * self, with the given sign convention.

Return type:

comch.surjection.SurjectionElement

Example

>>> surj = SurjectionElement({(1,2,3,1,2): 1})
>>> print(- surj)
- (1,2,3,1,2)
>>> rho = SymmetricRingElement({(2,3,1): 1})
>>> print(rho * surj)
(2,3,1,2,3)
orbit(representation='trivial')[source]

The preferred representative of the symmetric orbit of self.

The preferred representative in the orbit of basis surjections element is the one satisfying that the first occurence of each integer appear in increasing order.

The representation used can be either ‘trivial’ or ‘sign’.

Returns:

The preferred element in the symmetric orbit of self.

Return type:

comch.surjection.SurjectionElement

Example

>>> s = SurjectionElement({(1,3,2): 1})
>>> print(s.orbit(representation='trivial'))
(1,2,3)
>>> print(s.orbit(representation='sign'))
- (1,2,3)
__call__(other, coord=1)[source]

The action: self*(*other).

The action of self on the tensor factor specified by coord on an element in the tensor product of normalized chains of a standard simplex or of a standard cube.

Parameters:
Returns:

The action of self on other at coord.

Return type:

comch.simplicial.SimplicialElement or comch.cubical.CubicalElement

compose(other, position)[source]

Operadic compositions: self \(\circ_{position}\) other.

The \(i\)-th composition \(x \circ_i y\) of \(x \in \mathcal X(r)\) and \(y \in \mathcal X(s)\) is defined by the following procedure: let \(w\) be the cardinality of \(x^{-1}(i)\), for every collection of ordered indices

\[1 = j_0 \leq j_1 \leq j_2 \leq \cdots \leq j_{w-1} \leq j_w = s\]

we construct an associated splitting of \(y\)

\[(y(j_0), \dots, y(j_1));\ (y(j_1), \dots, y(j_2));\ \cdots \ ;\ (y(j_{w-1}), \dots, y(j_w)).\]

The element \(x \circ_i y \in \mathcal(r+s-1)\) is represented, up to signs, as the sum over all possible collections of order indices of the sequence obtained in the following two steps: 1) replace each occurrence of \(i\) in \(x\) by the corresponding sequence in the associated splitting having its values shifted up by \(i-1\), and 2) shift up by \(s-1\) the values of \(x\) greater than \(i\).

Parameters:
Returns:

The operadic composition of self and other.

Return type:

comch.surjection.SurjectionElement

Example

>>> x = SurjectionElement({(1,2,1,3): 1}, convention='Berger-Fresse')
>>> y = SurjectionElement({(1,2,1): 1}, convention='Berger-Fresse')
>>> print(x.compose(y, 1))
(1,3,1,2,1,4) - (1,2,3,2,1,4) - (1,2,1,3,1,4)
suspension()[source]

Image of self in the suspension of the surjection operad.

Given a basis element \(u\) in arity \(r\) and degree \(d\) the suspension is in degree \(d-r+1\) and is \(0\) if \((u(1),\dots,u(r))\) is not a permutation and \(sgn(u(1),\dots,u(r)) (u(r),\dots,u(r+d))\) otherwise.

Returns:

The image of self in the suspension of the operad.

Return type:

comch.surjection.SurjectionElement

Example

>>> x = SurjectionElement({(1,3,2,1,2):1}, convention='Berger-Fresse')
>>> print(x.suspension())
- (2,1,2)
preferred_rep()[source]

Preferred representative of self.

Removes pairs basis_element: coefficient which satisfy either of: 1) the basis element has equal consecutive values, 2) the basis element does not represent a surjection, or 3) the coefficient is 0.

Returns:

The preferred representative of self.

Return type:

comch.surjection.SurjectionElement

Example

>>> print(SurjectionElement({(1,1,2):1, (1,3):1, (1,2):0}))
0
class comch.surjection.Surjection[source]

Produces surjection elements of interest.

static may_steenrod_structure(arity, degree, torsion=None, convention=None)[source]

Representative of the requested Steenrod product.

Let \(\mathrm{C}_n\) be the cyclic group of order \(n\) thought of as the subgroup of \(\mathrm{S}_n\) generated by an element \(\rho\). We denote this inclusion by \(\iota : \mathrm C_r \to \mathrm S_r\). The elements

\[T = \rho-1 \quad \text{ and } \quad N = 1+\rho+\cdots+\rho^{r-1}\]

in \(R[C_r]\) define a minimal resolution \(W(r)\)

\[R[C_r] \stackrel{T}{\longleftarrow} R[C_r] \stackrel{N}{\longleftarrow} R[C_r] \stackrel{T}{\longleftarrow} \cdots\]

of \(R\) by a free differential graded \(R[C_r]\)-module. We denote a preferred basis element of \(W(r)_i\) by \(e_i\).

A May-Steenrod structure on an operad \(\mathcal O\) is a morphism of \(\mathrm{C}\)-modules \(\mathcal W \stackrel{\psi}{\longrightarrow} \mathcal O\) for which there exists a factorization through an \(E_\infty\)-operad

\[\mathcal W \stackrel{\iota}{\longrightarrow} \mathcal R \stackrel{\phi}{\longrightarrow} \mathcal O\]

such that \(\iota\) is a weak equivalence and \(\phi\) a morphism of operads.

This method returns the image under the May-Steenrod structure constructed in [KMM] of the preferred basis element of \(W(r)_i\).

Parameters:
  • arity (int) – The arity considered.

  • degree (int) – The degree considered.

  • torsion (int or None, default None) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

  • convention (string or None, default None) – The sign convention of the surjection operad.

Returns:

The image of the basis element under the May-Steenrod structure.

Return type:

comch.surjection.SurjectionElement

References

[KMM]: Kaufmann, R. M., & Medina-Mardones, A. M. (2020). Chain level Steenrod operations. arXiv preprint arXiv:2010.02571.

static steenrod_operation(p, s, q, bockstein=False, convention='McClure-Smith')[source]

Chain level representative of \(P_s\) or \(\beta P_s\).

Let \(A\) be such that \(\mathrm{End}_A\) is equipped with a May-Steenrod structure

\[\psi : W \to \mathrm{End}_A.\]

For any prime \(p\), define the linear map \(D_d : A \otimes \mathbb F_p \to A \otimes \mathbb F_p\) by

\[\begin{split}D_d(a) = \begin{cases} \psi(e_d)(a^{\otimes p})& d \geq 0 \\ 0 & d < 0. \end{cases}\end{split}\]

For any integer \(s\), the Steenrod operations

\[P_s : H_\bullet(A; \mathbb F_2) \to H_{\bullet + s}(A; \mathbb F_2)\]

and, for \(p > 2\),

\[P_s : H_\bullet(A; \mathbb F_p) \to H_{\bullet + 2s(p-1)}(A; \mathbb F_p) \qquad \beta P_s : H_\bullet(A; \mathbb F_p) \to H_{\bullet+2s(p-1)-1}(A; \mathbb F_p)\]

are defined for a class \([a]\) of degree \(q\) respectively by

\[P_s\big([a]\big) = \big[D_{s-q}(a)\big] \qquad\]

and

\[P_s\big([a]\big) = \big[(-1)^s \nu(q) D_{(2s-q)(p-1)}(a)\big] \qquad \beta P_s\big([a]\big) = \big[(-1)^s \nu(q)D_{(2s-q)(p-1)-1}(a)\big]\]

where \(\nu(q) = (-1)^{q(q-1)m/2}(m!)^q\) and \(m = (p-1)/2\).

Parameters:
  • p (int) – The prime considered.

  • s (int) – The subscript of the Steenrod operation.

  • q (int) – The degree of the class acted on.

  • bockstein (bool, default False) – Determines the use of the Bockstein homomorphism.

  • convention (string default ‘McClure-Smith’) – The sign convention used.

Returns:

The surjection element representing the given Steenrod operation.

Return type:

comch.surjection.SurjectionElement

References

[May]: May, J. Peter. “A general algebraic approach to Steenrod operations.” The Steenrod Algebra and its Applications: a conference to celebrate NE Steenrod’s sixtieth birthday. Springer, Berlin, Heidelberg, 1970.

static steenrod_chain(p, s, q, bockstein=False, shape='simplex')[source]

Chain representative of a Steenrod operation.

Given the parameters of a Steenrod operation: prime p, subindex s, and cochain degree q, and bockstein, it returns the chain in the tensor product of a standard simplex on which the iterated tensor product of the cochain acts defining a cochain representative of its image under the operation.

Parameters:
  • p (int) – The prime considered.

  • s (int) – The subscript of the Steenrod operation.

  • q (int) – The degree of the class acted on.

  • bockstein (bool, default False) – Determines the use of the bockstein homomorphism.

  • shape (string, ‘simplex’ or ‘cube’) – Action on the standard simplex or cube

Returns:

The tensor product elment obtained by applying the representative of the specified Steenrod operation.

Return type:

comch.simplicial.SimplicialElement or comch.cubical.CubicalElement

Examples

>>> print(Surjection.steenrod_chain(2, -1, -2))
((0,2,3),(0,1,2)) + ((0,1,3),(1,2,3))
static basis(arity, degree, complexity=None)[source]

Basis of the chain complex.

Basis of \(\mathcal X\) In the given arity, degree and complexity.

Parameters:
  • arity (int) – The arity considered.

  • degree (int) – The degree considered.

  • complexity (int, default None) – The complexity considered.

Returns:

The basis for the complex of surjection in the given arity, degree and complexity.

Return type:

list of tuple of int

Examples

>>> Surjection.basis(2,1)
[(1, 2, 1), (2, 1, 2)]

comch.barratt_eccles: Barratt-Eccles operad

comch.barratt_eccles.BarrattEcclesElement([...])

Element in the Barratt-Eccles operad

comch.barratt_eccles.BarrattEccles()

Produces Barratt-Eccles elements of interest.

class comch.barratt_eccles.BarrattEcclesElement(data=None, torsion=None)[source]

Element in the Barratt-Eccles operad

For a non-negative integer \(r\) define the simplicial set \(E(\mathrm S_r)\) by

\[\begin{split}\begin{aligned} E(\mathrm S_r)_n &= \{ (\sigma_0, \dots, \sigma_n)\ |\ \sigma_i \in \mathrm{S}_r\}, \\ d_i(\sigma_0, \dots, \sigma_n) &= (\sigma_0, \dots, \widehat{\sigma}_i, \dots, \sigma_n), \\ s_i(\sigma_0, \dots, \sigma_n) &= (\sigma_0, \dots, \sigma_i, \sigma_i, \dots, \sigma_n), \end{aligned}\end{split}\]

corresponding to the unreduced bar construction on the monoid \(\mathrm S_r\). It is equipped with a left \(\mathrm S_r\)-action defined on basis elements by

\[\sigma (\sigma_0, \dots, \sigma_n) = (\sigma \sigma_0, \dots, \sigma \sigma_n).\]

The chain complex resulting from applying the functor of integral normalized chains to it is denoted \(\mathcal E(r)\), which corresponds to the arity \(r\) part of the Barratt-Eccles operad.

References

[BF]: C. Berger, and B. Fresse. “Combinatorial operad actions on cochains.” Mathematical Proceedings of the Cambridge Philosophical Society. Vol. 137. No. 1. Cambridge University Press, 2004.

__init__(data=None, torsion=None)[source]

Initializes self.

Parameters:
  • data (dict or None, default: None) – Dictionary representing a linear combination of basis elements. Items in the dictionary correspond with pairs basis_element: coefficient. Each basis_element must create a tuple of commch.symmetric.SymmetricGroupElement and coefficient must be an int.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Examples

>>> x = BarrattEcclesElement()
>>> print(x)
0
>>> y = BarrattEcclesElement({((1,3,2), (2,1,3)): -1})
>>> print(y)
- ((1,3,2),(2,1,3))
property arity

Arity of self.

Defined as None if self is not homogeneous. The arity of a basis Barratt-Eccles element agrees with arity of any of the symmetric group elements contained in it.

Returns:

The arity of self.

Return type:

int

Example

>>> x = BarrattEcclesElement({((1,3,2), (2,3,1)): 1})
>>> x.arity
3
property degree

Degree of self.

Defined as None if self is not homogeneous. The degree of a basis Barratt-Eccles element agrees with the cardinality of the tuple minus one.

Returns:

The degree of self.

Return type:

int

Example

>>> x = BarrattEcclesElement({((1,3,2), (2,3,1)): 1})
>>> x.degree
1
property complexity

Complexity of self.

Defined as None if self is not homogeneous. The complexity of a finite binary sequence of elements in \(\Sigma_2\) is defined as the number of consecutive distinct elements in it. For example, \(((12),(21),(21),(12))\) and \(((12),(12),(12),(21))\) have complexities 2 and 1 respectively. For any basis Barratt-Eccles element, and any pair of positive integers \(i < j\) less than its arity, we can form a sequence as above by precomposing each permutation by the order-preserving inclusion sending \(1\) and \(2\) respectively to \(i\) and \(j\). The complexity of a basis Barratt-Eccles element is defined as the maximum over $i < j$ of the complexities of these. Notice that for arity 2, the complexity of an element is equal to its degree plus 1. It is proven in [BF] that the subcomplex generated by basis Barratt-Eccles elements of complexity at most \(n\) define a suboperad of \(\mathcal E\) modeling an \(E_{n+1}\)-operad.

Returns:

The complexity of self.

Return type:

int

Example

>>> BarrattEcclesElement({((1,2,3), (1,3,2), (1,2,3)): 1}).complexity
2
boundary()[source]

Boundary of self.

It is defined as the alternating sum of the face maps. Explicitly, for basis Barrat-Eccles elements, we have

\[\begin{equation*} \partial(\sigma_0, \dots, \sigma_n) = \sum_{i=0}^n(\sigma_0, \dots, \widehat{\sigma}_i, \dots, \sigma_n). \end{equation*}\]
Returns:

The boundary of self.

Return type:

comch.barratt_eccles.BarrattEcclesElement

Example

>>> x = BarrattEcclesElement({((1,3,2), (2,3,1), (1,2,3)): 1})
>>> print(x.boundary())
((2,3,1),(1,2,3)) - ((1,3,2),(1,2,3)) + ((1,3,2),(2,3,1))
__rmul__(other)[source]

Left action: other * self.

Left multiplication by a symmetric group element or an integer. Defined on basis Barratt-Eccles elements by acting coordinatewise. Explicitly,

\[\sigma (\sigma_0, \dots, \sigma_n) = (\sigma \sigma_0, \dots, \sigma \sigma_n).\]
Parameters:

other (int or comch.symmetric.SymmetricRingElement.) – The element to left act on self with.

Returns:

The product: other * self.

Return type:

comch.barratt_eccles.BarrattEcclesElement

Example

>>> x = BarrattEcclesElement({((1,3,2), (2,3,1)): 1})
>>> print(-x)
- ((1,3,2),(2,3,1))
>>> rho = SymmetricRingElement({(2,3,1): 1})
>>> print(rho * x)
((2,1,3),(3,1,2))
orbit(representation='trivial')[source]

The preferred representative of the symmetric orbit of self.

The preferred representative in the orbit of a basis element is one whose first symmetric group element is the identity.

The representation used can be either ‘trivial’ or ‘sign’.

Returns:

The preferred element in the symmetric orbit of self.

Return type:

comch.barratt_eccles.BarrattEcclesElement

Example

>>> x = BarrattEcclesElement({((1,3,2), (1,2,3)): 1})
>>> print(x.orbit())
((1,2,3),(1,3,2))
>>> print(x.orbit('sign'))
- ((1,2,3),(1,3,2))
compose(other, position)[source]

Operadic compositions: self \(\circ_{position}\) other.

The operadic composition can be described in terms of the composition of symmetric group elements using the Eilenberg-Zilber map. Let us notice that at the level of the simplicial set \(E\) we have compositions induced coordinate-wise

\[{\circ}_{i}: E(r) \times E(s) \to E(r + s - 1).\]

We define the composition of \(\mathcal E\) by precomposing

\[N_\bullet(\circ_i) \colon N_\bullet(E(r) \times E(s)) \longrightarrow N_\bullet(E(r + s - 1)) = \mathcal E(r+s-1)\]

with the iterated Eilenberg-Zilber map

\[\mathcal E(r) \otimes \mathcal E(s) = N_\bullet(E(r)) \otimes N_\bullet(E(s)) \longrightarrow N_\bullet(E(r) \times E(s)).\]
Parameters:
Returns:

The operadic composition of self and other.

Return type:

comch.barratt_eccles.BarrattEcclesElement

Example

>>> x = BarrattEcclesElement({((1, 2), (2, 1)): 1})
>>> print(x.compose(x, 1))
- ((1,2,3),(2,1,3),(3,2,1)) + ((1,2,3),(3,1,2),(3,2,1))
suspension()[source]
table_reduction()[source]

Table reduction of self.

The table reduction morphisms \(TR : \mathcal E \to \mathcal X\) from the Barratt-Eccles to the surjection operad is a surjective weak equivalence of operads introduced in [BF]. For a basis Barratt-Eccles element \((\sigma_0, \dots, \sigma_n) \in \mathcal E(r)_n\) we have that

\[TR(\sigma_0, \dots, \sigma_n) = \sum_{a} s_{a}\]

with surjections

\[s_{a} : \{1, \dots, n+r \} \to \{1, \dots, r\}\]

parametrized by all tuples of positive integers \(a = (a_0, \dots, a_n)\) with \(a_0 + \cdots + a_n = n + r\). For one such tuple \(a\) we now describe the surjection \(s_a\). Define recursively

\[A_{-1} = 0 \qquad A_i = A_{i-1} + a_{i.}\]

For \(k \in \{1, \dots, n+r\}\) we identify \(i \in \{1, \dots, n\}\) such that \(A_{i-1} < k \leq A_{i}\) and define \(s_a(k)\) to be the \((k - A_{i-1})\)-th element in \((\sigma_i(1), \dots, \sigma_i(r))\) not in

\[\big\{s_a(j)\ |\ j < k \text{ and } j \neq A_0, \dots, A_{i-1}\big\}.\]

This operad map preserves the \(E_n\)-filtration.

Returns:

The image of self under the table reduction morphism

Return type:

comch.surjection.SurjectionElement

Example

>>> b = BarrattEcclesElement({((1,2,3,4), (1,4,3,2), (1,2,4,3)): 1})
>>> print(b.table_reduction())
(1,2,4,2,4,3) + (1,2,4,3,2,3)
diagonal(r=1)[source]

Alexander-Whitney diagonal.

The Alexander-Whitney chain approximation to the diagonal is the chain map \(\Delta \colon \mathcal E \to \mathcal E \otimes \mathcal E\) defined on a basis element \((\sigma_0, \dots, \sigma_n) \in \mathcal E(r)_n\) by the formula

\[\Delta (\sigma_0, \dots, \sigma_n) = \sum_{i=1}^n (\sigma_0, \dots, \sigma_i) \otimes (\sigma_i, \dots, \sigma_n).\]

It defines a Hopf structure on the Barratt-Eccles operad.

Returns:

The free module element representing the image of self under the diagonal map. The keys are pairs of elements in comch.barratt_eccles.BarrattEcclesElement coefficient 1.

Return type:

comch.free_module.FreeModuleElement

Example

>>> x = BarrattEcclesElement({((1,2), (2,1)):1})
>>> print(x.diagonal())
(((1, 2),), ((1, 2), (2, 1))) + (((1, 2), (2, 1)), ((2, 1),))
preferred_rep()[source]

Preferred representative of self.

Removes pairs basis_element: coefficient which satisfy either of: 1) the basis element has equal consecutive permutations, 2) it is the empty permutation, or 3) the coefficient is 0.

Returns:

The preferred representative of self.

Return type:

comch.barratt_eccles.BarrattEcclesElement

Example

>>> print(BarrattEcclesElement({((1,2),(1,2)):1, ():1, ((1,2),):0}))
0
class comch.barratt_eccles.BarrattEccles[source]

Produces Barratt-Eccles elements of interest.

static may_steenrod_structure(arity, degree, torsion=None)[source]

Representative of the requested Steenrod product.

Returns the image under the May-Steenrod structure constructed in [KMM] of the preferred basis element, of the given degree, of the minimal free resolution of the base ring \(R\) as an \(R[\mathrm C_r]\)-module.

Parameters:
  • arity (int) – The arity considered.

  • degree (int) – The degree considered.

  • torsion (int or None, default None) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Returns:

The image of the basis element under the May-Steenrod structure.

Return type:

comch.barratt_eccles.BarrattEcclesElement

References

[KMM]: Kaufmann, R. M., & Medina-Mardones, A. M. (2020). Chain level Steenrod operations. arXiv preprint arXiv:2010.02571.

static steenrod_operation(p, s, q, bockstein=False)[source]

Chain level representative of \(P_s\) or \(\beta P_s\).

Where

\[P_s : H_\bullet(A; \mathbb F_2) \to H_{\bullet + s}(A; \mathbb F_2)\]

and, for \(p > 2\),

\[P_s : H_\bullet(A; \mathbb F_p) \to H_{\bullet + 2s(p-1)}(A; \mathbb F_p) \qquad \beta P_s : H_\bullet(A; \mathbb F_p) \to H_{\bullet+2s(p-1)-1}(A; \mathbb F_p)\]

are the Steenrod operations.

Parameters:
  • p (int) – The prime considered.

  • s (int) – The subscript of the Steenrod operation.

  • q (int) – The degree of the class acted on.

  • bockstein (bool, default False) – Determines the use of the Bockstein homomorphism.

Returns:

The Barratt-Eccles element representative.

Return type:

comch.barratt_eccles.BarrattEcclesElement

comch.simplicial: Simplicial tensor products

comch.simplicial.Simplex(iterable)

A simplex \((v_0, \dots, v_n)\).

comch.simplicial.SimplicialElement([data, ...])

Elements in an iterated tensor product of the chains on the infinite simplex.

comch.simplicial.Simplicial()

Produces simplicial elements of interest.

class comch.simplicial.Simplex(iterable)[source]

A simplex \((v_0, \dots, v_n)\).

A simplex is a finite non-decreasing tuple of non-negative integers. We identity these with faces of the infinite simplex \(\Delta^\infty\).

__init__(iterable)[source]

Initializes self.

Parameters:

interable (:class:'iterable') – Used to create a tuple of int.

Example

>>> print(Simplex((1,2,4)))
(1,2,4)
property dimension

The dimension of self.

Defined as the length of the tuple minus one.

Returns:

The dimension of self.

Return type:

int

Example

>>> Simplex((1,3,4,5)).dimension
3
face(i)[source]

The i-th face of self.

Obtained by removing the i-th entry of self.

Returns:

The i-th face of self.

Return type:

comch.simplicial.Simplex

Example

>>> Simplex((1,3,4,5)).face(2)
(1, 3, 5)
degeneracy(i)[source]

The i-th degeneracy of self.

Obtained by repeating the i-th entry of the tuple.

Returns:

The i-th face of self.

Return type:

comch.simplicial.Simplex

Example

>>> Simplex((1,3,4,5)).degeneracy(2)
(1, 3, 4, 4, 5)
coface(i)[source]

The i-th coface of self.

Obtained by adding 1 to each j-th entries with j greater or equal to i.

Returns:

The i-th coface of self.

Return type:

comch.simplicial.Simplex

Example

>>> Simplex((1,3,4,5)).coface(2)
(1, 4, 5, 6)
codegeneracy(i)[source]

The i-th codegeneracy of self.

Obtained by subtracting 1 from each j-th entries with j greater than i.

Returns:

The i-th codegeneracy of self.

Return type:

comch.simplicial.Simplex

Example

>>> Simplex((1,3,4,5)).codegeneracy(2)
(1, 2, 3, 4)
is_degenerate()[source]

Returns True if self is degenerate and False if not.

A simplex is degenerate if it is empty or if contains equal consecutive values.

Returns:

True if self is degenerate and False if not.

Return type:

bool

Example

>>> Simplex(()).is_degenerate()
True
>>> Simplex((1,1,2)).is_degenerate()
True
is_nondegenerate()[source]

Returns True if self is nondegenerate and False if not.

A simplex is nondegenerate if it is not empty and contains no equal consecutive values.

Returns:

True if self is nondegenerate and False if not.

Return type:

bool

Example

>>> Simplex((1,2,5)).is_nondegenerate()
True
class comch.simplicial.SimplicialElement(data=None, dimension=None, torsion=None)[source]

Elements in an iterated tensor product of the chains on the infinite simplex.

The chains on the infinite simplex \(C = C_\bullet(\Delta^\infty; R)\) is the differential graded module \(C\) with degree-\(n\) part \(C_n\) freely generated as an \(R\)-module by simplices of dimension \(n\), and differential on these given by the sum of its faces with alternating signs. Explicitly,

\[\partial (v_0, \dots, v_n) = \sum_{i=0}^n (v_0, \dots, \widehat{v}_i, \dots, v_d).\]

The degree-\(n\) part of the tensor product \(C^{\otimes r}\) and its differential are recursively defined by

\[(C^{\otimes r})_n = \bigoplus_{i+j=n} C_i \otimes (C^{\otimes r})_n\]

and

\[\partial(c_1 \otimes c_2 \otimes \cdots \otimes c_r) = (\partial c_1) \otimes c_2 \otimes \cdots \otimes c_r + (-1)^{|c_1|} c_1 \otimes \partial (c_2 \otimes \cdots \otimes c_r).\]
torsion

The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Type:

int

dimension

NOT SURE IF NEEDED.

Type:

int non-negative

__init__(data=None, dimension=None, torsion=None)[source]

Initializes self.

Parameters:
  • data (int or None, default: None) – Dictionary representing a linear cobination of basis elements. Items in the dictionary correspond to basis_element: coefficient pairs. Each basis_element must create a tuple of comch.simplicial.Simplex and coefficient must be an int.

  • dimension (int) – NOT SURE IF NEEDED.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Example

>>> x = SimplicialElement({((0,), (0, 1, 2)): 1,                                   ((0, 1), (1, 2)): -1,                                   ((0, 1, 2), (2,)): 1})
>>> print(x)
((0,),(0,1,2)) - ((0,1),(1,2)) + ((0,1,2),(2,))
property arity

Arity of self.

Defined as None if self is not homogeneous. The arity of a basis element is defined as the number of tensor factors making it.

Returns:

The length of the keys of self or None if not well defined.

Return type:

int positive or None.

Example

>>> x = SimplicialElement({((0,), (0, 1, 2)): 1})
>>> x.arity
2
property degree

Degree of self.

Defined as None if self is not homogeneous. The degree of a basis element agrees with the sum of the dimension of the simplices making it.

Returns:

The sum of the dimensions of the simplices of every key of self or None if not well defined.

Return type:

int positive or None.

Example

>>> x = SimplicialElement({((0,), (0, 1, 2)): 1})
>>> x.degree
2
boundary()[source]

Boundary of self.

As defined in the class’s docstring.

Returns:

The boundary of self as an element in a tensor product of differential graded modules.

Return type:

comch.simplicical.SimplicialElement

Example

>>> x = SimplicialElement({((0, 1), (1, 2)): 1})
>>> print(x.boundary())
((1,),(1,2)) - ((0,),(1,2)) - ((0,1),(2,)) + ((0,1),(1,))
__rmul__(other)[source]

Left action: other * self

Left multiplication by a symmetric group element or an integer. Defined up to signs on basis elements by permuting the tensor factor.

Parameters:

other (int or comch.symmetric.SymmetricElement.) – The symmetric ring element left acting on self.

Returns:

The product: other * self with Koszul’s sign convention.

Return type:

comch.simplicial.SimplicialElement

Example

>>> x = SimplicialElement({((0, 1), (1, 2)): 1})
>>> t = SymmetricRingElement({(2, 1): 1})
>>> print(t * x)
- ((1,2),(0,1))
>>> print(3 * x)
3((0,1),(1,2))
iterated_diagonal(times=1, coord=1)[source]

Iterated Alexander-Whitney diagonal applied at a specific tensor factor.

The AW diagonal is the chain map \(\Delta \colon C \to C \otimes C\) defined on the chains of the infinite simplex by the formula

\[\Delta((v_0, dots, v_n)) = \sum_{i=0}^n (v_0, dots, v_i) \otimes (v_i, dots, v_n).\]

It is coassociative, \((\Delta \otimes \mathrm{id}) \Delta = (\mathrm{id} \otimes \Delta) \Delta\), so it has a well defined iteration \(\Delta^k\), and for every \(i \in \{1, \dots, r\}\), there is map \(C^{\otimes r} \to C^{\otimes k+r}\) sending \((x_1 \otimes \cdots \otimes x_n)\) to \((x_1 \otimes \cdots \otimes \Delta^k(k_i) \cdots \otimes x_n)\).

Parameters:
  • times (int) – The number of times the AW diagonal is composed with itself.

  • coord (int) – The tensor position on which the iterated diagonal acts.

Returns:

The action of the iterated AW diagonal on self.

Return type:

comch.simplicial.SimplicialElement

Example

>>> x = SimplicialElement({((0, 1, 2), ): 1})
>>> print(x.iterated_diagonal())
((0,),(0,1,2)) + ((0,1),(1,2)) + ((0,1,2),(2,))
one_reduced()[source]

Returns the 1-reduction of self.

The 1-reduction map is the map induced by the collapse of the 1-skeleton of the infinite simplex.

Returns:

The preferred representative of self.

Return type:

comch.simplicial.SimplicialElement

Example

>>> x = SimplicialElement({((1,2), (2,3,4)): 1})
>>> print(x.one_reduced())
0
preferred_rep()[source]

Preferred representative of self.

Removes pairs basis element: coefficient which satisfy either of: 1) The basis element has a degenerate tensor factor, or 2) the coefficient is 0.

Returns:

The preferred representative of self.

Return type:

comch.simplicial.SimplicialElement

Example

>>> print(SimplicialElement({((1,3), (1,1)): 1}))
0
class comch.simplicial.Simplicial[source]

Produces simplicial elements of interest.

static standard_element(n, times=1, torsion=None)[source]

The chain represented by the simplex \((0, \dots, n)\).

Parameters:
  • n (int) – The dimension of the standard simplex considered.

  • times (int) – The number of tensor copies.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Examples

>>> print(Simplicial.standard_element(3, 2))
((0,1,2,3),(0,1,2,3))
static basis(n, torsion=None)[source]

Iterator of all basis elements in the chain complex of a n-simplex.

Parameters:
  • n (int) – The dimension of the standard simplex considered.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Examples

>>> print([str(b) for b in Simplicial.basis(1)])
['((0,),)', '((1,),)', '((0,1),)']

comch.cubical: Cubical tensor products

comch.cubical.Cube(iterable)

A cube \((I_1, \dots, I_n)\).

comch.cubical.CubicalElement([data, torsion])

Elements in an iterated tensor product of the chains on the infinite cube.

comch.cubical.Cubical()

Produces cubical elements of interest.

class comch.cubical.Cube(iterable)[source]

A cube \((I_1, \dots, I_n)\).

A cube is a finite tuple of elements in \(\{0,1,2\}\), where we think of \(2\) as the interval \([0,1]\) and \(0,1\) as its endpoints. We identify these with faces of the infinite cube \(\mathbb I^\infty\).

__init__(iterable)[source]

Initializes self.

Parameters:

interable (:class:'iterable') – Used to create a tuple of int with values 0, 1 or 2.

Example

>>> print(Cube((1,2,0,2)))
(1,2,0,2)
property dimension

The dimension of self.

Defined as the number of values in the tuple that are equal to 2.

Returns:

The dimension of self.

Return type:

int

Example

>>> Cube((1,2,0,2)).dimension
2
property intervals

The positions of intervals in self.

Corresponds to the tuple of indices where self contains 2.

Returns:

The indices of intervals in self.

Return type:

tuple

Example

>>> Cube((1,2,0,2)).intervals
(1, 3)
face(i, epsilon)[source]

The i-th \(\epsilon\) face of self.

Obtained by replacing the i-th entry of self by \(\epsilon\).

Returns:

The i-th face of self.

Return type:

comch.cubical.Cube

Example

>>> Cube((1,2,0,2)).face(1, 0)
(1, 2, 0, 1)
cartan_serre_map()[source]

The image self under the Cartan-Serre collapse map.

Obtained by sending the cell \(x_1 \times \dots \times x_n\) to \([q_1-1, \dots, q_m-1, p-1]\) where \(q_1 < q_2 < \dots\) are the positions of the intervals and \(q_m < p\) with \(p = \min\{i \mid x_i = [0]\}\) or \(p = n+1\) if empty.

Returns:

The image of self under the Cartan-Serre collapse map.

Return type:

comch.simplicial.Simplex

Example

>>> Cube((2,1,2)).cartan_serre_map()
(0, 2, 3)
class comch.cubical.CubicalElement(data=None, torsion=None)[source]

Elements in an iterated tensor product of the chains on the infinite cube.

The chains on the infinite cube \(C = C_\bullet(\Delta^\infty; R)\) is the differential graded module \(C\) with degree-\(n\) part \(C_n\) freely generated as an \(R\)-module by cubes of dimension \(n\), and differential on these given by the sum of its faces with alternating signs. Explicitly, for $x in C_n$ we have

\[\partial x = \sum_{i = 1}^{n} (-1)^{i-1}(d^0_i x - d^1_i x)\]

The differential graded module \(C\) is isomorphic to

\[\bigoplus_{k \geq 0} C_\bullet^{CW}(I; R)^{\otimes k}\]

where \(I\) is the interval with its usual cellular structure.

The degree-\(n\) part of the tensor product \(C^{\otimes r}\) and its differential are recursively defined by

\[(C^{\otimes r})_n = \bigoplus_{i+j=n} C_i \otimes (C^{\otimes r})_n\]

and

\[\partial(c_1 \otimes c_2 \otimes \cdots \otimes c_r) = (\partial c_1) \otimes c_2 \otimes \cdots \otimes c_r + (-1)^{|c_1|} c_1 \otimes \partial (c_2 \otimes \cdots \otimes c_r).\]
torsion

The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Type:

int

__init__(data=None, torsion=None)[source]

Initializes self.

Parameters:
  • data (int or None, default: None) – Dictionary representing a linear cobination of basis elements. Items in the dictionary correspond to basis element: coefficient pairs. Each basis element must create a tuple of comch.cubical.Cube and coefficient must be an int.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Example

>>> x = CubicalElement({((0,2), (0,1)): 1,                                ((2,1), (1,2)): -1,                                ((1,2), (2,0)): 1})
>>> print(x)
((0,2),(0,1)) - ((2,1),(1,2)) + ((1,2),(2,0))
property arity

Arity of self.

Defined as None if self is not homogeneous. The arity of a basis element is defined as the number of tensor factors making it.

Returns:

The length of the keys of self or None if not well defined.

Return type:

int positive or None.

Example

>>> x = CubicalElement({((0,2), (0,1)): 1})
>>> x.arity
2
property degree

Degree of self.

Defined as None if self is not homogeneous. The degree of a basis element agrees with the sum of the dimension of the simplices making it.

Returns:

The sum of the dimensions of the simplices of every key of self or None if not well defined.

Return type:

int positive or None.

Example

>>> x = CubicalElement({((0,2), (0,1)): 1})
>>> x.degree
1
boundary()[source]

Boundary of self.

As defined in the class’s docstring.

Returns:

The boundary of self as an element in a tensor product of differential graded modules.

Return type:

comch.cubical.CubicalElement

Example

>>> x = CubicalElement({((0, 2), (2, 1)): 1})
>>> print(x.boundary())
((0,1),(2,1)) - ((0,0),(2,1)) - ((0,2),(1,1)) + ((0,2),(0,1))
__rmul__(other)[source]

Left action: other * self

Left multiplication by a symmetric group element or an integer. Defined up to signs on basis elements by permuting the tensor factor.

Parameters:

other (int or comch.symmetric.SymmetricElement.) – The symmetric ring element left acting on self.

Returns:

The product: other * self with Koszul’s sign convention.

Return type:

comch.cubical.CubicalElement

Example

>>> x = CubicalElement({((0, 2), (1, 2)): 1})
>>> t = SymmetricRingElement({(2, 1): 1})
>>> print(t * x)
- ((1,2),(0,2))
>>> print(3 * x)
3((0,2),(1,2))
iterated_diagonal(times=1, coord=1)[source]

Iterated Serre diagonal applied at a specific tensor factor.

The Serre diagonal is the chain map \(\Delta \colon C \to C \otimes C\) defined on the chains of the infinite cube by the formula

\[\Delta (x_1 \otimes \cdots \otimes x_n) = \sum \pm \left( x_1^{(1)} \otimes \cdots \otimes x_n^{(1)} \right) \otimes \left( x_1^{(2)} \otimes \cdots \otimes x_n^{(2)} \right),\]

where the sign is determined using the Koszul convention, and we are using Sweedler’s notation

\[\Delta(x_i) = \sum x_i^{(1)} \otimes x_i^{(2)}.\]

It is coassociative, \((\Delta \otimes \mathrm{id}) \Delta = (\mathrm{id} \otimes \Delta) \Delta\), so it has a well defined iteration \(\Delta^k\), and for every \(i \in \{1, \dots, r\}\), there is map \(C^{\otimes r} \to C^{\otimes k+r}\) sending \((x_1 \otimes \cdots \otimes x_n)\) to \((x_1 \otimes \cdots \otimes \Delta^k(k_i) \cdots \otimes x_n)\).

Parameters:
  • times (int) – The number of times the Serre diagonal is composed with itself.

  • coord (int) – The tensor position on which the iterated diagonal acts.

Returns:

The action of the iterated Serre diagonal on self.

Return type:

comch.cubical.CubicalElement

Example

>>> x = CubicalElement({((2,2), (2,)):1})
>>> print(x.iterated_diagonal(1,2))
((2,2),(2,),(1,)) + ((2,2),(0,),(2,))
join()[source]

Join of self.

The join is a map from \(C_\bullet^{\otimes 2}\) to \(C_\bullet\) of degree 1. It is define by

\[\begin{aligned} (x_1 \otimes \cdots \otimes x_n) \ast (y_1 \otimes \cdots \otimes y_n) = (-1)^{|x|} \sum_{i=1}^n x_{<i} \epsilon(y_{<i}) \otimes x_i \ast y_i \otimes \epsilon(x_{>i})y_{>i}, \end{aligned}\]

where

\[\begin{split}\begin{aligned} x_{<i} & = x_1 \otimes \cdots \otimes x_{i-1}, & y_{<i} & = y_1 \otimes \cdots \otimes y_{i-1}, \\ x_{>i} & = x_{i+1} \otimes \cdots \otimes x_n, & y_{>i} & = y_{i+1} \otimes \cdots \otimes y_n, \end{aligned}\end{split}\]

with the convention

\[x_{<1} = y_{<1} = x_{>n} = y_{>n} = 1 \in \mathbb Z,\]

and the only non-zero values of \(x_i \ast y_i\) are

\[\ast([0] \otimes [1]) = [0, 1], \qquad \ast([1] \otimes [0]) = -[0, 1].\]

:param comch.cubical.CubicalElement: The element to take the join of. :param of arity 2: The element to take the join of.

Returns:

The join of self.

Return type:

comch.cubical.CubicalElement

Examples

>>> x = CubicalElement({((0, 0, 1), (1, 0, 0)): 1})
>>> print(x.join())
((2,0,0),) - ((0,0,2),)
cartan_serre_map()[source]

The image self under the Cartan-Serre collapse map.

Image of self via the chain map induced by the Cartan-Serre map defined for cubes.

Returns:

The image of self under the Cartan-Serre chain map.

Return type:

comch.simplicial.SimplicialElement

Example

>>> CubicalElement({((2,1,2), (2,2,0)): 1}).cartan_serre_map()
SimplicialElement({((0, 2, 3), (0, 1, 2)): 1})
class comch.cubical.Cubical[source]

Produces cubical elements of interest.

static standard_element(n, times=1, torsion=None)[source]

The chain represented by the cube \([0,1]^{n}\).

Parameters:
  • n (int) – The dimension of the standard cube considered.

  • times (int) – The number of tensor copies.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Examples

>>> print(Cubical.standard_element(3, 2))
((2,2,2),(2,2,2))
static basis(n, torsion=None)[source]

Iterator of all basis elements in the chain complex of an n-cube.

Parameters:
  • n (int) – The dimension of the standard cube considered.

  • torsion (int) – The non-neg int \(n\) of the ring \(\mathbb Z/n \mathbb Z\).

Examples

>>> print([str(b) for b in Cubical.basis(1)])
['((0,),)', '((1,),)', '((2,),)']

Free modules and symmetric rings

In this notebook we present the basic classes modeling free modules over \(\mathbb Z\) and \(\mathbb Z/n\mathbb Z\) and the examples of group rings of symmetric groups.

Contents

  1. Free modules

  2. Symmetric groups

  3. Symmetric rings

A fully interactive cloud-based version of this notebook can be found here.

The surjection operad

In this notebook we describe our implementation of the surjection operad \(\mathcal X\).

Contents

  1. Symmetric module structure

  2. Operadic composition

  3. Complexity filtration

  4. References

A fully interactive cloud-based version of this notebook can be found here.

The Barratt-Eccles operad

In this notebook we describe our implementation of the Barratt-Eccles operad \(\mathcal E\).

Contents

  1. Symmetric module structure

  2. Operadic composition

  3. Complexity filtration

  4. Diagonal map

  5. References

A fully interactive cloud-based version of this notebook can be found here.

The table reduction morphism

In this notebook we describe our implementation of table reduction morphisms from the Barratt-Eccles \(\mathcal E\) operad to the surjection \(\mathcal X\) operad.

Contents

  1. Definition

  2. References

A fully interactive cloud-based version of this notebook can be found here.

Cochain level Steenrod operations

In this notebook we present our implementation of cochain level May-Steenrod operations for simplicial and cubical cochains of spaces.

Contents

  1. Introduction

  2. May-Steenrod structures

  3. Steenrod operations

  4. Cochains of spaces

  5. References

A fully interactive cloud-based version of this notebook can be found here.

Home

https://github.com/ammedmar/comch

References

[McS]: J. McClure, and J. Smith. “Multivariable cochain operations and little n-cubes.” Journal of the American Mathematical Society 16.3 (2003): 681-704.

[BF]: C. Berger, and B. Fresse. “Combinatorial operad actions on cochains.” Mathematical Proceedings of the Cambridge Philosophical Society. Vol. 137. No. 1. Cambridge University Press, 2004.

[KMM]: R. Kaufmann, and A. Medina-Mardones. “Cochain level May-Steenrod operations.” Forum Mathematicum 33 (2021), no. 6, 1507–1526.