A finite List Nat canonicalizer
InductiveStacks of the list-of-naturals canonicalizer#✓fully proved
External input, reverse accumulator, final output, and Nat workspace.
inductive K | input | acc | output | nat (k : NormalizeMachine.K)
deriving DecidableEq
inductive K | input | buffer | output
deriving DecidableEq
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:28
Uses 1 · Used by 22
DefinitionStack embedding of the number normalizer in the list canonicalizer#✓fully proved
Only the Nat workspace is visible to the shared normalizer.
def emb : SEmb (fun _ : NormalizeMachine.K => Bool) (fun _ : K => Bool) where
e := K.nat
inj _ _ h := K.nat.inj h
ι _ := Equiv.refl Bool
structure SEmb {K K' : Type} (Γ : K → Type) (Γ' : K' → Type) where
/-- The stack renaming. -/
e : K → K'
/-- Distinct sub-machine stacks go to distinct host stacks. -/
inj : Injective e
/-- The alphabet of each sub-machine stack, identified with its host stack's. -/
ι : ∀ k, Γ k ≃ Γ' (e k)
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:51
inductive K | input | buffer | output
deriving DecidableEq
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:28
inductive K | input | acc | output | nat (k : NormalizeMachine.K)
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:32
inj : Injective e
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:55
ι : ∀ k, Γ k ≃ Γ' (e k)
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:57
Uses 3 · Used by 4
InductiveControl labels of the list-of-naturals canonicalizer#✓fully proved
The normalizer's halt resumes frame emission.
inductive Lab
| loop | block | back | nat (l : NormalizeMachine.Lab) | emit | finish
| good | bad
deriving DecidableEq
inductive Lab | read (last : Option Bool) | copy | done
deriving DecidableEq
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:36
Uses 1 · Used by 18
DefinitionLabel embedding of the number normalizer in the list canonicalizer#✓fully proved
Label embedding of the actual shared Nat normalizer.
def natLabel : NormalizeMachine.Lab → Lab
| .done => .emit
| l => .nat l
inductive Lab | read (last : Option Bool) | copy | done
deriving DecidableEq
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:36
inductive Lab
| loop | block | back | nat (l : NormalizeMachine.Lab) | emit | finish
| good | bad
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:49
Uses 2 · Used by 4
DefinitionProgram of the list-of-naturals canonicalizer#✓fully proved
The concrete canonicalizer program.
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
inductive Lab
| loop | block | back | nat (l : NormalizeMachine.Lab) | emit | finish
| good | bad
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:49
inductive K | input | acc | output | nat (k : NormalizeMachine.K)
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:32
def read (a b : K) (d : Γ a → Option Bool) (g : Bool → Γ b)
(self good bad : Λ) : TM2.Stmt Γ Λ Bool :=
.peek a (fun _ o => isBit d o) <| .branch id
(.pop a (fun _ o => bitOf d o) <| .branch id
(.peek a (fun _ o => isBit d o) <| .branch id
(.pop a (fun _ o => bitOf d o) <| .push b g <|
.goto fun _ => self)
(.goto fun _ => bad))
(.goto fun _ => good))
(.goto fun _ => bad)
CSLibExt/Computability/Complexity/FramedCNF/Block.lean:32
def moveB (a b : K) (d : Γ a → Option Bool) (g : Bool → Γ b) (self next : Λ) :
TM2.Stmt Γ Λ σ :=
.peek a (fun _ o => Flag.tag (isBit d o))
(.branch Flag.untag
(.pop a (fun _ o => Flag.tag (bitOf d o))
(.branch Flag.untag
(.push b (fun _ => g true) (.goto fun _ => self))
(.push b (fun _ => g false) (.goto fun _ => self))))
(.goto fun _ => next))
MathlibExt/Computability/TuringMachine/BitOps.lean:86
def mapS : TM2.Stmt Γ Λ σ → TM2.Stmt Γ' Λ' σ
| .push k f q => .push (E.e k) (fun s => E.ι k (f s)) (mapS q)
| .peek k f q => .peek (E.e k) (fun s o => f s (o.map (E.ι k).symm)) (mapS q)
| .pop k f q => .pop (E.e k) (fun s o => f s (o.map (E.ι k).symm)) (mapS q)
| .load a q => .load a (mapS q)
| .branch f q₁ q₂ => .branch f (mapS q₁) (mapS q₂)
| .goto f => .goto fun s => φ (f s)
| .halt => .halt
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:65
def emb : SEmb (fun _ : NormalizeMachine.K => Bool) (fun _ : K => Bool) where
e := K.nat
inj _ _ h := K.nat.inj h
ι _ := Equiv.refl Bool
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:43
def natLabel : NormalizeMachine.Lab → Lab
| .done => .emit
| l => .nat l
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:63
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .read last =>
.peek .input (fun _ o => o.isSome) <| .branch id
(.pop .input (fun _ o => o.getD false) <|
.push .buffer id <| .goto fun b => .read (some b))
(if last = some false then
.push .buffer (fun _ => true) (.goto fun _ => .copy)
else .goto fun _ => .copy)
| .copy => moveB .buffer .output some id .copy .done
| .done => .halt
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:46
def emitFrame (a b : K) (d : Γ a → Option Bool) (g : Bool → Γ b)
(self next : Λ) : TM2.Stmt Γ Λ Bool :=
.peek a (fun _ o => isBit d o) <| .branch id
(.pop a (fun _ o => bitOf d o) <|
.push b (fun _ => g true) <| .push b g <| .goto fun _ => self)
(.push b (fun _ => g false) <| .goto fun _ => next)
CSLibExt/Computability/Complexity/PolynomialEncoding/Frame.lean:32
Uses 12 · Used by 11
DefinitionWorkspace layout of the list-of-naturals canonicalizer#✓fully proved
Workspace layout for the composition invariant.
def st (x acc out : List Bool) (s : NormalizeMachine.K → List Bool) :
K → List Bool
| .input => x
| .acc => acc
| .output => out
| .nat k => s k
inductive K | input | buffer | output
deriving DecidableEq
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:28
inductive K | input | acc | output | nat (k : NormalizeMachine.K)
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:32
Uses 2 · Used by 8
TheoremList canonicalizer normalizes one element#✓fully proved
One list element is normalized and appended to the reverse accumulator; every scratch stack is ready for the next call.
theorem element_run (p x acc out : List Bool) (v : Bool) :
RunLe prog (8 * (delimit p).length)
⟨some .loop, v, st (delimit p ++ x) acc out
(NormalizeMachine.st [] [] [])⟩
⟨some .loop, false, st x
((delimit (normalizeNat p)).reverse ++ acc) out
(NormalizeMachine.st [] [] [])⟩
def RunLe (M : Λ → TM2.Stmt Γ Λ σ) (B : ℕ) (c d : TM2.Cfg Γ Λ σ) : Prop :=
∃ n, n ≤ B ∧ Run M n c d
MathlibExt/Computability/TuringMachine/Program.lean:901
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:68
def delimit : List Bool → List Bool
| [] => [false]
| b :: l => true :: b :: delimit l
MathlibExt/Computability/Complexity.lean:68
def st (x acc out : List Bool) (s : NormalizeMachine.K → List Bool) :
K → List Bool
| .input => x
| .acc => acc
| .output => out
| .nat k => s k
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:80
def st (input buffer output : List Bool) : K → List Bool
| .input => input
| .buffer => buffer
| .output => output
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:58
def normalizeNat (bits : List Bool) : List Bool :=
if bits.getLast? = some false then bits ++ [true] else bits
CSLibExt/Computability/Complexity/FramedCNF/Normalize.lean:27
Uses 27 · Used by 2
TheoremList canonicalizer normalizes a sequence of framed payloads#✓fully proved
Normalize any finite sequence of framed Nat payloads. The payloads need not be canonical, and previous accumulator/output suffixes survive.
theorem blocks_run (bs : List (List Bool)) :
∀ (acc out : List Bool) (v : Bool),
RunLe prog (8 * ((bs.map delimit).flatten).length + 1)
⟨some .loop, v, st ((bs.map delimit).flatten) acc out
(NormalizeMachine.st [] [] [])⟩
⟨some .finish, false, st []
(((bs.map (fun p => delimit (normalizeNat p))).flatten).reverse ++ acc)
out (NormalizeMachine.st [] [] [])⟩
def RunLe (M : Λ → TM2.Stmt Γ Λ σ) (B : ℕ) (c d : TM2.Cfg Γ Λ σ) : Prop :=
∃ n, n ≤ B ∧ Run M n c d
MathlibExt/Computability/TuringMachine/Program.lean:901
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:68
def delimit : List Bool → List Bool
| [] => [false]
| b :: l => true :: b :: delimit l
MathlibExt/Computability/Complexity.lean:68
def st (x acc out : List Bool) (s : NormalizeMachine.K → List Bool) :
K → List Bool
| .input => x
| .acc => acc
| .output => out
| .nat k => s k
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:80
def st (input buffer output : List Bool) : K → List Bool
| .input => input
| .buffer => buffer
| .output => output
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:58
def normalizeNat (bits : List Bool) : List Bool :=
if bits.getLast? = some false then bits ++ [true] else bits
CSLibExt/Computability/Complexity/FramedCNF/Normalize.lean:27
Uses 12 · Used by 1
TheoremList canonicalizer runs in linear time on decodable input#✓fully proved
Successful raw List Nat decoding is implemented in linear time, with canonical output and all private scratch stacks empty.
theorem run_some {x : List Bool} {as : List Nat}
(h : bitDecode x = some as) (out : List Bool) (v : Bool) :
∃ v', RunLe prog (11 * x.length + 2)
⟨some .loop, v, st x [] out (NormalizeMachine.st [] [] [])⟩
⟨some .good, v', st [] [] (bitEncode as ++ out)
(NormalizeMachine.st [] [] [])⟩
def bitDecode [BitstringEncoding α] (l : List Bool) : Option α := toEncoding.decode l
MathlibExt/Computability/Complexity.lean:58
def RunLe (M : Λ → TM2.Stmt Γ Λ σ) (B : ℕ) (c d : TM2.Cfg Γ Λ σ) : Prop :=
∃ n, n ≤ B ∧ Run M n c d
MathlibExt/Computability/TuringMachine/Program.lean:901
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:68
def st (x acc out : List Bool) (s : NormalizeMachine.K → List Bool) :
K → List Bool
| .input => x
| .acc => acc
| .output => out
| .nat k => s k
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:80
def st (input buffer output : List Bool) : K → List Bool
| .input => input
| .buffer => buffer
| .output => output
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:58
def bitEncode [BitstringEncoding α] (a : α) : List Bool := toEncoding.encode a
MathlibExt/Computability/Complexity.lean:55
Uses 24 · Used by 1
TheoremList canonicalizer fails on malformed input#✓fully proved
Every malformed raw List Nat input reaches the failure endpoint. The accumulator and Nat output may contain partial data; clear the workspace before reuse. No output claim is made for a failed parse.
theorem run_none {x : List Bool} (h : bitDecode (α := List Nat) x = none)
(acc out : List Bool) (v : Bool) :
∃ v' S, RunLe prog (8 * x.length + 2)
⟨some .loop, v, st x acc out (NormalizeMachine.st [] [] [])⟩
⟨some .bad, v', S⟩
def bitDecode [BitstringEncoding α] (l : List Bool) : Option α := toEncoding.decode l
MathlibExt/Computability/Complexity.lean:58
def RunLe (M : Λ → TM2.Stmt Γ Λ σ) (B : ℕ) (c d : TM2.Cfg Γ Λ σ) : Prop :=
∃ n, n ≤ B ∧ Run M n c d
MathlibExt/Computability/TuringMachine/Program.lean:901
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:68
def st (x acc out : List Bool) (s : NormalizeMachine.K → List Bool) :
K → List Bool
| .input => x
| .acc => acc
| .output => out
| .nat k => s k
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:80
def st (input buffer output : List Bool) : K → List Bool
| .input => input
| .buffer => buffer
| .output => output
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:58
Uses 22 · Used by 1
AbbreviationList-of-naturals canonicalizer as a host component#✓fully proved
The List Nat canonicalizer uses the existing finite Host interface.
abbrev component : Host.Comp where
K := K
Γ := fun _ => Bool
L := Lab
prog := prog
ks := [.input, .acc, .output, .nat .input, .nat .buffer, .nat .output]
ks_nodup := by decide
mem_ks k := by
cases k with
| input | acc | output => decide
| nat k => cases k <;> decide
structure Comp where
/-- Stack indices. -/
K : Type
/-- Decidable equality of stack indices. -/
[decK : DecidableEq K]
/-- Finitely many stacks. -/
[finK : Fintype K]
/-- Stack alphabets. -/
Γ : K → Type
/-- Finite alphabets. -/
[finΓ : ∀ k, Fintype (Γ k)]
/-- Labels. -/
⋯
CSLibExt/Computability/Complexity/Host.lean:53
inductive K | input | acc | output | nat (k : NormalizeMachine.K)
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:32
inductive Lab
| loop | block | back | nat (l : NormalizeMachine.Lab) | emit | finish
| good | bad
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:49
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:68
TheoremList canonicalizer reaches the decoding outcome with canonical output#✓fully proved
A total success/failure contract at the two actual halt labels. Success has canonical output; failure exposes no partial-output promise.
theorem run (x : List Bool) (v : Bool) :
∃ v' S, RunLe prog (11 * x.length + 2)
⟨some .loop, v, st x [] [] (NormalizeMachine.st [] [] [])⟩
⟨some (if (bitDecode (α := List Nat) x).isSome then .good else .bad),
v', S⟩ ∧
∀ as : List Nat, bitDecode x = some as →
S = st [] [] (bitEncode as) (NormalizeMachine.st [] [] [])
def RunLe (M : Λ → TM2.Stmt Γ Λ σ) (B : ℕ) (c d : TM2.Cfg Γ Λ σ) : Prop :=
∃ n, n ≤ B ∧ Run M n c d
MathlibExt/Computability/TuringMachine/Program.lean:901
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:68
def st (x acc out : List Bool) (s : NormalizeMachine.K → List Bool) :
K → List Bool
| .input => x
| .acc => acc
| .output => out
| .nat k => s k
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:80
def st (input buffer output : List Bool) : K → List Bool
| .input => input
| .buffer => buffer
| .output => output
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:58
def bitDecode [BitstringEncoding α] (l : List Bool) : Option α := toEncoding.decode l
MathlibExt/Computability/Complexity.lean:58
def bitEncode [BitstringEncoding α] (a : α) : List Bool := toEncoding.encode a
MathlibExt/Computability/Complexity.lean:55
Uses 18 · Used by 1
TheoremEmbedded list canonicalizer preserves outside stacks#✓fully proved
Embed the concrete normalizer in a caller, preserving every stack
outside its workspace on both success and failure. Entry requires clean
scratch and output stacks. After bad, clear partial workspace data
before another invocation.
theorem run_embedded {J L : Type} [DecidableEq J] {Γ : J → Type}
(E : SEmb (fun _ : K => Bool) Γ) (φ : Lab → L)
{M : L → TM2.Stmt Γ L Bool} (hm : Embeds E φ prog M)
(x : List Bool) (v : Bool) (S : ∀ j, List (Γ j))
(hs : Agree E (st x [] [] (NormalizeMachine.st [] [] [])) S) :
∃ v' T, RunLe M (11 * x.length + 2)
⟨some (φ .loop), v, S⟩
⟨some (φ (if (bitDecode (α := List Nat) x).isSome
then .good else .bad)), v', T⟩ ∧ Frame E S T ∧
∀ as : List Nat, bitDecode x = some as →
Agree E (st [] [] (bitEncode as) (NormalizeMachine.st [] [] [])) T
structure SEmb {K K' : Type} (Γ : K → Type) (Γ' : K' → Type) where
/-- The stack renaming. -/
e : K → K'
/-- Distinct sub-machine stacks go to distinct host stacks. -/
inj : Injective e
/-- The alphabet of each sub-machine stack, identified with its host stack's. -/
ι : ∀ k, Γ k ≃ Γ' (e k)
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:51
inductive K | input | acc | output | nat (k : NormalizeMachine.K)
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:32
inductive Lab
| loop | block | back | nat (l : NormalizeMachine.Lab) | emit | finish
| good | bad
deriving DecidableEq
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:49
def Embeds (M : Λ → TM2.Stmt Γ Λ σ) (M' : Λ' → TM2.Stmt Γ' Λ' σ) : Prop :=
∀ l, M' (φ l) = mapS E φ (M l) ∨ M l = .halt
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:76
def prog : Lab → TM2.Stmt (fun _ : K => Bool) Lab Bool
| .loop => .peek .input (fun _ o => o.isSome) <| .branch id
(.goto fun _ => .block) (.goto fun _ => .finish)
| .block => Block.read .input (.nat .output) some id .block .back .bad
| .back => moveB (.nat .output) (.nat .input) some id .back
(.nat (.read none))
| .nat l => mapS emb natLabel (NormalizeMachine.prog l)
| .emit => emitFrame (.nat .output) .acc some id .emit .loop
| .finish => moveB .acc .output some id .finish .good
| .good | .bad => .halt
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:68
def Agree (S : ∀ k, List (Γ k)) (S' : ∀ k', List (Γ' k')) : Prop :=
∀ k, S' (E.e k) = (S k).map (E.ι k)
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:80
def st (x acc out : List Bool) (s : NormalizeMachine.K → List Bool) :
K → List Bool
| .input => x
| .acc => acc
| .output => out
| .nat k => s k
CSLibExt/Computability/Complexity/PolynomialEncoding/ListNatMachine.lean:80
def st (input buffer output : List Bool) : K → List Bool
| .input => input
| .buffer => buffer
| .output => output
CSLibExt/Computability/Complexity/FramedCNF/NormalizeMachine.lean:58
def RunLe (M : Λ → TM2.Stmt Γ Λ σ) (B : ℕ) (c d : TM2.Cfg Γ Λ σ) : Prop :=
∃ n, n ≤ B ∧ Run M n c d
MathlibExt/Computability/TuringMachine/Program.lean:901
def bitDecode [BitstringEncoding α] (l : List Bool) : Option α := toEncoding.decode l
MathlibExt/Computability/Complexity.lean:58
def Frame (S' S'' : ∀ k', List (Γ' k')) : Prop :=
∀ k', (∀ k, E.e k ≠ k') → S'' k' = S' k'
MathlibExt/Computability/TuringMachine/StackEmbedding.lean:84
def bitEncode [BitstringEncoding α] (a : α) : List Bool := toEncoding.encode a
MathlibExt/Computability/Complexity.lean:55
Uses 21 · Used by 2
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.