[Next][Prev] [Right] [Left] [Up] [Index] [Root]

SEQUENCES

 
Acknowledgements
 
Introduction
      Enumerated Sequences
      Formal Sequences
      Compatibility
 
Creating Sequences
      The Formal Sequence Constructor
      The Enumerated Sequence Constructor
      The Arithmetic Progression Constructors
      Literal Sequences
 
Power Sequences
 
Operators on Sequences
      Access Functions
      Selection Operators on Enumerated Sequences
      Modifying Enumerated Sequences
      Creating New Enumerated Sequences from Existing Ones
            Operations on Sequences of Booleans
 
Predicates on Sequences
      Membership Testing
      Testing Order Relations
 
Recursion, Reduction, and Iteration
      Recursion
      Reduction
 
Iteration
 
Bibliography







DETAILS

 
Introduction

      Enumerated Sequences

      Formal Sequences

      Compatibility

 
Creating Sequences

      The Formal Sequence Constructor
            [! x in F | P(x) !]

      The Enumerated Sequence Constructor
            [ ] : Null -> ESeqEnum
            [ U | ] : Str -> SeqEnum
            [ e1, e2, ..., en ] : Elt, ..., Elt -> SeqEnum
            [ U | e1, e2, ..., em ] : Str, Elt, ..., Elt -> SeqEnum
            [ e(x) : x in E | P(x) ]
            [ U | e(x) : x in E | P(x) ]
            [ e(x1,...,xk) : x1 in E1, ..., xkin Ek | P(x1, ..., xk) ]
            [ U | e(x1,...,xk) : x1 in E1, ...,xk in Ek | P(x1, ..., xk) ]

      The Arithmetic Progression Constructors
            [ i..j ] : RngIntElt, RngIntElt -> SeqEnum
            [ i .. j by k ] : RngIntElt, RngIntElt, RngIntElt -> SeqEnum
            Example Seq_Progression (H10E1)

      Literal Sequences
            \[ m1, ..., mn ] : RngIntElt, ..., RngIntElt -> [ RngIntElt ]

 
Power Sequences
      PowerSequence(R) : Str -> PowSeqEnum
      S in P : SeqEnum, PowSeqEnum -> BoolElt
      P ! S : PowSeqEnum, SeqEnum -> SeqEnum
      Example Seq_PowerSequence (H10E2)

 
Operators on Sequences

      Access Functions
            # S : SeqEnum -> RngIntElt
            Parent(S) : SeqEnum -> Str
            Universe(S) : SeqEnum -> Str
            S[i] : SeqEnum, RngIntElt -> Elt

      Selection Operators on Enumerated Sequences
            S[I] : SeqEnum, [RngIntElt] -> SeqEnum
            Minimum(S) : SeqEnum -> Elt, RngIntElt
            Maximum(S) : SeqEnum -> Elt, RngIntElt
            Index(S, x) : SeqEnum, Elt -> RngIntElt
            Representative(R) : SeqEnum -> Elt
            Random(R) : SeqEnum -> Elt
            Explode(R) : SeqEnum -> List
            Eltseq(R) : SeqEnum -> SeqEnum

      Modifying Enumerated Sequences
            Append(~S, x) : SeqEnum, Elt ->
            Exclude(~S, x) : SeqEnum, Elt ->
            Include(~S, x) : SeqEnum, Elt ->
            Insert(~S, i, x) : SeqEnum, RngIntElt, Elt ->
            Insert(~S, k, m, T) : SeqEnum, RngIntElt, RngIntElt, SeqEnum ->
            Prune(~S) : SeqEnum ->
            Remove(~S, i) : SeqEnum, RngIntElt ->
            Reverse(~S) : SeqEnum ->
            Rotate(~S, p) : SeqEnum, RngIntElt ->
            Sort(~S) : SeqEnum ->
            Sort(~S, C) : SeqEnum, UserProgram ->
            ParallelSort(~S, ~T) : SeqEnum, SeqEnum ->
            Undefine(~S, i) : SeqEnum, RngIntElt ->
            ChangeUniverse(S, V) : SeqEnum, Str ->
            CanChangeUniverse(S, V) : SeqEnum, Str -> Bool, SeqEnum
            Example Seq_Farey (H10E3)

      Creating New Enumerated Sequences from Existing Ones
            S cat T : SeqEnum, SeqEnum -> SeqEnum
            S cat:= T : SeqEnum, SeqEnum ->
            Partition(S, p) : SeqEnum, RngIntElt -> SeqEnum(SeqEnum)
            Partition(S, P) : SeqEnum, [RngIntElt] -> SeqEnum(SeqEnum)
            Setseq(S) : SetEnum -> SeqEnum
            Seqset(S) : SeqEnum -> SetEnum
            Example Seq_EgyptianFractions (H10E4)

            Operations on Sequences of Booleans
                  And(S, T) : [ BoolElt ], [ BoolElt ] -> [BoolElt]
                  Or(S, T) : [ BoolElt ], [ BoolElt ] -> [ BoolElt ]
                  Xor(S, T) : [ BoolElt ], [ BoolElt ] -> [ BoolElt ]
                  Not(S) : [ BoolElt ] -> [ BoolElt ]

 
Predicates on Sequences
      IsComplete(S) : SeqEnum -> BoolElt
      IsDefined(S, i) : SeqEnum, RngIntElt -> BoolElt
      IsEmpty(S) : SeqEnum -> BoolElt
      IsNull(S) : SeqEnum -> BoolElt

      Membership Testing
            x in S : Elt, SeqEnum -> BoolElt
            x notin S : Elt, SeqEnum -> BoolElt
            IsSubsequence(S, T) : SeqEnum, SeqEnum -> BoolElt
            S eq T : SeqEnum, SeqEnum -> BoolElt
            S ne T : SeqEnum, SeqEnum -> BoolElt

      Testing Order Relations
            S lt T : SeqEnum, SeqEnum -> BoolElt
            S le T : SeqEnum, SeqEnum -> BoolElt
            S ge T : SeqEnum, SeqEnum -> BoolElt
            S gt T : SeqEnum, SeqEnum -> BoolElt

 
Recursion, Reduction, and Iteration

      Recursion
            Self(n) : RngIntElt -> Elt
            Example Seq_Self (H10E5)

      Reduction
            & S : Op, SeqEnum -> Elt

 
Iteration
      for x in S do statements; end for;
      Example Seq_NestedIteration (H10E6)

 
Bibliography

[Next][Prev] [Right] [____] [Up] [Index] [Root]
Version: V2.19 of Mon Dec 17 14:40:36 EST 2012