SignedGraph.switch
def
The switching of a signed graph G at a vertex v is the signed graph with the same underlying graph where the sign of every edge incident to v is negated and all other edge signs remain unchanged.
Statement
def SignedGraph.switch {V : Type*} [DecidableEq V] (G : SignedGraph V) (v : V) : SignedGraph V
- 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 6
- signed_graph_reconstructible_balanced_mono_pair_fixedLet G be a connected balanced signed graph on at least seven vertices, with a specified balance partition. Suppose distinct vertices a and…
- SignedGraph.SameDeckTwo signed graphs G1 and G2 on finite types V1 and V2 with decidable equality have the same switching deck if there exists an equivalence…
- signed_graph_reconstructible_balanced_mono_invariantA connected balanced signed graph is reconstructible from its switching deck if its underlying graph has an automorphism-invariant vertex…
- signed_graph_reconstructible_balanced_three_fixedEvery connected balanced signed graph on at least seven vertices is reconstructible from its switching deck if its underlying graph has…
- signed_graph_reconstructible_balanced_mixed_twin_pairLet G be a connected balanced signed graph on at least five vertices, with a specified balance partition. Suppose distinct vertices a and…
- SignedGraph.IsSwitchPartnerA vertex w distinct from v is a switch partner of v in G if switching G at v and then at w is not isomorphic to G but has the same…
Read back from the Lean
Given a type V with decidable equality, a signed graph G on V, and a vertex v : V, SignedGraph.switch G v defines a new signed graph on V whose underlying graph is G.graph, and whose edge sign function assigns - G.sgn e to each edge e containing v (i.e., v ∈ (e : Sym2 V)), and G.sgn e to each edge e not containing 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
/-- Switching a signed graph at a vertex negates the signs of incident edges. -/ def SignedGraph.switch {V : Type*} [DecidableEq V] (G : SignedGraph V) (v : V) : SignedGraph V where graph := G.graph sgn e := if (v ∈ (e : Sym2 V)) then - G.sgn e else G.sgn e sgn_mem := by intro e split_ifs · rcases G.sgn_mem e with h | h · right; omega · left; omega · exact G.sgn_mem e