AFTD Auto-Formalizing Theoretical Domains

digraph_is_connected

def

For a directed graph G : Digraph V on an implicit type {V : Type*}, digraph_is_connected G asserts that the underlying undirected simple graph G.toSimpleGraphInclusive is connected (SimpleGraph.Connected), meaning V is nonempty and any two vertices are reachable by a walk.

Statement

def digraph_is_connected {V : Type*} (G : Digraph V) : Prop
Defined in
arXiv:2610.18600 Section 1
Verified
25 Oct 2026
Axioms
none listed

Read back from the Lean

Given an arbitrary type V : Type* and a directed graph G : Digraph V, digraph_is_connected G is the proposition that the simple graph G.toSimpleGraphInclusive (the underlying undirected simple graph associated with G) is connected in the sense of Mathlib's SimpleGraph.Connected—that is, V is nonempty and there exists a walk between every pair of vertices u, v : V in G.toSimpleGraphInclusive.

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

/-- A directed graph G : Digraph V is connected if G.toSimpleGraphInclusive is Connected. -/
def digraph_is_connected {V : Type*} (G : Digraph V) : Prop := G.toSimpleGraphInclusive.Connected
See it in the graphDiscuss this resultChallenge it