Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sequences

What Are Sequences

A sequence is a datatype for storing a series of values, where values can occur multiple times and ordering is preserved. It differs from a matrix, in that it can have defined attributes; i.e. you can define a sequence to have varying lengths, and to restrict what values it can draw from it’s inner domain.

Attributes

Three cardinality attributes; size, minSize, maxSize. Three jectivity attributes; injective, surjective, bijective.

Sequences must have either a size or maxSize cardinality attribute.

Operators

There are two operators which are defined on sequences. These are represented as Expressions in Conjure-Oxide.

  • subsequence: does the sequence s appear in the same order in t (e.g. s=1,2,3 and t=1,3 are subsequences)
  • substring: does the sequence s appear in the same order and contiguously in t (e.g. s=1,2 is a substring of t=1,2,3 )