Word models #
A word model is a word as a relational structure: its positions, each carrying the labels of its
symbol, related by an ordering of the positions. In the conventional model a symbol is its own one
label; in a feature-labelled model, Chandlee, Eyraud, Heinz, Jardine and Rawski's for segments, it
carries the values of its features, so that a position of a factor stands for a natural class. Two orderings recover the two strict classes of
stringsets as strictly local sets of word models. Under precedence, a factor occurring in a word
occurs in the subsequence its occurrence picks out, and a subsequence is itself a factor, its
positive diagram, so the strictly local sets are the strictly piecewise stringsets. Under
successor, the covering relation of the positions, an occurrence of a k-factor spans fewer than
k steps, so it misses one side of any k - 1 symbols, and the strictly local sets of words
between their edges are the strictly local stringsets. Relativizing successor to a tier, by
restricting a word to its tier positions and taking successor there, gives the successor model of
the word's projection, so the strictly local sets of relativized models are the tier-based
strictly local stringsets. A set is locally testable when membership depends only on the set of
factors; under successor the factors of a word are fixed by the infixes of at most k symbols of
the word between its edges, and these by its k-test vector, and under precedence by its
subsequences of at most k symbols.
Main definitions #
Subregular.wordLanguage: the signature of word models, a unary relation for each label and an ordering.Subregular.Labelling: the labels a symbol carries, itself alone in the conventional model and the values of its features in a feature-labelled one.Subregular.WordModel: a word under an ordering of its positions.Subregular.anchor: a word between its edges.
Main statements #
Language.isStrictlyLocal_iff_wordModel,Language.isLocallyTestable_iff_wordModel: the strictly local and locally testable stringsets are the strictly local and locally testable sets of words between their edges under successor.Language.isStrictlyPiecewise_iff_wordModel,Language.isPiecewiseTestable_iff_wordModel: the strictly piecewise and piecewise testable stringsets are those of words under precedence.Language.isTierStrictlyLocal_iff_wordModel: the tier-based strictly local stringsets are the strictly local sets of words under successor relativized to a tier.Subregular.WordModel.diagram_occurs_iff_forall₂,Subregular.WordModel.succDiagram_occurs_iff_forall₂: a word's diagram occurs under precedence, respectively successor, exactly in the words with a subsequence, respectively infix, whose positions carry its labels; for words of segments this is subsumption, position by position.
Implementation notes #
- An ordering is a relation on the positions passed to
WordModel, so precedence isWordModel w (· < ·)and successorWordModel (anchor w) (· ⋖ ·). - As in Rogers and Lambert's word models, the edges carry their own labels and are not related to
themselves. The strictly local stringsets pad a word with
k - 1boundary symbols instead, and the two classes differ only atk = 1, where the word models also forbid every word; the locally testable classes agree at everyk.
References #
The signature of word models over α.
Equations
- Subregular.wordLanguage α = { Functions := fun (x : ℕ) => Empty, Relations := Subregular.WordRel α }
Instances For
The labels a symbol carries in word models whose unary relations are P.
- labels : β → Set P
The labels of a symbol.
Instances
In the conventional model a symbol is its own one label.
Equations
- Subregular.instLabelling β = { labels := fun (b : β) => {b} }
The word model of u under an ordering R of its positions, each position labelled by its
symbol.
Equations
- Subregular.WordModel u x✝ = Fin u.length
Instances For
Equations
- One or more equations did not get rendered due to their size.
A position satisfies the unary relations of the labels its symbol carries.
Equations
- One or more equations did not get rendered due to their size.
An assignment realizes the atoms another does when each of its positions carries the labels of the other's and it keeps the ordering between its variables.
An assignment realizes the atoms another does when it reads the same symbols and keeps the ordering between its variables.
Precedence #
The factors of a subsequence occur in the word.
A factor occurring in a word occurs in the subsequence its occurrence picks out, which has no more symbols than the factor has variables.
The positive diagram of a word of at most k symbols under precedence, as a k-factor of
the labels P: every atom its positions satisfy.
Equations
- Subregular.WordModel.diagram P s hs = { n := s.length, le := hs, atoms := {a : (Subregular.wordLanguage P).Atom (Fin s.length) | a.Realize id}, preconnected := ⋯ }
Instances For
The diagram of a word occurs exactly in the words with a subsequence whose positions carry its labels, position by position.
The diagram of a word occurs exactly in the words of which it is a subsequence.
A one-position diagram occurs exactly in the words with a symbol carrying its labels.
The factors of a word under precedence are those of its subsequences of at most k
symbols.
Two words have the same factors under precedence exactly when they have the same
subsequences of at most k symbols.
Feature-labelled models #
A position may carry several properties, the values of features, as in Chandlee, Eyraud,
Heinz, Jardine and Rawski's unconventional models. A word of partial valuations ι → Flat V,
such as a word of segments, has a unary relation for each feature value, holding at the
positions with that value, so a position never has two values of one feature and may have none.
Under precedence the diagram of such a word occurs exactly in the words with a subsequence lying
above it position by position, and a natural class is a one-position factor.
A partial valuation, such as a segment, carries the values it gives its features.
Equations
- Subregular.WordModel.instLabellingForallFlatProd = { labels := fun (s : ι → Flat V) => {p : ι × V | s p.1 = ↑p.2} }
A valuation carries the labels of another exactly when it lies above it.
Under feature-labelled precedence models the diagram of a word occurs exactly in the words with a subsequence lying above it position by position.
Orderings with unit steps #
Variables an atom relates are at most one position apart, when the ordering takes unit steps.
An occurrence of a k-factor spans at most k - 1 positions, when the ordering takes unit
steps.
Successor #
Successor between positions takes unit steps.
The factors of an infix occur in the word under successor.
An occurrence of a k-factor under successor lies in an infix of at most k symbols, the
window it spans.
The diagram of a word under successor, as a k-factor of the labels P: the path of its
positions, each carrying the labels of its symbol.
Equations
- Subregular.WordModel.succDiagram P c hc = { n := c.length, le := hc, atoms := {a : (Subregular.wordLanguage P).Atom (Fin c.length) | a.Realize id}, preconnected := ⋯ }
Instances For
The successor diagram of a word occurs exactly in the words with an infix whose positions carry its labels, position by position.
The diagram of a word occurs under successor exactly in the words of which it is an infix.
Two words have the same factors under successor exactly when they have the same infixes of at
most k symbols.
Anchored words #
The word w between its edges, ⋊ w ⋉.
Equations
- Subregular.anchor w = Sum.inr Edge.left :: (List.map Sum.inl w ++ [Sum.inr Edge.right])
Instances For
The symbols of a word occurring together in an anchored word occur together in the word.
An infix of an anchored word starting at its left edge reads a prefix of the word.
An infix of an anchored word ending at its right edge reads a suffix of the word.
An anchored word is an infix of another only when the words are equal.
Anchored words agree from the start of a common suffix.
Every infix of an anchored word is the image of an infix of the word, possibly preceded by the left edge and followed by the right edge.
Locally testable stringsets #
Two words have the same k-test vector exactly when their anchored words have the same
infixes of at most k symbols.
Strictly local stringsets #
A factor of u₁ x v₂, with k - 1 symbols in x, is a factor of u₁ x v₁ or of u₂ x v₂:
an occurrence spans at most k - 1 positions, so it misses u₁ or v₂.
A suffix-substitution-closed stringset contains every word whose factors under successor all occur in its members: the word is rebuilt from members a symbol at a time.
A stringset is strictly k-piecewise exactly when it is a strictly k-local set of
precedence models.
A stringset is strictly k-local, for 2 ≤ k, exactly when it is a strictly k-local set of
anchored words ordered by successor.
A stringset is tier-based strictly k-local, for 2 ≤ k, exactly when for some tier it is a
strictly k-local set of words under successor relativized to the tier. Restricting a word to
its tier positions and taking successor there gives the successor model of its projection, so
the relativized models are those of the projections.
A stringset is piecewise k-testable exactly when it is a locally k-testable set of words
under precedence.
A stringset is locally k-testable exactly when it is a locally k-testable set of words
between their edges under successor.