The Setting
Connections between periodic pieces of a superstring depend on where a word is read and which window receives it. A substring inside a visited window need not itself be a visited vertex. The library defines layers with explicit window endpoints and records that align an interval of one text with a receiving layer of another.
Let be an alphabet and a set of finite words. Write for the empty word and for the symbol length of a word . Texts have integer positions, so a text is a function .
The Definition
Definition 1. The finite text window of a text at integer endpoints is the word in (1).✦ (1)✦
For a text admitting a positive period, its primitive period is the least positive shift preserving every symbol, as in (2).✦ (2)✦
A threading of indexed by a set is a family of words and a permutation of satisfying (3).✦ Here deletes the first symbol of , and denotes prefix containment. (3)✦
A layer over on a text , with shift , is an integer boundary function satisfying (4); all variables in these conditions are integers.✦ (4)✦ The first exit position and last exit position of at are the bounds in (5). (5)
An occurrence of a word in a text at a starting position , written , is specified by (6), where is the symbol at position of , counted from zero.✦ (6) A layer records a word at , written , when (7) holds.✦ (7)✦ A recorded occurrence residue of a word in a layer with shift is an integer belonging to the set in (8). (8)✦
Two texts agree on the half-open interval , written , when (9) holds.✦ (9) For a receiving layer on a text with shift , a shifted interval record of a text is a triple satisfying (10).✦ The integer is the offset, and are the interval endpoints. (10)✦
What Is Checked
The layer and record definitions in (4) and (10) range over arbitrary alphabets and word sets, with integer-indexed texts and natural shifts, and the threading definition (3) permits an arbitrary index set.