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.MatchingFPRAS.GraphInput line 8
structure GraphInput where n : ℕ edges : Finset (Fin n × Fin n) increasing : ∀ e ∈ edges, e.1 < e.2
definition OAI.MatchingFPRAS.Perfect line 14
def Perfect (G : GraphInput) (M : Finset (Fin G.n × Fin G.n)) : Prop := M ⊆ G.edges ∧ ∀ v : Fin G.n, ∃! e, e ∈ M ∧ (e.1 = v ∨ e.2 = v)
definition OAI.MatchingFPRAS.perfectMatchings line 17
noncomputable def perfectMatchings (G : GraphInput) : Finset (Finset (Fin G.n × Fin G.n)) := by classical exact G.edges.powerset.filter (Perfect G)
definition OAI.MatchingFPRAS.Z line 23
noncomputable def Z (G : GraphInput) : ℕ := (perfectMatchings G).card
abbreviation OAI.MatchingFPRAS.Symbol line 25
abbrev Symbol := Fin 8
definition OAI.MatchingFPRAS.encodeNat line 28
def encodeNat (n : ℕ) : List Symbol := (Nat.bits n).map (fun b => if b then 2 else 1) ++ [3]
definition OAI.MatchingFPRAS.encodeInt line 31
def encodeInt (z : ℤ) : List Symbol := (if z < 0 then [5] else [4]) ++ encodeNat z.natAbs
definition OAI.MatchingFPRAS.encodeRat line 35
def encodeRat (q : ℚ) : List Symbol := encodeInt q.num ++ encodeNat q.den
definition OAI.MatchingFPRAS.encodeInput line 38
def encodeInput (G : GraphInput) (ε δ : ℚ) : List Symbol := encodeNat G.n ++ encodeNat G.edges.card ++ (((G.edges.map toLex.toEmbedding).sort (· ≤ ·)).flatMap fun e => encodeNat (ofLex e).1.val ++ encodeNat (ofLex e).2.val) ++ encodeRat ε ++ encodeRat δ
structure OAI.MatchingFPRAS.RandomMachine line 45
structure RandomMachine where states : ℕ transition : Fin (states + 1) → Symbol → Bool → Option (Fin (states + 1) × Turing.TM0.Stmt Symbol)
structure OAI.MatchingFPRAS.Configuration line 50
structure Configuration (A : RandomMachine) where state : Option (Fin (A.states + 1)) tape : Turing.Tape Symbol
definition OAI.MatchingFPRAS.tick line 56
def tick (A : RandomMachine) (c : Configuration A) (bit : Bool) : Configuration A := match c.state with | none => c | some s => match A.transition s c.tape.head bit with | none => ⟨none, c.tape⟩ | some (s', action) => ⟨some s', match action with | .move d => c.tape.move d | .write a => c.tape.write a⟩
definition OAI.MatchingFPRAS.initial line 66
def initial (A : RandomMachine) (input : List Symbol) : Configuration A := ⟨some 0, Turing.Tape.mk₁ input⟩
definition OAI.MatchingFPRAS.run line 70
def run (A : RandomMachine) (input : List Symbol) {t : ℕ} (bits : Fin t → Bool) : Configuration A := (List.ofFn bits).foldl (tick A) (initial A input)
definition OAI.MatchingFPRAS.Outputs line 74
def Outputs (A : RandomMachine) (input : List Symbol) {t : ℕ} (bits : Fin t → Bool) (q : ℚ) : Prop := (run A input bits).state = none ∧ (run A input bits).tape.right₀ = Turing.ListBlank.mk (encodeRat q)
definition OAI.MatchingFPRAS.timeBound line 81
def timeBound (C d : ℕ) (G : GraphInput) (ε δ : ℚ) : ℕ := C * ((encodeInput G ε δ).length + ⌈ε⁻¹⌉₊ + Nat.clog 2 ⌈δ⁻¹⌉₊ + 1) ^ d
definition OAI.MatchingFPRAS.goodTapes line 84
noncomputable def goodTapes (A : RandomMachine) (G : GraphInput) (ε δ : ℚ) (t : ℕ) : Finset (Fin t → Bool) := by classical exact Finset.univ.filter fun bits => ∃ q : ℚ, Outputs A (encodeInput G ε δ) bits q ∧ (1 - ε) * (Z G : ℚ) ≤ q ∧ q ≤ (1 + ε) * (Z G : ℚ)