Successful canonical block parses have an exact natural-number encoding
ProvedCookPvsNP.CanonicalBlockParser.success_exact_shapecomplexity-theorycomputation
If the canonical block parser halts with a successful top status marker, then its input consists of the canonical encoding of a natural number followed by the returned unread tail. The returned digit stack is exactly the reversed canonical binary digits of that number, and the second status marker confirms that a separator was read. This holds for every execution, including executions started on malformed input.
Preamble
import Definitions.Def_CookPvsNP_CanonicalBlockParser open CookPvsNP ProjSchedTW.Complexity
Formal statement
namespace CookPvsNP.CanonicalBlockParser
theorem success_exact_shape (input status rest digits markerTail : List BSym) (steps : ℕ)
(h : CookPvsNP.CanonicalBlockParser.parseCanonicalBlockProg.Exec
(CookPvsNP.CanonicalBlockParser.store input [] status)
(CookPvsNP.CanonicalBlockParser.store rest digits (.one :: markerTail)) steps) :
∃ n : ℕ, input = encNat n ++ rest ∧
digits = (n.bits.map (fun b ↦ if b then BSym.one else BSym.zero)).reverse ∧
markerTail = .one :: status := by
sorry
end CookPvsNP.CanonicalBlockParser