Basic functions for simplices
SimplicialSets.dim — Functiondim(x::AbstractSimplex) -> IntReturn the dimension of the simplex x.
See also [deg].
LinearCombinations.deg — Methoddeg(x::AbstractSimplex) -> IntReturn the degree of x, which is defined as its dimension.
See also dim.
SimplicialSets.d — FunctionSimplicialSets.d(x::T, k) where T <: AbstractSimplex -> T
SimplicialSets.d(x::T, kv::AbstractVector{<:Integer}) where T <: AbstractSimplex -> TIn 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]SimplicialSets.s — FunctionSimplicialSets.s(x::T, k) where T <: AbstractSimplex -> T
SimplicialSets.s(x::T, kv::AbstractVector{<:Integer}) where T <: AbstractSimplex -> TIn 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]SimplicialSets.isdegenerate — Methodisdegenerate(x::AbstractSimplex) -> BoolReturn true if x is degenerate and false otherwise.
SimplicialSets.isdegenerate — Methodisdegenerate(x::AbstractSimplex, k::Integer) -> BoolReturn 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).
SimplicialSets.isdegenerate — Methodisdegenerate(x::AbstractSimplex, k0::Integer, k1::Integer) -> BoolReturn 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.
LinearCombinations.linear_filter — MethodLinearCombinations.linear_filter(x::AbstractSimplex) -> BoolReturn 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)
Linear{SymbolicSimplex{Symbol}, Int64} with 0 terms:
0LinearCombinations.diff — Methoddiff(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)
Linear{SymbolicSimplex{Symbol}, Int64} with 3 terms:
x[1,2]-x[0,2]+x[0,1]
julia> b = zero(a); diff(x; addto = b, coeff = 2)
Linear{SymbolicSimplex{Symbol}, Int64} with 3 terms:
2*x[1,2]-2*x[0,2]+2*x[0,1]
julia> b
Linear{SymbolicSimplex{Symbol}, Int64} with 3 terms:
2*x[1,2]-2*x[0,2]+2*x[0,1]SimplicialSets.diag — Functiondiag(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.
LinearCombinations.coprod — Functioncoprod(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)
Linear{Tensor{Tuple{SymbolicSimplex{Symbol}, SymbolicSimplex{Symbol}}}, Int64} with 3 terms:
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