Theorem 6. A quartic-time normal form for one-use expressions
ProvedBackreferenceMatching.theorem_6Given a one-use expression of size , construct in time one ordinary expression and a list of ABCBD branches whose union accepts exactly the words matched by . The ordinary expression and each have size . Each has size .
import Definitions.Def_BackreferenceMatching_Algorithms
namespace BackreferenceMatching
theorem theorem_6 (q : ℕ) :
∃ (p : Program) (a c : ℕ), 0 < c ∧
∀ e : Expr q, BoundedUse 1 e → NormalizesWithin p a c e := by
sorry
end BackreferenceMatchingRead-back
What the Lean code literally says, in plain math · GPT-6
For every alphabet size , one word-RAM program normalizes every expression whose complete runs use at most one read each. It halts within instructions, where counts syntax nodes. The program and the natural numbers , with , may depend on . Initially every variable holds the empty word. A read counts even when its value is empty. The hypothesis holds vacuously without a complete run from this valuation. The case is included.
The regular component has at most nodes and the output lists at most branches. A word matches the expression exactly when the regular component matches it or it factors as , with matched respectively by the first, copy, middle and last regular expressions of one listed branch.
In each branch, first and middle have at most nodes each, and copy and last at most each.
On the expression's prefix code of length , the RAM uses -bit words. Tags through denote empty language, empty word, letter, union, concatenation, star, capture and read. Letter values and first-occurrence variable indices follow their tags. The entire output is the regular code, branch count and four codes per branch in list order.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.