Correctness and output size of one-use normalization
ProvedBackreferenceMatching.normalization_correct_sizecomputational-complexityregular-expressionsstring-algorithms
The explicit normalizer preserves the language of every one-use expression . For , the number of branches and the sizes of the fallback expression, , and are at most . The sizes of and are at most . The full serialized output has at most entries. The size bounds also hold on expressions outside the one-use class.
Preamble
import Definitions.Def_BackreferenceMatching_OneUseNormalizer import Definitions.Def_BackreferenceMatching_Algorithms
Formal statement
namespace BackreferenceMatching
theorem normalization_correct_size (q : ℕ) (e : Expr q) :
NormalSize 5 e.size (normalize e) ∧ (normalize e).code.length ≤ 23*e.size^4 ∧
(BoundedUse 1 e → ∀ w, Matches e w ↔ (normalize e).accepts w) := by sorry
end BackreferenceMatchingSource
Soh Kumabe and Yuya Uezato, On the Complexity of the Matching Problem of Regular Expressions with Backreferences, Theorem 6 and Appendix B. https://arxiv.org/html/2605.07289v1#A2