UniversalSegment(S)

seg.spad line 288 [edit on github]

This domain provides segments which may be half open. That is, ranges of the form a.. or a..b.

+ : (%, S) -> % if S has AbelianSemiGroup
from SegmentCategory(S)
+ : (S, %) -> % if S has AbelianSemiGroup
from SegmentCategory(S)
- : (%, S) -> % if S has AbelianGroup
from SegmentCategory(S)
= : (%, %) -> Boolean if S has SetCategory
from BasicType
BY : (%, Integer) -> %
from SegmentCategory(S)
SEGMENT : S -> %

l.. produces a half open segment, that is, one with no upper bound.

SEGMENT : (S, S) -> %
from SegmentCategory(S)
coerce : Segment(S) -> %

coerce(x) allows Segment values to be used as %.

coerce : % -> OutputForm if S has SetCategory
from CoercibleTo(OutputForm)
convert : S -> %
from SegmentCategory(S)
convert : % -> InputForm if S has ConvertibleTo(InputForm)
from ConvertibleTo(InputForm)
expand : % -> Stream(S) if S has OrderedRing
from SegmentExpansionCategory(S, Stream(S))
expand : List(%) -> Stream(S) if S has OrderedRing
from SegmentExpansionCategory(S, Stream(S))
hasHi : % -> Boolean

hasHi(s) tests whether the segment s has an upper bound.

high : % -> S
from SegmentCategory(S)
incr : % -> Integer
from SegmentCategory(S)
latex : % -> String if S has SetCategory
from SetCategory
low : % -> S
from SegmentCategory(S)
map : (Mapping(S, S), %) -> Stream(S) if S has OrderedRing
from SegmentExpansionCategory(S, Stream(S))
reverse : % -> % if S has OrderedRing
from SegmentCategory(S)
segment : S -> %

segment(l) is an alternate way to construct the segment l...

segment : (S, S) -> %
from SegmentCategory(S)
~= : (%, %) -> Boolean if S has SetCategory
from BasicType

SegmentExpansionCategory(S, Stream(S))

SegmentCategory(S)

CoercibleTo(OutputForm)

ConvertibleTo(InputForm)

BasicType

SetCategory