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.
inductive type OAI.WLTime.Convention line 7
inductive Convention where | joint | separate deriving DecidableEq
definition OAI.WLTime.Graph line 11
def Graph (n : ℕ) := { a : Fin n → Fin n → Bool // (∀ x y, a x y = a y x) ∧ (∀ x, a x x = false) }
definition OAI.WLTime.Graph.adj line 17
def adj {n : ℕ} (G : Graph n) : Fin n → Fin n → Bool := G.val
definition OAI.WLTime.Graph.diameterTwo line 19
def diameterTwo {n : ℕ} (G : Graph n) : Prop := 0 < n ∧ ∀ x y, x = y ∨ G.adj x y = true ∨ ∃ z, G.adj x z = true ∧ G.adj z y = true
abbreviation OAI.WLTime.AtomicColor line 30
abbrev AtomicColor (k : ℕ) := (Fin k → Fin k → Bool) × (Fin k → Fin k → Bool)
definition OAI.WLTime.Color line 33
def Color (c : Convention) (k : ℕ) : ℕ → Type | 0 => AtomicColor k | t + 1 => match c with | .joint => Color c k t × Multiset (Fin k → Color c k t) | .separate => Color c k t × (Fin k → Multiset (Color c k t))
definition OAI.WLTime.tupleColor line 39
noncomputable def tupleColor {n : ℕ} (c : Convention) (k : ℕ) (G : Graph n) : (t : ℕ) → (Fin k → Fin n) → Color c k t | 0, v => (fun i j => decide (v i = v j), fun i j => G.adj (v i) (v j)) | t + 1, v => match c with | .joint => (tupleColor .joint k G t v, Finset.univ.val.map (fun z => fun i => tupleColor .joint k G t (Function.update v i z))) | .separate => (tupleColor .separate k G t v, fun i => Finset.univ.val.map (fun z => tupleColor .separate k G t (Function.update v i z)))
definition OAI.WLTime.histogram line 50
noncomputable def histogram {n : ℕ} (c : Convention) (k : ℕ) (G : Graph n) (t : ℕ) : Multiset (Color c k t) := Finset.univ.val.map (tupleColor c k G t)
definition OAI.WLTime.Equivalent line 54
def Equivalent {n : ℕ} (c : Convention) (k : ℕ) (G H : Graph n) : Prop := ∀ t, histogram c k G t = histogram c k H t
definition OAI.WLTime.encodeNat line 57
def encodeNat (n : ℕ) : List Bool := let bits := (Nat.digits 2 n).map (fun b => decide (b = 1)) List.replicate bits.length true ++ [false] ++ bits
definition OAI.WLTime.matrixBits line 61
def matrixBits {n : ℕ} (G : Graph n) : List Bool := (List.ofFn fun i : Fin n => List.ofFn fun j : Fin n => G.adj i j).flatten
definition OAI.WLTime.encodePair line 64
def encodePair {n : ℕ} (G H : Graph n) : List Bool := encodeNat n ++ matrixBits G ++ matrixBits H
inductive type OAI.WLTime.Move line 67
inductive Move where | left | stay | right deriving DecidableEq
definition OAI.WLTime.Move.displacement line 71
def Move.displacement : Move → ℤ | .left => -1 | .stay => 0 | .right => 1
structure OAI.WLTime.TM line 76
structure TM where tapes : ℕ states : ℕ symbols : ℕ tapes_pos : 0 < tapes states_ge : 3 ≤ states symbols_ge : 3 ≤ symbols transition : Fin states → (Fin tapes → Fin symbols) → Fin states × (Fin tapes → Fin symbols) × (Fin tapes → Move)
structure OAI.WLTime.TM.Config line 88
structure Config (M : TM) where state : Fin M.states head : Fin M.tapes → ℤ tape : Fin M.tapes → ℤ → Fin M.symbols
definition OAI.WLTime.TM.symbol line 93
def symbol (M : TM) (b : Bool) : Fin M.symbols := if b then ⟨2, by have := M.symbols_ge; omega⟩ else ⟨1, by have := M.symbols_ge; omega⟩
definition OAI.WLTime.TM.initial line 97
def initial (M : TM) (w : List Bool) : M.Config where state := ⟨0, by have := M.states_ge; omega⟩ head := fun _ => 0 tape := fun a z => if a.val = 0 ∧ 0 ≤ z ∧ z.toNat < w.length then M.symbol (w.getD z.toNat false) else ⟨0, by have := M.symbols_ge; omega⟩
definition OAI.WLTime.TM.halted line 103
def halted (M : TM) (C : M.Config) : Prop := C.state.val = 1 ∨ C.state.val = 2
definition OAI.WLTime.TM.step line 108
def step (M : TM) (C : M.Config) : M.Config := if M.halted C then C else let tr := M.transition C.state (fun a => C.tape a (C.head a)) { state := tr.1 head := fun a => C.head a + (tr.2.2 a).displacement tape := fun a z => if z = C.head a then tr.2.1 a else C.tape a z }
definition OAI.WLTime.TM.run line 115
def run (M : TM) (w : List Bool) (t : ℕ) : M.Config := M.step^[t] (M.initial w)
definition OAI.WLTime.TM.halts line 117
def halts (M : TM) (w : List Bool) : Prop := ∃ t, M.halted (M.run w t)
definition OAI.WLTime.TM.time line 119
noncomputable def time (M : TM) (w : List Bool) : ℕ := by classical exact if h : M.halts w then Nat.find h else 0
definition OAI.WLTime.TM.accepts line 123
def accepts (M : TM) (w : List Bool) : Prop := ∃ t, (M.run w t).state.val = 1
13 more definitions are reached the same way; the full file lists them.