Reading the halves in order requires exponential midpoint width for equality
ProvedLayeredTransitionAudit.equality_midpoint_widthautomata-theoryformal-verification
A deterministic layered diagram receives two n-bit strings consecutively, all bits of the first before any bit of the second. Assume its Boolean output always decides whether the two strings are equal. At least 2^n distinct states must be reachable at the midpoint, even if the transition rule can depend on the layer.
Preamble
import Definitions.Def_LayeredTransitionAudit open LayeredTransitionAudit
Formal statement
theorem LayeredTransitionAudit.equality_midpoint_width {Q : Type*} [DecidableEq Q]
(width : ℕ) (step : ℕ → Q → Bool → Q) (root : Q) (output : Q → Bool)
(correct : ∀ x y : Fin width → Bool,
output (run step 0 root (List.ofFn x ++ List.ofFn y)) = decide (x = y)) :
2^width ≤ (reachable (fun _ => Finset.univ) step root width).card := by sorrySource
The distinguishable-prefix argument for deterministic automata.