SpecialSets provides implementations of sets commonly used in mathematics, as well as the logic for cleanly combining such sets.
julia> LessThan(3)
{x ∈ ℤ | x < 3}
julia> LessThan(3, true)
{x ∈ ℤ | x ≤ 3}
julia> LessThan(3, true) ∩ GreaterThan(3, true)
Set([3])
julia> LessThan(3, true) ∩ TypeSet(String)
Set(Any[])
julia> GreaterThan(5, true) ∩ NotEqual(12)
{x ∈ ℤ | x ≠ 12, x ≥ 5}
julia> GreaterThan(5, true) ∩ NotEqual(3)
{x ∈ ℤ | x ≥ 5}
julia> Even ∩ Step(3)
{x ∈ ℤ | (x ≡ 0 (mod 6))}
julia> Even ∩ Step(3, 1)
{x ∈ ℤ | (x ≡ 4 (mod 6))}
julia> Even ∩ Odd
Set(Any[])
julia> Even ∩ LessThan(0)
{x ∈ ℤ | x < 0, (x ≡ 0 (mod 2))}
julia> Even ∩ Set(1:5) ∩ NotEqual(4)
Set([2])