Documentation

CslibFrontier.Foundations.Combinatorics.SimpleGraph.SymmDiff

Symmetric difference of simple graphs #

Simple graphs on V form a Boolean algebra, so two graphs have a symmetric difference. Its edges are the edges of exactly one of the two graphs.

Main results #

@[simp]
theorem SimpleGraph.symmDiff_adj {V : Type u_1} (G H : SimpleGraph V) (a b : V) :
(symmDiff G H).Adj a b ↔ G.Adj a b ∧ ¬H.Adj a b ∨ H.Adj a b ∧ ¬G.Adj a b

Two vertices are adjacent in symmDiff G H exactly when they are adjacent in one of G and H but not in the other.

@[simp]

The edge set of the symmetric difference of two graphs is the symmetric difference of their edge sets.