Sandwich words: replicate kL aL ++ mid ++ replicate kR aR #
A sandwich word is a list of the form replicate kL aL ++ mid ++ replicate kR aR — kL copies of the left bookend aL, then a middle,
then kR copies of the right bookend aR. Bookends may be asymmetric
(aL ≠ aR, kL ≠ kR), accommodating both symmetric phenomena (e.g.
@cite{lambert-2026} §5.1 Luganda, where aL = aR = low) and asymmetric
ones (e.g. @cite{lambert-2026} §4.2 Tsuut'ina, where aL = posterior,
aR = anterior).
This shape is the workhorse of @cite{lambert-2026}'s parameterised
counterexamples to multitier generalised definiteness (IsBTLI k):
given a phonotactic constraint, exhibit two sandwich words sharing the
same bookends that differ in the target language but match on every
length-k tier-affix. The substrate factors out the algebraic content:
takeAt_left_sandwich/takeAt_right_sandwich— tier-affixes always project toreplicate k aL/replicate k aRregardless ofmid, providedk ≤ kL/k ≤ kR.filter_sandwich_*— filtering preserves the sandwich shape, with bookend widths becoming 0 when the bookend character is dropped.sublist_sandwich_of_sublist_mid— any sublist ofmidis a sublist of the sandwich.not_sublist_sandwich— under non-bookend conditions on the pattern's head and last element, a sublist of the sandwich must come frommidalone.
The symmetric specialisation aL = aR, kL = kR is handled by passing
the same arguments twice; no separate definition is provided.
A sandwich word with possibly asymmetric bookends: kL copies of
aL on the left, then mid, then kR copies of aR on the right.
Equations
- Core.Computability.Subregular.sandwich kL aL mid kR aR = List.replicate kL aL ++ mid ++ List.replicate kR aR
Instances For
The length-k left tier-affix of a sandwich is replicate k aL,
provided the left bookend is at least k wide. Side condition keeps
this from @[simp] tagging — callers rw explicitly.
The length-k right tier-affix of a sandwich is replicate k aR,
provided the right bookend is at least k wide. Side condition keeps
this from @[simp] tagging — callers rw explicitly.
Sandwich filter, both bookends kept: shape preserved with original widths.
Sandwich filter, left bookend dropped, right kept.
Sandwich filter, left bookend kept, right dropped.
Sandwich filter, both bookends dropped: collapses to filtered middle.
Any sublist of the middle is a sublist of the sandwich.
A pattern that doesn't start with aL or end with aR, and isn't a
sublist of mid, is not a sublist of the sandwich. The bookend
replicate blocks can't supply the head or last element of pat, so
any sublist witness must come from mid alone.