OAI/Computability/FiniteCompiler/Surface.lean
83 declarations, 0 contain sorry, 0 declared as axioms
Surface alphabet, preprocessing, and grading estimates.
- inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Headline 15Source documentation
The complete head alphabet; internal control excludes raw, quota and cleanup.
inductive Head (H : Type*) | raw | pending | cleanup | internal : H → Head H deriving DecidableEq, Fintype
- abbrev
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Sectorline 20 - abbrev
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Cellsline 22 - inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.RawStepline 25Source documentation
Literal clean-anchor slides, oriented to the leftmost reachable head gap.
inductive RawStep (blank : Γ) : Sector S Γ H → Sector S Γ H → Prop | slide (a : S) (l r : Cells S Γ) (lb rb : Bool) : RawStep blank ⟨Validator.cell blank (.anchor a)::l,.raw,r,lb,rb⟩ ⟨l,.raw,Validator.cell blank (.anchor a)::r,lb,rb⟩Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Cells, OAI.FiniteAlgebraicEnvelopes.Compiler.Validator.cell, OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.raw
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawStep_deterministicline 30 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.gradeline 34 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawStep_gradeline 38 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawStep_skeletonline 44 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawSweepline 51 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawSweep_reachesline 58 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawSweep_terminalline 75 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawNormalline 92 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawNormal_reachesline 97 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawNormal_terminalline 103 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawNormal_invariantline 109 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawNormal_gradeline 115 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawline 124Source documentation
Literal raw singleton; in particular no program is evaluated on it.
def raw (w : List S) : Sector S Γ H := …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Sector
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawNormal_rawline 127 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.rawSweep_cleanline 129 - inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.QuotaStepline 146Source documentation
The quota rule is applicable only at the literal clean right cut.
inductive QuotaStep : Sector S Γ H → Sector S Γ H → Prop | trim (l r : Cells S Γ) (lb rb : Bool) : QuotaStep ⟨Validator.cell blank .workspace::l,.pending, Validator.cell blank .cutD::r,lb,rb⟩ ⟨l,.pending,Validator.cell blank .cutD::r,lb,rb⟩Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Cells, OAI.FiniteAlgebraicEnvelopes.Compiler.Validator.cell
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaStep_deterministicline 152 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaStep_gradeline 156 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaStep_leftline 161 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.trimQuotaline 168 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.trimQuota_terminalline 172 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaNormalline 183 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.trimQuota_reachesline 188 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaNormal_reachesline 202 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaNormal_terminalline 217 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaNormal_invariantline 236 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.quotaNormal_gradeline 242 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.unmergeline 252Source documentation
Unmerge after trimming. The outer boundaries may be absent and the outer cells may be arbitrarily dirty. Only the two displayed cut cells are tested.
def unmerge (v : Sector S Γ H) : List (Sector S Γ H) := …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Sector
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.pendingPreprocessline 261 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.pendingPreprocess_invariantline 264 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.listGradeline 268 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.unmerge_gradeline 270 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.pendingPreprocess_gradeline 288 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.trimQuota_workspaceline 292 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.pendingPreprocess_mergeline 299Source documentation
The literal merge is undone, even on dirty/incomplete surroundings.
theorem pendingPreprocess_merge (l r : Cells S Γ) (s : ℕ) (lb rb : Bool) : pendingPreprocess (H := H) blank …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Cells, OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.pendingPreprocess
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupHeadline 313 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.ofCleanupline 317 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupNormalline 319 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupNormal_ofCleanupline 325 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupNormal_gradeline 330 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocessline 346 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocess_gradeline 349 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocess_ofCleanupline 354 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocess_invariantline 359 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocess_rawStepline 364 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocess_successline 372Source documentation
Successful cleanup is exactly a full raw singleton, without any call to the program on the returned string.
theorem cleanupPreprocess_success (l : Cells S Γ) (out : List S) (n : ℕ) (h : Simulator.anchorView l = out.map some ++ List.replicate n none) : cleanupPreprocess (H := H) blank ⟨l.reverse,.cleanup,[],true,true⟩ = raw blank out := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Cells, OAI.FiniteAlgebraicEnvelopes.Compiler.Simulator.anchorView, OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocess, OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.raw
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.cleanupPreprocess_rawline 379 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.Entryline 389Source documentation
Literal entry and successful exit tests, both finite data predicates.
def Entry (blank : Γ) (v : Sector S Γ Q) : Prop := …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Control.Sector
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.Successline 392 - instance
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.entryDecidableline 395 - instance
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.successDecidableline 398 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.entry_casesline 401 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.entry_validatorline 410 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.success_casesline 416 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.entries_uniqueline 426 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.successes_uniqueline 434 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.representativeline 445 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.representative_connectedline 448 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.representative_eqline 452 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.representative_entryline 456 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Control.representative_successline 461 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.internalPreprocessline 480Source documentation
Internal finite-component search, with entry priority. No invocation of the compiled machine as an evaluator occurs here.
def internalPreprocess (v : Control.Sector S Γ Q) : List (Sector S Γ (Control.Head S Q)) := …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Control.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Control.Head
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.internalPreprocess_invariantline 488 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.internalPreprocess_entryline 493 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.internalPreprocess_successline 498 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocessline 507Source documentation
Complete sector preprocessing, prior to the only partial operation: maximal full-raw-run evaluation. Headless sectors will be preserved by the parser.
def preprocess (v : Sector S Γ (Control.Head S Q)) : List (Sector S Γ (Control.Head S Q)) := …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.Sector, OAI.FiniteAlgebraicEnvelopes.Compiler.Control.Head
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_rawline 514 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.skeletonGradeline 521 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.grade_skeletonline 524 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.grade_eq_of_skeletonline 529 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.internalPreprocess_gradeline 537 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_gradeline 554 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_rawStepline 563 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_quotaStepline 568 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_ofCleanupline 573 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_cleanupStepline 578 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_entryStepline 582 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.preprocess_internalStepline 588 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.pendingPreprocess_cleanEntryline 600Source documentation
The two outputs of unmerging a clean full entry are precisely the two full raw words. This includes zero workspace and empty x or y.
theorem pendingPreprocess_cleanEntry (x y : List S) (s : ℕ) : pendingPreprocess (H := Control.Head S Q) A.blank …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Surface.pendingPreprocess, OAI.FiniteAlgebraicEnvelopes.Compiler.Control.Head