comch.simplicial
: Simplicial tensor products
|
A simplex \((v_0, \dots, v_n)\). |
|
Elements in an iterated tensor product of the chains on the infinite simplex. |
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
ofint
.
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:
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:
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:
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:
Example
>>> Simplex((1,3,4,5)).codegeneracy(2) (1, 2, 3, 4)
- is_degenerate()[source]
Returns
True
if self is degenerate andFalse
if not.A simplex is degenerate if it is empty or if contains equal consecutive values.
- Returns:
True
if self is degenerate andFalse
if not.- Return type:
bool
Example
>>> Simplex(()).is_degenerate() True >>> Simplex((1,1,2)).is_degenerate() 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
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.simplicial.Simplex
and coefficient must be anint
.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 orNone
.
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 orNone
.
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
*
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 = 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:
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:
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:
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),)']