Bimachines and weak determinism #
A Bimachine (Schützenberger; [Moh97]) computes a letter-to-letter string function
using both directions of context: a left automaton scans → and assigns a left state
to each position, a right automaton scans ← and assigns a right state, and the output at
position i is out (leftState before i) (input i) (rightState after i).
A bimachine over a single alphabet is non-interacting when its output is a union of
one-sided change-rules over the identity: each side may add its own change, but neither
can suppress the other's. IsBimachineWeaklyDeterministic is computability by such a
bimachine — the weakly-deterministic functions.
Main results #
Bimachine.run_getElem?— outputiisout (lState (x.take i)) (x i) (rState (x.drop (i+1))).not_isBimachineWeaklyDeterministic_of_requiresBothSides— a map with an unbounded interaction (RequiresBothSides: the target is changed, yet perturbing either far side reverts it) is not weakly deterministic. The far perturbations force both one-sided rules inert at the witness cell while the base needs one to fire — no union of one-sided rules can produce the change. A conjunctive change satisfies it; a two-sided union does not.
A bimachine: a left automaton (lInit/lStep, scanning →), a right automaton
(rInit/rStep, scanning ← over the suffix), and a cell output out reading both
context states and the current symbol.
- lInit : L
- lStep : L → α → L
- rInit : R
- rStep : R → α → R
- out : L → α → R → β
Instances For
Transfer a bimachine along state-space equivalences L ≃ L' and R ≃ R',
preserving run. Mirrors SFST.transferEquiv/Mealy.transferEquiv; the use case is
bringing Type* finite states down to Fin (Fintype.card ·) : Type 0 so a
universe-polymorphic machine can witness the Type 0-state existentials of
IsBimachineComputable/IsBimachineWeaklyDeterministic.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Flag bimachines #
The recurring two-sided-trigger shape: each side's automaton is the one-bit "some symbol
on my side satisfies p" flag, so lState/rState compute List.any and the cell sees
exactly the two flags. Conjunctive spreads (conjBM in Hierarchy.lean) and unbounded
tonal plateauing ([Jar16]) are instances.
The bimachine whose side states are "a symbol satisfying pL/pR occurred on my
side" flags.
Equations
- Subregular.Bimachine.ofFlags pL pR out = { lInit := false, lStep := fun (l : Bool) (a : α) => l || pL a, rInit := false, rStep := fun (r : Bool) (a : α) => r || pR a, out := out }
Instances For
Coordinate characterization of a flag bimachine: output i sees the input symbol and
the two window-any flags.
Weak determinism #
Computability by a finite bimachine (the length-preserving regular functions).
Equations
- Subregular.IsBimachineComputable f = ∃ (L : Type) (R : Type) (x : Fintype L) (x : Fintype R) (B : Subregular.Bimachine L R α β), B.run = f
Instances For
Constructor lemma: every finite-state bimachine witnesses IsBimachineComputable
for its run. States are accepted at arbitrary Type* and brought down to
Fin (Fintype.card ·) : Type 0 via transferEquiv + Fintype.equivFin, so consumers stop
spelling the ∃ (L R : Type) quadruple. Mirrors SFST.isLeftSubsequential.
The flank-witness template #
The recurring witness family for two-sided unboundedness: a target buried in a filler
run, with independently editable flanks. RequiresBothSides.of_flanks packages the
whole assembly — a map is excluded by exhibiting only the images of the base and the
two single-flank perturbations at the target. This is the three-map method of
[Yol25] §5.3, as an object.
A flank-controlled word: x, then n copies of fill, then y.
Equations
- Subregular.flankWord x fill y n = x :: (List.replicate n fill ++ [y])
Instances For
A non-filler value sits only on a flank.
A window reaching at most the filler run hits a iff the left flank is a.
Flank words differing only on the left agree off position 0.
Flank words differing only on the right agree off the last position.
f requires both sides: some target changes under f, yet perturbing either far
side reverts it to the identity. Unlike IsUnboundedCircumambient, a two-sided union
never satisfies this — removing one trigger leaves the other, so the output stays
changed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The three-map template: a d-indexed family of flank words whose target sits
d-far from both flanks, changed to on in the base and reverted by flipping either
flank alone, requires both sides.
Requiring both sides strengthens unbounded circumambience: a reverted target is in particular a flipped one. The converse fails (a two-sided union is circumambient but reverts under neither side alone).
Combine two one-sided change proposals over the identity default a: take the left
rule's change if it fires (≠ a), else the right rule's, else leave the symbol.
Equations
- Subregular.unite cL cR a = if cL = a then if cR = a then a else cR else cL
Instances For
A combined value equal to the default forces both one-sided proposals to be inert.
Non-interaction: the cell output is a union of one-sided change-rules over the
identity default — ωL/ωR each propose a change for their side, and the output takes
whichever fires, else leaves the symbol unchanged. Neither side can suppress the other's
change; that asymmetry is exactly what interaction would require.
Equations
- B.IsNonInteracting = ∃ (ωL : L → α → α) (ωR : R → α → α), ∀ (l : L) (a : α) (r : R), B.out l a r = Subregular.unite (ωL l a) (ωR r a) a
Instances For
Weak determinism: computability by a non-interacting finite bimachine.
Equations
- Subregular.IsBimachineWeaklyDeterministic f = ∃ (L : Type) (R : Type) (x : Fintype L) (x : Fintype R) (B : Subregular.Bimachine L R α α), B.run = f ∧ B.IsNonInteracting
Instances For
Constructor lemma: a non-interacting finite-state bimachine witnesses
IsBimachineWeaklyDeterministic for its run. The one-sided rules survive the
state-space transfer by composing with e.symm.
Under a non-interacting cell decomposition, a word whose run leaves target i
unchanged has both of its change-proposals inert there.
Unbounded interaction ⟹ not weakly deterministic. At the witness, the base changes
but each far perturbation reverts: the right perturbation keeps the left state, forcing ωL
inert at this cell; the left perturbation keeps the right state, forcing ωR inert; yet the
base needs one of them to fire — no union of one-sided rules can produce the change.