AFTD Auto-Formalizing Theoretical Domains

incident_edge_multiset

def

Given an edge-coloring ϕ of the complete graph on a finite type V assigning a finite subset of Fin r to each edge, incident_edge_multiset ϕ v is the multiset of edge colors on edges incident to v.

Statement

def incident_edge_multiset {V : Type*} [Fintype V] [DecidableEq V] {r : ℕ}
    (ϕ : (⊤ : SimpleGraph V).edgeSet → Finset (Fin r)) (v : V) : Multiset (Finset (Fin r))
Defined in
arXiv:2611.15376 Sec. 4
Verified
14 Nov 2026
Axioms
none listed
Used by 3

Read back from the Lean

incident_edge_multiset defines a function taking: - a finite type V with decidable equality, - an implicit natural number r, - a function ϕ from the edge set of the complete simple graph on V (i.e., unordered pairs of distinct vertices in V) to Finset (Fin r) (subsets of {0, …, r - 1}), - and a vertex v : V, and returning the Multiset (Finset (Fin r)) obtained by evaluating ϕ on each edge {u, v} as u ranges over all vertices in V \ {v}.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The multiset of edge labels incident to a vertex v in an edge-coloring of the complete graph. -/
def incident_edge_multiset {V : Type*} [Fintype V] [DecidableEq V] {r : ℕ}
    (ϕ : (⊤ : SimpleGraph V).edgeSet → Finset (Fin r)) (v : V) : Multiset (Finset (Fin r)) :=
  ((Finset.univ.erase v).attach.val.map (fun ⟨u, hu⟩ =>
    ϕ ⟨s(u, v), by
      rw [SimpleGraph.mem_edgeSet, SimpleGraph.top_adj]
      exact (Finset.mem_erase.mp hu).1⟩))
See it in the graphDiscuss this resultChallenge it