comch.cubical
: Cubical tensor products
|
A cube \((I_1, \dots, I_n)\). |
|
Elements in an iterated tensor product of the chains on the infinite cube. |
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
ofint
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:
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:
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
orNone
, 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 atuple
ofcomch.cubical.Cube
and coefficient must be anint
.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 orNone
.
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 orNone
.
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:
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
*
selfLeft multiplication by a symmetric group element or an integer. Defined up to signs on basis elements by permuting the tensor factor.
- Parameters:
other (
int
orcomch.symmetric.SymmetricElement
.) – The symmetric ring element left acting on self.- Returns:
The product: other
*
self with Koszul’s sign convention.- Return type:
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:
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:
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:
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,),)']