Basic functions for simplices

SimplicialSets.dimFunction
dim(x::AbstractSimplex) -> Int

Return the dimension of the simplex x.

See also [deg].

source
SimplicialSets.dFunction
SimplicialSets.d(x::T, k) where T <: AbstractSimplex -> T
SimplicialSets.d(x::T, kv::AbstractVector{<:Integer}) where T <: AbstractSimplex -> T

In the first form, return the k-th facet of x. In the second form, apply d repeatedly to x, starting with the last element of kv.

See also SimplicialSets.s.

Examples

julia> using SimplicialSets: d

julia> x = SymbolicSimplex(:x, 3)
x[0,1,2,3]

julia> d(x, 1)
x[0,2,3]

julia> d(x, [1, 3])
x[0,2]
source
SimplicialSets.sFunction
SimplicialSets.s(x::T, k) where T <: AbstractSimplex -> T
SimplicialSets.s(x::T, kv::AbstractVector{<:Integer}) where T <: AbstractSimplex -> T

In the first form, return the k-th degeneracy of x. In the second form, apply d repeatedly to x, starting with the first element of kv.

See also SimplicialSets.d.

Examples

julia> using SimplicialSets: s

julia> x = SymbolicSimplex(:x, 3)
x[0,1,2,3]

julia> s(x, 1)
x[0,1,1,2,3]

julia> s(x, [1, 3])
x[0,1,1,2,2,3]
source
SimplicialSets.isdegenerateMethod
isdegenerate(x::AbstractSimplex, k::Integer) -> Bool

Return true if x is degenerate at position k and false otherwise. The index k must be between 0 and dim(x)-1.

A simplex x of positive dimension is degenerate at position k if x == s(d(x, k), k).

source
SimplicialSets.isdegenerateMethod
isdegenerate(x::AbstractSimplex, k0::Integer, k1::Integer) -> Bool

Return true if x is degenerate on the interval k0:k1 and false otherwise. The indices must satisfy 0 <= k0 <= k1 <= dim(x).

A simplex is degenerate on the interval k0:k1 if it degenerate at some position k between k0 and k1-1.

source
LinearCombinations.linear_filterMethod
LinearCombinations.linear_filter(x::AbstractSimplex) -> Bool

Return true if x is non-degenerate and false otherwise. The effect of this is that linear combinations of simplices represent elements of the normalized chain complex of the corresponding simplicial set.

See also LinearCombinations.linear_filter.

Example

julia> using LinearCombinations; using SimplicialSets: s

julia> x = SymbolicSimplex(:x, 2)
x[0,1,2]

julia> Linear(s(x, 1) => 1)
0
source
LinearCombinations.diffMethod
diff(x::T) where T <: AbstractSimplex -> Linear{T}

Return the differential or boundary of x as a linear combination. By default, the coefficients are of type Int.

This functions is linear and supports the keyword arguments coefftype, addto, coeff and is_filtered as described for @linear.

Note that because of a name clash with Base.diff, this function must be explicitly imported.

See also LinearCombinations.@linear.

Examples

julia> using LinearCombinations; using LinearCombinations: diff

julia> x = SymbolicSimplex(:x, 2)
x[0,1,2]

julia> a = diff(x)
x[1,2]-x[0,2]+x[0,1]

julia> b = zero(a); diff(x; addto = b, coeff = 2)
2*x[1,2]-2*x[0,2]+2*x[0,1]

julia> b
2*x[1,2]-2*x[0,2]+2*x[0,1]
source
SimplicialSets.diagFunction
diag(x::T) where T <: AbstractSimplex -> ProductSimplex{Tuple{T,T}}

Return the image of x under the diagonal map from the simplicial set containing x to the Cartesian product with itself.

This function is linear and supports the keyword arguments coefftype, addto, coeff, sizehint and is_filtered as described for the macro @linear.

See also coprod, LinearCombinations.@linear.

source
LinearCombinations.coprodFunction
coprod(x::T) where T <: AbstractSimplex -> Linear{Tensor{Tuple{T,T}}}

Return the image of the simplex x under coproduct (or diagonal map) of the normalized chain complex containing x.

This function is linear and supports the keyword arguments coefftype, addto, coeff and is_filtered as described for the macro @linear.

See also aw, diag, LinearCombinations.@linear.

Examples

julia> x = SymbolicSimplex(:x, 2)
x[0,1,2]

julia> coprod(x)
x[0]⊗x[0,1,2]+x[0,1,2]⊗x[2]+x[0,1]⊗x[1,2]

julia> coprod(x) == aw(diag(x))
true
source