AFTD Auto-Formalizing Theoretical Domains

simple_graph_cut_weight

def

Given a finite type V with decidable equality, a simple graph G on V with decidable adjacency, an edge weighting w : G.edgeSet → ℝ, and a vertex subset S : Finset V, the cut weight simple_graph_cut_weight G w S is defined as the sum over all edges e : G.edgeSet of w e if there exist u ∈ S and v ∉ S such that (e : Sym2 V) = s(u, v), and 0 otherwise.

Statement

noncomputable def simple_graph_cut_weight {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (w : G.edgeSet → ℝ) (S : Finset V) : ℝ
Defined in
arXiv:2611.05178 Section 1
Verified
09 Nov 2026
Axioms
none listed
Used by 3
  • simple_graph_max_cut_weightGiven a finite type V with decidable equality, a simple graph G on V with decidable adjacency, and an edge weighting w : G.edgeSet → ℝ,…
  • simple_graph_cut_weight_emptyIn any simple graph G on a finite type V with decidable equality and decidable adjacency, with edge weighting w : G.edgeSet → ℝ, the cut…
  • simple_graph_cut_weight_nonnegIn any simple graph G on a finite type V with decidable equality and decidable adjacency, with edge weighting w : G.edgeSet → ℝ satisfying…

Read back from the Lean

Given a finite type V with decidable equality, a simple graph G on V with decidable adjacency, an edge weight function w : G.edgeSet → ℝ, and a subset of vertices S : Finset V, simple_graph_cut_weight G w S is the sum over all edges e in G.edgeSet of w e if there exist u ∈ S and v ∉ S such that the unordered pair of e is s(u, v) (i.e. e connects a vertex in S to a vertex not in S), and 0 otherwise. In other words, it is the total weight of the edges crossing the cut (S, V \ S).

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 total weight of edges crossing between S and its complement in an edge-weighted simple graph. -/
noncomputable def simple_graph_cut_weight {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj] (w : G.edgeSet → ℝ) (S : Finset V) : ℝ := ∑ e : G.edgeSet, if ∃ u ∈ S, ∃ v ∉ S, (e : Sym2 V) = s(u, v) then w e else 0
See it in the graphDiscuss this resultChallenge it