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.MatchingEntropy.LooplessGraph line 8
structure LooplessGraph (V : Type u_1) (E : Type u_2) where left : E → V right : E → V loopless : ∀ e, left e ≠ right e
definition OAI.MatchingEntropy.LooplessGraph.Incident line 14
def Incident (G : LooplessGraph V E) (v : V) (e : E) : Prop := G.left e=v ∨ G.right e=v
abbreviation OAI.BinaryMatching.Pair line 20
abbrev Pair (n : ℕ) := {ij : Fin n × Fin n // ij.1 < ij.2}
definition OAI.BinaryMatching.completeGraph line 21
def completeGraph (n : ℕ) : MatchingEntropy.LooplessGraph (Fin n) (Pair n) where left e := e.val.1 right e := e.val.2 loopless e := ne_of_lt e.property
structure OAI.BinaryMatching.Record line 26
structure Record where left : ℕ right : ℕ multiplicity : ℕ deriving DecidableEq
structure OAI.BinaryMatching.Input line 32
structure Input where n : ℕ records : List Record valid : ∀ e∈records, e.left < e.right ∧ e.right < n unique : (records.map (fun e => (e.left,e.right))).Nodup
definition OAI.BinaryMatching.multiplicity line 38
def multiplicity (G : Input) (e : Pair G.n) : ℕ := match G.records.find? (fun r => r.left=e.val.1.val && r.right=e.val.2.val) with | none => 0 | some r => r.multiplicity
definition OAI.BinaryMatching.encodeNat line 44
def encodeNat (n : ℕ) : List Bool := List.replicate n.bits.length false ++ true :: n.bits
definition OAI.BinaryMatching.encodeRecord line 47
def encodeRecord (r : Record) : List Bool := encodeNat r.left ++ encodeNat r.right ++ encodeNat r.multiplicity
definition OAI.BinaryMatching.encodeInput line 50
def encodeInput (G : Input) : List Bool := encodeNat G.n ++ encodeNat G.records.length ++ G.records.flatMap encodeRecord
abbreviation OAI.LoopMatching.Input.n line 70
abbrev Input.n (G : Input) : ℕ := G.ordinary.n
definition OAI.LoopMatching.loopMultiplicity line 72
def loopMultiplicity (G : Input) (v : Fin G.n) : ℕ := match G.loops.find? (fun r => r.vertex == v.val) with | none => 0 | some r => r.multiplicity
definition OAI.LoopMatching.IsPartialMatching line 77
def IsPartialMatching (n : ℕ) (M : Finset (BinaryMatching.Pair n)) : Prop := ∀ v : Fin n, ∀ e ∈ M, ∀ f ∈ M, (BinaryMatching.completeGraph n).Incident v e → (BinaryMatching.completeGraph n).Incident v f → e = f
abbreviation OAI.LoopMatching.PartialMatching line 82
abbrev PartialMatching (n : ℕ) := { M : Finset (BinaryMatching.Pair n) // IsPartialMatching n M }
definition OAI.LoopMatching.loopVertices line 88
noncomputable def loopVertices {n : ℕ} (M : PartialMatching n) : Finset (Fin n) := by classical exact Finset.univ.filter (fun v => ∀ e ∈ M.val, ¬ (BinaryMatching.completeGraph n).Incident v e)
definition OAI.LoopMatching.weight line 93
noncomputable def weight (G : Input) (M : PartialMatching G.n) : ℕ := (∏ e ∈ M.val, BinaryMatching.multiplicity G.ordinary e) * ∏ v ∈ loopVertices M, loopMultiplicity G v
definition OAI.LoopMatching.count line 97
noncomputable def count (G : Input) : ℕ := ∑ M : PartialMatching G.n, weight G M
definition OAI.LoopMatching.encodeOutput line 107
def encodeOutput (a : ℕ × ℕ) : List Bool := BinaryMatching.encodeNat a.1 ++ BinaryMatching.encodeNat a.2