SequenceCategory(R)

distro.spad line 2 [edit on github]

A category for infinite sequences over a commutative ring. It is a stream with arithmetics.

# : % -> NonNegativeInteger if % has finiteAggregate
from Aggregate
* : (%, R) -> %
from RightModule(R)
* : (R, %) -> %
from LeftModule(R)
* : (Integer, %) -> %
from AbelianGroup
* : (NonNegativeInteger, %) -> %
from AbelianMonoid
* : (PositiveInteger, %) -> %
from AbelianSemiGroup
+ : (%, %) -> %
from AbelianSemiGroup
- : % -> %
from AbelianGroup
- : (%, %) -> %
from AbelianGroup
0 : () -> %
from AbelianMonoid
< : (%, %) -> Boolean if % has finiteAggregate and R has OrderedSet
from PartialOrder
<= : (%, %) -> Boolean if % has finiteAggregate and R has OrderedSet
from PartialOrder
= : (%, %) -> Boolean
from BasicType
> : (%, %) -> Boolean if % has finiteAggregate and R has OrderedSet
from PartialOrder
>= : (%, %) -> Boolean if % has finiteAggregate and R has OrderedSet
from PartialOrder
any? : (Mapping(Boolean, R), %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate(R)
apply : (%, Partition) -> R

elt(mm, pi) returns the product of the entries indexed by the integer partition pi (as in partitionend moments)

child? : (%, %) -> Boolean
from RecursiveAggregate(R)
children : % -> List(%)
from RecursiveAggregate(R)
coerce : Stream(R) -> %

coerce(x) creation of elements

coerce : % -> OutputForm
from CoercibleTo(OutputForm)
complete : % -> %
from LazyStreamAggregate(R)
concat : (%, %) -> %
from UnaryRecursiveAggregate(R)
concat : (%, R) -> %
from LinearAggregate(R)
concat : (R, %) -> %
from UnaryRecursiveAggregate(R)
concat : List(%) -> %
from LinearAggregate(R)
concat! : (%, %) -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
concat! : (%, R) -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
concat! : List(%) -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
cons : (R, %) -> %

cons(r, s) prepends r to the stream s

construct : List(R) -> %
from Collection(R)
convert : % -> InputForm if R has ConvertibleTo(InputForm)
from ConvertibleTo(InputForm)
copy : % -> %
from Aggregate
copyInto! : (%, %, Integer) -> % if % has finiteAggregate and % has shallowlyMutable
from LinearAggregate(R)
count : (R, %) -> NonNegativeInteger if % has finiteAggregate
from HomogeneousAggregate(R)
count : (Mapping(Boolean, R), %) -> NonNegativeInteger if % has finiteAggregate
from HomogeneousAggregate(R)
cycleEntry : % -> %
from UnaryRecursiveAggregate(R)
cycleLength : % -> NonNegativeInteger
from UnaryRecursiveAggregate(R)
cycleSplit! : % -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
cycleTail : % -> %
from UnaryRecursiveAggregate(R)
cyclic? : % -> Boolean
from RecursiveAggregate(R)
delete : (%, Integer) -> %
from LinearAggregate(R)
delete : (%, UniversalSegment(Integer)) -> %
from LinearAggregate(R)
dilate : (R, %) -> %

dilate(a, x) returns the sequence $a^n x_n$ (starting at $n=1$)

distance : (%, %) -> Integer
from RecursiveAggregate(R)
elt : (%, "rest") -> %
from UnaryRecursiveAggregate(R)
elt : (%, UniversalSegment(Integer)) -> %
from Eltable(UniversalSegment(Integer), %)
elt : (%, "first") -> R
from UnaryRecursiveAggregate(R)
elt : (%, "last") -> R
from UnaryRecursiveAggregate(R)
elt : (%, "value") -> R
from RecursiveAggregate(R)
elt : (%, Integer) -> R

elt(mm, n) returns the nth element of a sequence.

elt : (%, Integer, R) -> R
from EltableAggregate(Integer, R)
empty : () -> %
from Aggregate
empty? : % -> Boolean
from Aggregate
entries : % -> List(R)
from IndexedAggregate(Integer, R)
entry? : (R, %) -> Boolean if % has finiteAggregate
from IndexedAggregate(Integer, R)
eq? : (%, %) -> Boolean
from Aggregate
eval : (%, R, R) -> % if R has Evalable(R)
from InnerEvalable(R, R)
eval : (%, Equation(R)) -> % if R has Evalable(R)
from Evalable(R)
eval : (%, List(R), List(R)) -> % if R has Evalable(R)
from InnerEvalable(R, R)
eval : (%, List(Equation(R))) -> % if R has Evalable(R)
from Evalable(R)
every? : (Mapping(Boolean, R), %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate(R)
explicitEntries? : % -> Boolean
from LazyStreamAggregate(R)
explicitlyEmpty? : % -> Boolean
from LazyStreamAggregate(R)
explicitlyFinite? : % -> Boolean
from StreamAggregate(R)
extend : (%, Integer) -> %
from LazyStreamAggregate(R)
fill! : (%, R) -> % if % has shallowlyMutable
from IndexedAggregate(Integer, R)
find : (Mapping(Boolean, R), %) -> Union(R, "failed")
from Collection(R)
first : (%, NonNegativeInteger) -> %

first(x, n) returns the sequence of the first n entries

first : % -> R
from UnaryRecursiveAggregate(R)
firstn : (%, NonNegativeInteger) -> List(R)

firstn(x, n) returns a list of the first n entries

frst : % -> R
from LazyStreamAggregate(R)
hash : % -> SingleInteger if % has finiteAggregate and R has Hashable
from Hashable
hashUpdate! : (HashState, %) -> HashState if % has finiteAggregate and R has Hashable
from Hashable
index? : (Integer, %) -> Boolean
from IndexedAggregate(Integer, R)
indices : % -> List(Integer)
from IndexedAggregate(Integer, R)
insert : (%, %, Integer) -> %
from LinearAggregate(R)
insert : (R, %, Integer) -> %
from LinearAggregate(R)
last : (%, NonNegativeInteger) -> %
from UnaryRecursiveAggregate(R)
last : % -> R
from UnaryRecursiveAggregate(R)
latex : % -> String
from SetCategory
lazy? : % -> Boolean
from LazyStreamAggregate(R)
lazyEvaluate : % -> %
from LazyStreamAggregate(R)
leaf? : % -> Boolean
from RecursiveAggregate(R)
leaves : % -> List(R)
from RecursiveAggregate(R)
leftTrim : (%, R) -> % if % has finiteAggregate
from LinearAggregate(R)
less? : (%, NonNegativeInteger) -> Boolean
from Aggregate
map : (Mapping(R, R), %) -> %
from HomogeneousAggregate(R)
map : (Mapping(R, R, R), %, %) -> %
from LinearAggregate(R)
map! : (Mapping(R, R), %) -> % if % has shallowlyMutable
from HomogeneousAggregate(R)
max : (%, %) -> % if % has finiteAggregate and R has OrderedSet
from OrderedSet
max : % -> R if % has finiteAggregate and R has OrderedSet
from HomogeneousAggregate(R)
max : (Mapping(Boolean, R, R), %) -> R if % has finiteAggregate
from HomogeneousAggregate(R)
maxIndex : % -> Integer
from IndexedAggregate(Integer, R)
member? : (R, %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate(R)
members : % -> List(R) if % has finiteAggregate
from HomogeneousAggregate(R)
merge : (%, %) -> % if % has finiteAggregate and R has OrderedSet
from LinearAggregate(R)
merge : (Mapping(Boolean, R, R), %, %) -> % if % has finiteAggregate
from LinearAggregate(R)
min : (%, %) -> % if % has finiteAggregate and R has OrderedSet
from OrderedSet
min : % -> R if % has finiteAggregate and R has OrderedSet
from HomogeneousAggregate(R)
minIndex : % -> Integer
from IndexedAggregate(Integer, R)
more? : (%, NonNegativeInteger) -> Boolean
from Aggregate
new : (NonNegativeInteger, R) -> %
from LinearAggregate(R)
node? : (%, %) -> Boolean
from RecursiveAggregate(R)
nodes : % -> List(%)
from RecursiveAggregate(R)
numberOfComputedEntries : % -> NonNegativeInteger
from LazyStreamAggregate(R)
opposite? : (%, %) -> Boolean
from AbelianMonoid
parts : % -> List(R) if % has finiteAggregate
from HomogeneousAggregate(R)
position : (R, %) -> Integer if % has finiteAggregate
from LinearAggregate(R)
position : (R, %, Integer) -> Integer if % has finiteAggregate
from LinearAggregate(R)
position : (Mapping(Boolean, R), %) -> Integer if % has finiteAggregate
from LinearAggregate(R)
possiblyInfinite? : % -> Boolean
from StreamAggregate(R)
qelt : (%, Integer) -> R
from EltableAggregate(Integer, R)
qsetelt! : (%, Integer, R) -> R if % has shallowlyMutable
from EltableAggregate(Integer, R)
qsetfirst! : (%, R) -> R if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
qsetrest! : (%, %) -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
reduce : (Mapping(R, R, R), %) -> R if % has finiteAggregate
from Collection(R)
reduce : (Mapping(R, R, R), %, R) -> R if % has finiteAggregate
from Collection(R)
reduce : (Mapping(R, R, R), %, R, R) -> R if % has finiteAggregate
from Collection(R)
remove : (R, %) -> % if % has finiteAggregate
from Collection(R)
remove : (Mapping(Boolean, R), %) -> %
from LazyStreamAggregate(R)
removeDuplicates : % -> % if % has finiteAggregate
from Collection(R)
rest : % -> %
from UnaryRecursiveAggregate(R)
rest : (%, NonNegativeInteger) -> %
from UnaryRecursiveAggregate(R)
reverse : % -> % if % has finiteAggregate
from LinearAggregate(R)
reverse! : % -> % if % has finiteAggregate and % has shallowlyMutable
from LinearAggregate(R)
rightTrim : (%, R) -> % if % has finiteAggregate
from LinearAggregate(R)
rst : % -> %
from LazyStreamAggregate(R)
sample : () -> %
from AbelianMonoid
second : % -> R
from UnaryRecursiveAggregate(R)
select : (Mapping(Boolean, R), %) -> %
from LazyStreamAggregate(R)
sequence : (Mapping(R, R), R) -> %

sequence(f, s0) generates a stream recursively by applying the function f: S -> S to the last computed value.

sequence : Stream(R) -> %

sequence(x) turns the stream x into a sequence

setchildren! : (%, List(%)) -> % if % has shallowlyMutable
from RecursiveAggregate(R)
setelt! : (%, "rest", %) -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
setelt! : (%, "first", R) -> R if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
setelt! : (%, "last", R) -> R if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
setelt! : (%, "value", R) -> R if % has shallowlyMutable
from RecursiveAggregate(R)
setelt! : (%, Integer, R) -> R if % has shallowlyMutable
from EltableAggregate(Integer, R)
setelt! : (%, UniversalSegment(Integer), R) -> R if % has shallowlyMutable
from LinearAggregate(R)
setfirst! : (%, R) -> R if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
setlast! : (%, R) -> R if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
setrest! : (%, %) -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
setvalue! : (%, R) -> R if % has shallowlyMutable
from RecursiveAggregate(R)
size? : (%, NonNegativeInteger) -> Boolean
from Aggregate
smaller? : (%, %) -> Boolean if R has Comparable and % has finiteAggregate or % has finiteAggregate and R has OrderedSet
from Comparable
sort : % -> % if % has finiteAggregate and R has OrderedSet
from LinearAggregate(R)
sort : (Mapping(Boolean, R, R), %) -> % if % has finiteAggregate
from LinearAggregate(R)
sort! : % -> % if % has finiteAggregate and R has OrderedSet and % has shallowlyMutable
from LinearAggregate(R)
sort! : (Mapping(Boolean, R, R), %) -> % if % has finiteAggregate and % has shallowlyMutable
from LinearAggregate(R)
sorted? : % -> Boolean if % has finiteAggregate and R has OrderedSet
from LinearAggregate(R)
sorted? : (Mapping(Boolean, R, R), %) -> Boolean if % has finiteAggregate
from LinearAggregate(R)
split! : (%, NonNegativeInteger) -> % if % has shallowlyMutable
from UnaryRecursiveAggregate(R)
stream : % -> Stream(R)

stream(x) returns stream of entries

subtractIfCan : (%, %) -> Union(%, "failed")
from CancellationAbelianMonoid
swap! : (%, Integer, Integer) -> Void if % has shallowlyMutable
from IndexedAggregate(Integer, R)
tail : % -> %
from UnaryRecursiveAggregate(R)
third : % -> R
from UnaryRecursiveAggregate(R)
trim : (%, R) -> % if % has finiteAggregate
from LinearAggregate(R)
value : % -> R
from RecursiveAggregate(R)
zero? : % -> Boolean
from AbelianMonoid
~= : (%, %) -> Boolean
from BasicType

LeftModule(R)

Evalable(R)

ConvertibleTo(InputForm)

OrderedSet

Collection(R)

BiModule(R, R)

RightModule(R)

EltableAggregate(Integer, R)

LazyStreamAggregate(R)

Module(R)

StreamAggregate(R)

PartialOrder

InnerEvalable(R, R)

Aggregate

Eltable(UniversalSegment(Integer), %)

CancellationAbelianMonoid

RecursiveAggregate(R)

AbelianMonoid

UnaryRecursiveAggregate(R)

Comparable

Hashable

HomogeneousAggregate(R)

CoercibleTo(OutputForm)

LinearAggregate(R)

BasicType

IndexedAggregate(Integer, R)

AbelianSemiGroup

SetCategory

Eltable(Integer, R)

AbelianGroup