Surjection operad and interval cuts

SimplicialSets.SurjectionType
Surjection{K}

Surjection{K}(u [; check = true]) where K
Surjection(u)

(surj::Surjection)(x::T) where T <: AbstractSimplex -> Linear{T}

The type Surjection{K} represents elements of arity K in the surjection operad.

The first constructor return the surjection given by u TODO. If the optional keyword argument check is set to false, then it is not checked that u is indeed a surjection. The second constructor is equivalent to the first with K set to maximum(u; init = 0).

When a Surjection is applied to a simplex, the result is the corresponding interval cut operation. This evaluation is linear and supports the keyword arguments coefftype, addto, coeff and is_filtered as described for the macro @linear.

See also arity, deg(::Surjection), diff(::Surjection), SimplicialSets.is_surjection, LinearCombinations.linear_filter(::Surjection), LinearCombinations.@linear.

Examples

Surjection operad

julia> Surjection([1, 2, 3, 1])
Surjection{3}([1, 2, 3, 1])

julia> Surjection(Int[])
Surjection{0}(Int64[])

Interval cuts

julia> using LinearCombinations: diff, deg

julia> surj = Surjection([1, 2, 1])
Surjection{2}([1, 2, 1])

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

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

julia> diff(surj(x)) == diff(surj)(x) + (-1)^deg(surj) * surj(diff(x))
true
source
LinearCombinations.degMethod
deg(surj::Surjection) -> Int

Return the degree of surj, which is the number of repetitions in the sequence of values.

source
SimplicialSets.is_surjectionFunction
SimplicialSets.is_surjection(k::Integer, u::AbstractVector{<:Integer}) -> Bool

Return true if u defines a surjection of arity k, that is, if it contains all values between 1 and k and no other values. In this case the call Surjection{k}(u) would return successfully.

See also Surjection, arity.

source
SimplicialSets.isdegenerateMethod
isdegenerate(surj::Surjection) -> Bool

A surjection is degenerate if two adjacent values are equal.

Examples

julia> isdegenerate(Surjection([1, 2, 1]))
false

julia> isdegenerate(Surjection([1, 1, 2]))
true
source
LinearCombinations.diffMethod
diff(surj::Surjection{K}) where K -> Linear{Surjection{K}}

Return the differential (or boundary) of surj in the surjection operad.

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

See also LinearCombinations.@linear.

Example

julia> using LinearCombinations: diff

julia> surj = Surjection([1, 2, 1, 3, 1])
Surjection{3}([1, 2, 1, 3, 1])

julia> diff(surj)
Surjection{3}([1, 2, 1, 3])-Surjection{3}([1, 2, 3, 1])+Surjection{3}([2, 1, 3, 1])
source