Local definitions the statement names, followed through the definitions they name in turn. The match is by name in the source text, so a name reached only through notation can be missed; the full file is below.
structure OAI.ThreeMachine.Instance line 7
structure Instance (n : ℕ) where edges : List (Fin n × Fin n)
definition OAI.ThreeMachine.Instance.edge line 10
def Instance.edge {n : ℕ} (G : Instance n) (u v : Fin n) : Prop := (u, v) ∈ G.edges
definition OAI.ThreeMachine.Instance.acyclic line 13
def Instance.acyclic {n : ℕ} (G : Instance n) : Prop := ∀ v, ¬Relation.TransGen G.edge v v
definition OAI.ThreeMachine.Feasible line 16
def Feasible {n : ℕ} (G : Instance n) (T : ℕ) (τ : Fin n → ℕ) : Prop := (∀ v, 1 ≤ τ v ∧ τ v ≤ T) ∧ (∀ t, ((Finset.univ : Finset (Fin n)).filter (fun v => τ v = t)).card ≤ 3) ∧ ∀ u v, G.edge u v → τ u < τ v
definition OAI.ThreeMachine.encodeNat line 21
def encodeNat (n : ℕ) : List Bool := let b := Computability.encodeNat n List.replicate b.length true ++ false :: b
definition OAI.ThreeMachine.encodeList line 25
def encodeList {α : Type} (f : α → List Bool) (xs : List α) : List Bool := encodeNat xs.length ++ xs.flatMap f
definition OAI.ThreeMachine.encodeInput line 28
def encodeInput {n : ℕ} (G : Instance n) (deadline : Option ℕ) : List Bool := (match deadline with | none => [false] | some T => true :: encodeNat T) ++ encodeList encodeNat ((List.range n).map (· + 1)) ++ encodeList (fun (e : Fin n × Fin n) => encodeNat (e.1.val + 1) ++ encodeNat (e.2.val + 1)) G.edges
definition OAI.ThreeMachine.encodeAnswer line 36
def encodeAnswer : Option (List ℕ) → List Bool | none => [false] | some slots => true :: encodeList encodeNat slots
definition OAI.ThreeMachine.slots line 40
def slots {n : ℕ} (τ : Fin n → ℕ) : List ℕ := List.ofFn τ
definition OAI.ThreeMachine.CorrectOutput line 42
def CorrectOutput {n : ℕ} (G : Instance n) (deadline : Option ℕ) (out : List Bool) : Prop := match deadline with | none => ∃ T τ, Feasible G T τ ∧ (∀ T' τ', Feasible G T' τ' → T ≤ T') ∧ out = encodeAnswer (some (slots τ)) | some T => (out = encodeAnswer none ∧ ¬∃ τ, Feasible G T τ) ∨ ∃ τ, Feasible G T τ ∧ out = encodeAnswer (some (slots τ))
structure OAI.ThreeMachine.Machine line 52
structure Machine (k q g : ℕ) where transition : Fin (q + 1) → (Fin (k + 1) → Fin (g + 3)) → Option (Fin (q + 1) × (Fin (k + 1) → Fin (g + 3) × Option Turing.Dir))
structure OAI.ThreeMachine.Configuration line 56
structure Configuration (k q g : ℕ) where state : Fin (q + 1) tapes : Fin (k + 1) → Turing.Tape (Fin (g + 3))
definition OAI.ThreeMachine.bitSymbol line 60
def bitSymbol {g : ℕ} (b : Bool) : Fin (g + 3) := if b then ⟨2, by omega⟩ else ⟨1, by omega⟩
definition OAI.ThreeMachine.Machine.step line 63
def Machine.step {k q g : ℕ} (M : Machine k q g) (c : Configuration k q g) : Option (Configuration k q g) := do let (state, action) ← M.transition c.state (fun i => (c.tapes i).head) return { state := state, tapes := fun i => let tape := (c.tapes i).write (action i).1 match (action i).2 with | none => tape | some d => tape.move d }
definition OAI.ThreeMachine.Machine.initial line 72
def Machine.initial {k q g : ℕ} (_M : Machine k q g) (input : List Bool) : Configuration k q g := { state := 0, tapes := fun i => Turing.Tape.mk₁ (if i = 0 then input.map bitSymbol else []) }
definition OAI.ThreeMachine.Machine.run line 77
def Machine.run {k q g : ℕ} (M : Machine k q g) (input : List Bool) (t : ℕ) : Configuration k q g := (fun c => (M.step c).getD c)^[t] (M.initial input)
definition OAI.ThreeMachine.Machine.Produces line 81
def Machine.Produces {k q g : ℕ} (M : Machine k q g) (input out : List Bool) (timeBound : ℕ) : Prop := ∃ t ≤ timeBound, M.step (M.run input t) = none ∧ ((M.run input t).tapes 0).right₀ = Turing.ListBlank.mk (out.map bitSymbol)