Tight Palindromic Factorizations
Abstract
The signed-weight lower bound is attained precisely when the prefix can be reduced to zero through tight palindrome cuts.
Theorem 1.1 (Equality is equivalent to a tight cut path).
Proof. Machine-checked in Lean as D5/S1/Words/Palindromes/PeriodDoubling/TightFactorization.tight_factorization_iff (✓ std3). ∎
Source. Repository-derived.
Commentary.
The list starts at the prefix endpoint n and ends at zero. Each successive pair decreases the endpoint, removes a nonempty palindromic suffix, and lowers the signed weight of the rounded half by exactly one. An optimal factorization supplies such a path when equality holds; conversely, a tight path constructs a factorization meeting the lower bound. Nat.sub denotes truncated natural subtraction and Nat.div denotes natural integer division. The last-option expression is none for an empty list and some(List.getLast(…)) otherwise; the nonempty proof argument is implicit.
References
- Truth anchor:
D5/S1/Words/Palindromes/PeriodDoubling/TightFactorization.tight_factorization_iff - Dependency: D5/S1/Words/Palindromes/PeriodDoubling/SignedCutLowerBound