OAI/Computability/FiniteCompiler/Transition.lean
33 declarations, 0 contain sorry, 0 declared as axioms
Finite weak transition components and finite-scan instruction semantics.
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.Terminalline 15Source documentation
An internal terminal configuration has no forward transition.
def Terminal (r : α → α → Prop) (a : α) : Prop := ∀ b, ¬ r a b
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.deterministic_joinline 18Source documentation
Determinism makes forward-reachability joins an equivalence relation.
theorem deterministic_join (hr : Relator.RightUnique r) : Equivalence (Join (ReflTransGen r)) := by … - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.weak_component_joinsline 28Source documentation
Undirected internal connectivity may be converted to a common forward descendant; no reversibility of the simulated machine is required.
theorem weak_component_joins (hr : Relator.RightUnique r) {a b : α} (h : EqvGen r a b) : Join (ReflTransGen r) a b := by … - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.terminal_eq_of_reachesline 33 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.reaches_terminalline 42Source documentation
Every configuration in a terminal's weak component reaches that terminal. This is the graph-theoretic core of source Lemma compiler-components, and holds even without the finite-component assumption.
theorem reaches_terminal (hr : Relator.RightUnique r) {a b : α} (hb : Terminal r b) (hab : EqvGen r a b) : ReflTransGen r a b := by … - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.terminal_uniqueline 50Source documentation
In particular there cannot be two successful terminal sectors in the same weak component, even with arbitrary reverse branching on dirty data.
theorem terminal_unique (hr : Relator.RightUnique r) {a b : α} (ha : Terminal r a) (hb : Terminal r b) (hab : EqvGen r a b) : a=b := … - structure
OAI.FiniteAlgebraicEnvelopes.Compiler.Configurationline 56Source documentation
Fixed ordered bases, a head gap, and finite tags are the finite search data of the finite compiler. Workspace quota insertion is NOT an internal step.
structure Configuration (Head Tag : Type*) (k : ℕ) where …
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.configuration_cardline 62 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.expandline 77Source documentation
One effective expansion by undirected internal edges.
def expand (s : Finset α) : Finset α := …
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.mem_expandline 80 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.subset_expandline 84 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.searchline 88Source documentation
This finite algorithm never calls the simulated partial function.
def search (a : α) : ℕ → Finset α | 0 => {a} | n+1 => expand r (search a n) - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.search_monoline 92 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.search_stabilizesline 97 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.componentline 115Source documentation
Entire weak component, computed by at most the known number of vertices many finite expansions. Unlike running the machine, this always terminates.
def component (a : α) : Finset α := search r a (Fintype.card α)
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.self_mem_componentline 117 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.component_saturatedline 120 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.mem_search_connectedline 127 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.mem_component_iffline 144Source documentation
Exactness of the finite component search on malformed as well as genuine configurations.
theorem mem_component_iff (a b : α) : b ∈ component r a ↔ EqvGen r a b := by …
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.decideConnectedline 158Source documentation
Consequently internal weak connectivity has a decision procedure that uses only the table and finite configuration data, not a halting oracle.
def decideConnected (a b : α) : Bool := decide (b ∈ component r a)
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.decideConnected_eq_trueline 160 - inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Baseline 167Source comment
The actual finite-scan instruction semantics of the finite compiler. The immutable bases are not part of what an instruction may update.inductive Base (S : Type*) | anchor : S → Base S | cutC : Base S | cutD : Base S | workspace : Base S deriving DecidableEq, Fintype
- structure
OAI.FiniteAlgebraicEnvelopes.Compiler.Tagline 174 - def
OAI.FiniteAlgebraicEnvelopes.Compiler.cleanline 183Source documentation
The same clean tag is used on every base, including its unused fields.
def clean {S Γ : Type*} (blank : Γ) : Tag S Γ := … - inductive
OAI.FiniteAlgebraicEnvelopes.Compiler.Directionline 186 - instance
OAI.FiniteAlgebraicEnvelopes.Compiler.(instance at line 190)line 190 - structure
OAI.FiniteAlgebraicEnvelopes.Compiler.Instructionline 192 - structure
OAI.FiniteAlgebraicEnvelopes.Compiler.Tableline 201Source documentation
Each state designates one reading side. A cell test has at most one result; boundary tests only change the state. A failed (or absent-boundary) test has no result. This is exactly the source's disjoint-case convention.
structure Table (Head Base Tag : Type*) where …
Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Base, OAI.FiniteAlgebraicEnvelopes.Compiler.Tag
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.stepline 209Source documentation
The finite state transition on sectors with fixed ordered base sequence. The two flags record whether alpha and omega are present. There is no insertion or deletion among internal steps.
def step {Head Base Tag : Type*} (table : Table Head Base Tag) {k : ℕ} (bases : Fin k → Base) (leftBoundary rightBoundary : Bool) (c : Configuration Head Tag k) : Option (Configuration Head Tag k) := …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Base, OAI.FiniteAlgebraicEnvelopes.Compiler.Tag, OAI.FiniteAlgebraicEnvelopes.Compiler.Table, OAI.FiniteAlgebraicEnvelopes.Compiler.Configuration
- def
OAI.FiniteAlgebraicEnvelopes.Compiler.InternalStepline 236Source documentation
The relation used for component search; the equation is used both ways in the presentation, but only this direction in the deterministic analysis.
def InternalStep {Head Base Tag : Type*} (table : Table Head Base Tag) {k : ℕ} (bases : Fin k → Base) (leftBoundary rightBoundary : Bool) (c d : Configuration Head Tag k) : Prop := …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Base, OAI.FiniteAlgebraicEnvelopes.Compiler.Tag, OAI.FiniteAlgebraicEnvelopes.Compiler.Table, OAI.FiniteAlgebraicEnvelopes.Compiler.Configuration
- instance
OAI.FiniteAlgebraicEnvelopes.Compiler.(instance at line 241)line 241 - theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.internalStep_deterministicline 248Source documentation
Determinism is proved on ALL data, not assumed for clean initial sectors.
theorem internalStep_deterministic {Head Base Tag : Type*} (table : Table Head Base Tag) {k : ℕ} (bases : Fin k → Base) (leftBoundary rightBoundary : Bool) : Relator.RightUnique (InternalStep table bases leftBoundary rightBoundary) := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Base, OAI.FiniteAlgebraicEnvelopes.Compiler.Tag, OAI.FiniteAlgebraicEnvelopes.Compiler.Table, OAI.FiniteAlgebraicEnvelopes.Compiler.InternalStep
- theorem
OAI.FiniteAlgebraicEnvelopes.Compiler.internal_terminal_reachedline 255Source documentation
The success-terminal assertion applies directly to the finite scan semantics.
theorem internal_terminal_reached {Head Base Tag : Type*} (table : Table Head Base Tag) {k : ℕ} (bases : Fin k → Base) (l r : Bool) {a b : Configuration Head Tag k} (hb : step table bases l r b = none) (hab : EqvGen (InternalStep table bases l r) a b) : ReflTransGen (InternalStep table bases l r) a b := by …Mentions: OAI.FiniteAlgebraicEnvelopes.Compiler.Base, OAI.FiniteAlgebraicEnvelopes.Compiler.Tag, OAI.FiniteAlgebraicEnvelopes.Compiler.Table, OAI.FiniteAlgebraicEnvelopes.Compiler.Configuration, OAI.FiniteAlgebraicEnvelopes.Compiler.step, OAI.FiniteAlgebraicEnvelopes.Compiler.InternalStep