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.CoordinateSweeps.FiniteLaw line 19
structure FiniteLaw (Ω : Type*) where mass : Ω → ℝ nonneg : ∀ x, 0 ≤ mass x total : ∑ᶠ x, mass x = 1
definition OAI.CoordinateSweeps.FiniteLaw.uniform line 41
def uniform (Ω : Type*) [Fintype Ω] [Nonempty Ω] : FiniteLaw Ω where mass _ := (Fintype.card Ω : ℝ)⁻¹ nonneg _ := inv_nonneg.mpr (Nat.cast_nonneg _) total := by rw [finsum_eq_sum_of_fintype] simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul] exact mul_inv_cancel₀ (by exact_mod_cast Fintype.card_ne_zero)
definition OAI.CoordinateSweeps.FiniteLaw.map line 49
def map (μ : FiniteLaw Ω) (f : Ω → X) : FiniteLaw X where mass y := ∑ x, if f x = y then μ x else 0 nonneg y := Finset.sum_nonneg (fun x _ => by split_ifs; exact μ.nonneg x; exact le_rfl) total := by rw [finsum_eq_sum_of_fintype] classical rw [Finset.sum_comm] simp [μ.sum_mass]
abbreviation OAI.CoordinateSweeps.Cube line 60
abbrev Cube (d : ℕ) := Fin d → Bool
definition OAI.CoordinateSweeps.pairSwitch line 62
def pairSwitch {L : Type*} (bits : L → Bool) : Equiv.Perm (Bool × L) where
Show the remaining 10 lines
toFun x := (Bool.xor x.1 (bits x.2), x.2) invFun x := (Bool.xor x.1 (bits x.2), x.2) left_inv point := by rcases point with ⟨bit, label⟩ change ((bit ^^ bits label) ^^ bits label, label) = (bit, label) cases bit <;> cases bits label <;> simp right_inv point := by rcases point with ⟨bit, label⟩ change ((bit ^^ bits label) ^^ bits label, label) = (bit, label) cases bit <;> cases bits label <;> simp
definition OAI.CoordinateSweeps.binaryLayer line 74
def binaryLayer {d : ℕ} (j : Fin d) (bits : ({k : Fin d // k ≠ j} → Bool) → Bool) : Equiv.Perm (Cube d) := (Equiv.funSplitAt j Bool).trans ((pairSwitch bits).trans (Equiv.funSplitAt j Bool).symm)
definition OAI.CoordinateSweeps.orderedProduct line 79
def orderedProduct {G : Type*} [Monoid G] {d : ℕ} (g : Fin d → G) : G := (List.ofFn g).reverse.prod
abbreviation OAI.CoordinateSweeps.BinaryChoices line 82
abbrev BinaryChoices (d : ℕ) := ∀ j : Fin d, ({k : Fin d // k ≠ j} → Bool) → Bool
definition OAI.CoordinateSweeps.binarySweep line 86
def binarySweep (d : ℕ) (bits : BinaryChoices d) : Equiv.Perm (Cube d) := orderedProduct (fun j => binaryLayer j (bits j))
definition OAI.CoordinateSweeps.binaryLaw line 89
def binaryLaw (d : ℕ) : FiniteLaw (Equiv.Perm (Cube d)) := (FiniteLaw.uniform (BinaryChoices d)).map (binarySweep d)
structure OAI.CoordinateSweeps.Grid line 92
structure Grid where b : ℕ positive : 0 < b bits : Fin b → ℕ
definition OAI.CoordinateSweeps.Grid.size line 99
def size (G : Grid) : ℕ := ∏ j, 2 ^ G.bits j
abbreviation OAI.CoordinateSweeps.Grid.Slot line 101
abbrev Slot (G : Grid) := ∀ j, Cube (G.bits j)
abbreviation OAI.CoordinateSweeps.Grid.Line line 103
abbrev Line (G : Grid) (j : Fin G.b) := ∀ k : {k : Fin G.b // k ≠ j}, Cube (G.bits k)
abbreviation OAI.CoordinateSweeps.Grid.Choices line 105
abbrev Choices (G : Grid) := ∀ j, G.Line j → Equiv.Perm (Cube (G.bits j))
definition OAI.CoordinateSweeps.Grid.fiberPerm line 107
def fiberPerm {A B : Type*} (p : B → Equiv.Perm A) : Equiv.Perm (A × B) where toFun x := (p x.2 x.1, x.2) invFun x := ((p x.2).symm x.1, x.2) left_inv x := by simp right_inv x := by simp
definition OAI.CoordinateSweeps.Grid.stage line 113
def stage (G : Grid) (ω : G.Choices) (j : Fin G.b) : Equiv.Perm G.Slot := (Equiv.piSplitAt j (fun k => Cube (G.bits k))).trans ((fiberPerm (ω j)).trans (Equiv.piSplitAt j (fun k => Cube (G.bits k))).symm)
definition OAI.CoordinateSweeps.Grid.boundary line 117
def boundary (G : Grid) (ω : G.Choices) (t : ℕ) : Equiv.Perm G.Slot := ((List.ofFn (G.stage ω)).take t).reverse.prod
definition OAI.CoordinateSweeps.Grid.sweep line 120
def sweep (G : Grid) (ω : G.Choices) : Equiv.Perm G.Slot := G.boundary ω G.b
definition OAI.CoordinateSweeps.Grid.Allowed line 123
def Allowed (G : Grid) (r : ℕ) : Prop := ∀ j, r ≤ G.bits j ∧ G.bits j ≤ 2 * r
structure OAI.CoordinateSweeps.Grid.Holes line 126
structure Holes (G : Grid) (h : ℕ) where path : Fin h → Fin (G.b + 1) → G.Slot disjoint : ∀ t, Function.Injective (fun i => path i t) coordinate_step : ∀ i (j : Fin G.b) (k : Fin G.b), k ≠ j → path i j.succ k = path i j.castSucc k
definition OAI.CoordinateSweeps.Grid.Holes.Compatible line 136
def Compatible (H : G.Holes h) (ω : G.Choices) : Prop := ∀ i (t : Fin (G.b + 1)), G.boundary ω t (H.path i 0) = H.path i t
definition OAI.CoordinateSweeps.Grid.Holes.Feasible line 139
def Feasible (H : G.Holes h) : Prop := ∃ ω, H.Compatible ω
definition OAI.CoordinateSweeps.Grid.Holes.lineCount line 141
def lineCount (H : G.Holes h) (j : Fin G.b) (L : G.Line j) : ℕ := (Finset.univ.filter (fun i : Fin h => (fun k : {k : Fin G.b // k ≠ j} => H.path i j.castSucc k) = L)).card
32 more definitions are reached the same way; the full file lists them.