AFTD Auto-Formalizing Theoretical Domains

digraph_out_degree

def

The out-degree d⁺(v) of a vertex v in a finite directed graph D is the number of out-neighbors of v, that is, the cardinality of the set of vertices w such that there is an arc from v to w.

Statement

def digraph_out_degree {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj] (v : V) : ℕ
Defined in
arXiv:2610.39702, Section 2.1
Verified
30 Oct 2026
Axioms
none listed
Used by 8

Read back from the Lean

For a finite type V, a directed graph D : Digraph V with a decidable adjacency relation D.Adj, and a vertex v : V, digraph_out_degree D v is defined as the number of vertices w : V such that D.Adj v w holds (that is, the cardinality of the finset of all out-neighbors w of 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 out-degree of a vertex in a finite directed graph. -/
def digraph_out_degree {V : Type*} [Fintype V] (D : Digraph V) [DecidableRel D.Adj] (v : V) : ℕ := (Finset.univ.filter (D.Adj v)).card
See it in the graphDiscuss this resultChallenge it