AFTD Auto-Formalizing Theoretical Domains

digraph_edge_count

def

The number m of edges (arcs) of a finite digraph G.

Statement

def digraph_edge_count {V : Type*} [Fintype V] (G : Digraph V) [DecidableRel G.Adj] : ℕ
Defined in
arXiv:2610.21381 (Optimally large cuts in both directions), Sec. 1 (m = |E(G)|; digraphs have no loops and at most one edge per ordered pair).
Verified
16 Oct 2026
Axioms
none listed
Used by 17

Lean source view module on GitHub

/-- The number of arcs of a finite digraph (ordered pairs `(u, v)` with `G.Adj u v`). -/
def digraph_edge_count {V : Type*} [Fintype V] (G : Digraph V) [DecidableRel G.Adj] : ℕ :=
  (Finset.univ.filter fun p : V × V => G.Adj p.1 p.2).card
See it in the graphDiscuss this resultChallenge it