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.
abbreviation OAI.ThreeState.TreeClauses.Spin line 11
abbrev Spin := Fin 3
definition OAI.ThreeState.TreeClauses.Admissible line 13
def Admissible (lam : ℝ) : Prop := -(1 / 2 : ℝ) ≤ lam ∧ lam ≤ 1
definition OAI.ThreeState.TreeClauses.channelWeight line 15
def channelWeight (lam : ℝ) (i j : Spin) : ℝ := if i = j then (1 + 2 * lam) / 3 else (1 - lam) / 3
definition OAI.ThreeState.TreeClauses.channel line 26
def channel (lam : ℝ) (hlam : Admissible lam) (i : Spin) : PMF Spin := PMF.ofFintype (fun j ↦ ENNReal.ofReal (channelWeight lam i j)) (by rw [← ENNReal.ofReal_sum_of_nonneg (fun j _ ↦ channelWeight_nonneg hlam i j), channelWeight_sum] norm_num)
definition OAI.ThreeState.TreeClauses.Observation line 32
def Observation : ℕ → Type | 0 => Spin | n + 1 => Multiset (Observation n)
definition OAI.ThreeState.TreeClauses.iidList line 36
def iidList {α : Type} (p : PMF α) : ℕ → PMF (List α) | 0 => PMF.pure [] | n + 1 => p.bind fun x ↦ (iidList p n).map (List.cons x)
definition OAI.ThreeState.TreeClauses.observationLaw line 40
def observationLaw (lam : ℝ) (hlam : Admissible lam) (offspring : PMF ℕ) : (ℓ : ℕ) → Spin → PMF (Observation ℓ) | 0, i => PMF.pure i | ℓ + 1, i => offspring.bind fun n ↦ (iidList ((channel lam hlam i).bind (observationLaw lam hlam offspring ℓ)) n).map (fun xs ↦ (xs : Multiset (Observation ℓ)))
definition OAI.ThreeState.TreeClauses.jointWeight line 47
def jointWeight (lam : ℝ) (hlam : Admissible lam) (offspring : PMF ℕ) (ℓ : ℕ) (i : Spin) (o : Observation ℓ) : ℝ≥0∞ := (1 / 3 : ℝ≥0∞) * observationLaw lam hlam offspring ℓ i o
definition OAI.ThreeState.TreeClauses.marginalWeight line 51
def marginalWeight (lam : ℝ) (hlam : Admissible lam) (offspring : PMF ℕ) (ℓ : ℕ) (o : Observation ℓ) : ℝ≥0∞ := ∑ i, jointWeight lam hlam offspring ℓ i o
definition OAI.ThreeState.TreeClauses.posterior line 55
def posterior (lam : ℝ) (hlam : Admissible lam) (offspring : PMF ℕ) (ℓ : ℕ) (o : Observation ℓ) (i : Spin) : ℝ := (jointWeight lam hlam offspring ℓ i o / marginalWeight lam hlam offspring ℓ o).toReal
definition OAI.ThreeState.TreeClauses.advantage line 59
def advantage (lam : ℝ) (hlam : Admissible lam) (offspring : PMF ℕ) (ℓ : ℕ) : ℝ := ∑' o : Observation ℓ, (marginalWeight lam hlam offspring ℓ o).toReal * ((∑ i : Spin, |posterior lam hlam offspring ℓ o i - (1 / 3 : ℝ)|) / 2)
definition OAI.ThreeState.TreeClauses.Reconstructs line 63
def Reconstructs (lam : ℝ) (hlam : Admissible lam) (offspring : PMF ℕ) : Prop := ∃ a : ℝ, 0 < a ∧ Tendsto (advantage lam hlam offspring) atTop (nhds a)
definition OAI.ThreeState.TreeClauses.Probability.poissonWeight line 68
def poissonWeight (rate : ℝ) (count : ℕ) : ℝ := Real.exp (-rate) * rate ^ count / (count.factorial : ℝ)
definition OAI.ThreeState.TreeClauses.Probability._root_.OAI.ThreeState.TreeClauses.poissonPMF line 79
def _root_.OAI.ThreeState.TreeClauses.poissonPMF (rate : ℝ≥0) : PMF ℕ := by refine ⟨fun count ↦ ENNReal.ofReal (poissonWeight rate count), ?_⟩ apply ENNReal.hasSum_coe.mpr rw [← Real.toNNReal_one] exact (poissonWeight_mass rate).toNNReal (poissonWeight_nonneg rate.coe_nonneg)