AFTD Auto-Formalizing Theoretical Domains

SignedGraph.edgeSign

def

The extended edge sign between two vertices u and v in a signed graph G is the signature of the edge if u and v are adjacent, and 0 otherwise.

Statement

noncomputable def SignedGraph.edgeSign {V : Type*} (G : SignedGraph V) (u v : V) : Int
Defined in
arXiv:2611.13901, Sec. 2.1
Verified
11 Nov 2026
Axioms
none listed
Built on 1
  • SignedGraphA signed graph on vertex type V consists of an underlying simple graph and a signature assigning to each edge a value in {1, -1}.
Used by 1
  • SignedGraph.netDegreeThe net-degree of a vertex v in a finite signed graph G is the sum over all vertices w of the extended edge sign between v and w.

Read back from the Lean

For any type V, a signed graph G on V, and vertices u, v : V, SignedGraph.edgeSign G u v is defined to be the integer G.sgn ⟨s(u, v), h⟩ if u and v are adjacent in G.graph (with proof h), and 0 otherwise.

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

/-- Extended edge sign between two vertices, taking value 0 for non-adjacent pairs. -/
noncomputable def SignedGraph.edgeSign {V : Type*} (G : SignedGraph V) (u v : V) : Int :=
  open Classical in if h : G.graph.Adj u v then G.sgn ⟨s(u, v), h⟩ else 0
See it in the graphDiscuss this resultChallenge it