The areas / V30. Combinatorics
Mathlib.Combinatorics.SimpleGraph.DeleteEdges
38 declarations. Mathlib docs · Source
Edge deletion
This file defines operations deleting the edges of a simple graph and proves theorems in the finite case.
Main definitions
-
SimpleGraph.deleteEdges G sis the simple graphGwith the edgess : Set (Sym2 V)removed from the edge set. -
SimpleGraph.deleteIncidenceSet G vis the simple graphGwith the incidence set ofvremoved from the edge set. -
SimpleGraph.DeleteFar G p ris the predicate that a graph isr-delete-far from a propertyp, that is, at leastredges must be deleted to satisfyp.
def SimpleGraph.deleteEdges E1 #
{V : Type u_1} → SimpleGraph V → Set (Sym2 V) → SimpleGraph V
Given a set of vertex pairs, remove all of the corresponding edges from the graph's edge set, if present.
See also: SimpleGraph.Subgraph.deleteEdges.
instance SimpleGraph.instDecidableRelAdjDeleteEdgesOfDecidablePredSym2MemSetOfDecidableEq E0 #
{V : Type u_1} →
{G : SimpleGraph V} →
{s : Set (Sym2 V)} →
[DecidableRel G.Adj] → [DecidablePred fun x ↦ x ∈ s] → [DecidableEq V] → DecidableRel (G.deleteEdges s).Adj
theorem SimpleGraph.deleteEdges_adj E0 #
∀ {V : Type u_1} {v w : V} {G : SimpleGraph V} {s : Set (Sym2 V)}, (G.deleteEdges s).Adj v w ↔ G.Adj v w ∧ s(v, w) ∉ s
theorem SimpleGraph.deleteEdges_edgeSet E0 #
∀ {V : Type u_1} (G G' : SimpleGraph V), G.deleteEdges G'.edgeSet = G \ G'
theorem SimpleGraph.deleteEdges_deleteEdges E0 #
∀ {V : Type u_1} {G : SimpleGraph V} (s s' : Set (Sym2 V)), (G.deleteEdges s).deleteEdges s' = G.deleteEdges (s ∪ s')
theorem SimpleGraph.deleteEdges_empty E1 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.deleteEdges ∅ = G
theorem SimpleGraph.deleteEdges_univ E0 #
∀ {V : Type u_1} {G : SimpleGraph V}, G.deleteEdges Set.univ = ⊥
theorem SimpleGraph.deleteEdges_le_iff E0 #
∀ {V : Type u_1} {G : SimpleGraph V} (s : Set (Sym2 V)) (G' : SimpleGraph V),
G.deleteEdges s ≤ G' ↔ G ≤ SimpleGraph.fromEdgeSet s ⊔ G'
theorem SimpleGraph.deleteEdges_le E1 #
∀ {V : Type u_1} {G : SimpleGraph V} (s : Set (Sym2 V)), G.deleteEdges s ≤ G
theorem SimpleGraph.deleteEdges_anti E1 #
∀ {V : Type u_1} {G : SimpleGraph V} {s₁ s₂ : Set (Sym2 V)}, s₁ ⊆ s₂ → G.deleteEdges s₂ ≤ G.deleteEdges s₁
theorem SimpleGraph.deleteEdges_mono E1 #
∀ {V : Type u_1} {G H : SimpleGraph V} {s : Set (Sym2 V)}, G ≤ H → G.deleteEdges s ≤ H.deleteEdges s
theorem SimpleGraph.deleteEdges_eq_self E0 #
∀ {V : Type u_1} {G : SimpleGraph V} {s : Set (Sym2 V)}, G.deleteEdges s = G ↔ Disjoint G.edgeSet s
theorem SimpleGraph.deleteEdges_eq_inter_edgeSet E1 #
∀ {V : Type u_1} {G : SimpleGraph V} (s : Set (Sym2 V)), G.deleteEdges s = G.deleteEdges (s ∩ G.edgeSet)
theorem SimpleGraph.deleteEdges_of_subset_diagSet E0 #
∀ {V : Type u_1} {s : Set (Sym2 V)} (G : SimpleGraph V), s ⊆ Sym2.diagSet → G.deleteEdges s = G
theorem SimpleGraph.deleteEdges_sdiff_eq_of_le E1 #
∀ {V : Type u_1} {G H : SimpleGraph V}, H ≤ G → G.deleteEdges (G.edgeSet \ H.edgeSet) = H
theorem SimpleGraph.edgeSet_deleteEdges E0 #
∀ {V : Type u_1} {G : SimpleGraph V} (s : Set (Sym2 V)), (G.deleteEdges s).edgeSet = G.edgeSet \ s
theorem SimpleGraph.edgeFinset_deleteEdges E0 #
∀ {V : Type u_1} {G : SimpleGraph V} [inst : DecidableEq V] [inst_1 : Fintype ↑G.edgeSet] (s : Finset (Sym2 V))
[inst_2 : Fintype ↑(G.deleteEdges ↑s).edgeSet], (G.deleteEdges ↑s).edgeFinset = G.edgeFinset \ s
theorem SimpleGraph.deleteEdges_sup E0 #
∀ {V : Type u_1} (G H : SimpleGraph V) (s : Set (Sym2 V)), (G ⊔ H).deleteEdges s = G.deleteEdges s ⊔ H.deleteEdges s
theorem SimpleGraph.deleteEdges_fromEdgeSet E0 #
∀ {V : Type u_1} (s t : Set (Sym2 V)), (SimpleGraph.fromEdgeSet s).deleteEdges t = SimpleGraph.fromEdgeSet (s \ t)
theorem SimpleGraph.deleteEdges_eq_bot E0 #
∀ {V : Type u_1} {G : SimpleGraph V} {s : Set (Sym2 V)}, G.deleteEdges s = ⊥ ↔ G.edgeSet ⊆ s
def SimpleGraph.deleteIncidenceSet E1 #
{V : Type u_1} → SimpleGraph V → V → SimpleGraph V
Given a vertex x, remove the edges incident to x from the edge set.
theorem SimpleGraph.deleteIncidenceSet_adj E1 #
∀ {V : Type u_1} {G : SimpleGraph V} {x v₁ v₂ : V}, (G.deleteIncidenceSet x).Adj v₁ v₂ ↔ G.Adj v₁ v₂ ∧ v₁ ≠ x ∧ v₂ ≠ x
theorem SimpleGraph.deleteIncidenceSet_le E1 #
∀ {V : Type u_1} (G : SimpleGraph V) (x : V), G.deleteIncidenceSet x ≤ G
theorem SimpleGraph.edgeSet_fromEdgeSet_incidenceSet E1 #
∀ {V : Type u_1} (G : SimpleGraph V) (x : V), (SimpleGraph.fromEdgeSet (G.incidenceSet x)).edgeSet = G.incidenceSet x
theorem SimpleGraph.edgeSet_deleteIncidenceSet E1 #
∀ {V : Type u_1} (G : SimpleGraph V) (x : V), (G.deleteIncidenceSet x).edgeSet = G.edgeSet \ G.incidenceSet x
The edge set of G.deleteIncidenceSet x is the edge set of G set difference the incidence
set of the vertex x.
theorem SimpleGraph.support_deleteIncidenceSet_subset E1 #
∀ {V : Type u_1} (G : SimpleGraph V) (x : V), (G.deleteIncidenceSet x).support ⊆ G.support \ {x}
The support of G.deleteIncidenceSet x is a subset of the support of G set difference the
singleton set {x}.
theorem SimpleGraph.induce_deleteIncidenceSet_of_notMem E1 #
∀ {V : Type u_1} (G : SimpleGraph V) {s : Set V} {x : V},
x ∉ s → SimpleGraph.induce s (G.deleteIncidenceSet x) = SimpleGraph.induce s G
If the vertex x is not in the set s, then the induced subgraph in G.deleteIncidenceSet x
by s is equal to the induced subgraph in G by s.
instance SimpleGraph.instDecidableRelAdjDeleteIncidenceSet E0 #
{V : Type u_1} →
[DecidableEq V] → {G : SimpleGraph V} → [DecidableRel G.Adj] → {x : V} → DecidableRel (G.deleteIncidenceSet x).Adj
theorem SimpleGraph.card_edgeFinset_induce_compl_singleton E1 #
∀ {V : Type u_1} [inst : Fintype V] [inst_1 : DecidableEq V] (G : SimpleGraph V) [inst_2 : DecidableRel G.Adj] (x : V),
(SimpleGraph.induce {x}ᶜ G).edgeFinset.card = (G.deleteIncidenceSet x).edgeFinset.card
Deleting the incidence set of the vertex x retains the same number of edges as in the induced
subgraph of the vertices {x}ᶜ.
theorem SimpleGraph.edgeFinset_deleteIncidenceSet_eq_sdiff E1 #
∀ {V : Type u_1} [inst : Fintype V] [inst_1 : DecidableEq V] (G : SimpleGraph V) [inst_2 : DecidableRel G.Adj] (x : V),
(G.deleteIncidenceSet x).edgeFinset = G.edgeFinset \ G.incidenceFinset x
The finite edge set of G.deleteIncidenceSet x is the finite edge set of the simple graph G
set difference the finite incidence set of the vertex x.
theorem SimpleGraph.card_edgeFinset_deleteIncidenceSet E1 #
∀ {V : Type u_1} [inst : Fintype V] [inst_1 : DecidableEq V] (G : SimpleGraph V) [inst_2 : DecidableRel G.Adj] (x : V),
(G.deleteIncidenceSet x).edgeFinset.card = G.edgeFinset.card - G.degree x
Deleting the incident set of the vertex x deletes exactly G.degree x edges from the edge
set of the simple graph G.
theorem SimpleGraph.edgeFinset_deleteIncidenceSet_eq_filter E1 #
∀ {V : Type u_1} [inst : Fintype V] [inst_1 : DecidableEq V] (G : SimpleGraph V) [inst_2 : DecidableRel G.Adj] (x : V),
(G.deleteIncidenceSet x).edgeFinset = {x_1 ∈ G.edgeFinset | x ∉ x_1}
Deleting the incident set of the vertex x is equivalent to filtering the edges of the simple
graph G that do not contain x.
theorem SimpleGraph.card_support_deleteIncidenceSet E1 #
∀ {V : Type u_1} [inst : Fintype V] [inst_1 : DecidableEq V] (G : SimpleGraph V) [inst_2 : DecidableRel G.Adj] {x : V},
x ∈ G.support → Fintype.card ↑(G.deleteIncidenceSet x).support ≤ Fintype.card ↑G.support - 1
The support of G.deleteIncidenceSet x is at most 1 less than the support of the simple
graph G.
def SimpleGraph.DeleteFar E1 #
{V : Type u_1} →
(G : SimpleGraph V) →
{𝕜 : Type u_2} → [Ring 𝕜] → [PartialOrder 𝕜] → [Fintype ↑G.edgeSet] → (SimpleGraph V → Prop) → 𝕜 → Prop
A graph is r-delete-far from a property p if we must delete at least r edges from it to
get a graph with the property p.
theorem SimpleGraph.deleteFar_iff E0 #
∀ {V : Type u_1} {G : SimpleGraph V} {𝕜 : Type u_2} [inst : Ring 𝕜] [inst_1 : PartialOrder 𝕜]
[inst_2 : Fintype ↑G.edgeSet] {p : SimpleGraph V → Prop} {r : 𝕜} [inst_3 : Fintype (Sym2 V)],
G.DeleteFar p r ↔
∀ ⦃H : SimpleGraph V⦄ [inst_4 : DecidableRel H.Adj], H ≤ G → p H → r ≤ ↑G.edgeFinset.card - ↑H.edgeFinset.card
theorem SimpleGraph.DeleteFar.le_card_sub_card E1 #
∀ {V : Type u_1} {G : SimpleGraph V} {𝕜 : Type u_2} [inst : Ring 𝕜] [inst_1 : PartialOrder 𝕜]
[inst_2 : Fintype ↑G.edgeSet] {p : SimpleGraph V → Prop} {r : 𝕜} [inst_3 : Fintype (Sym2 V)],
G.DeleteFar p r →
∀ ⦃H : SimpleGraph V⦄ [inst_4 : DecidableRel H.Adj], H ≤ G → p H → r ≤ ↑G.edgeFinset.card - ↑H.edgeFinset.card
Alias of the forward direction of SimpleGraph.deleteFar_iff.
theorem SimpleGraph.DeleteFar.mono E1 #
∀ {V : Type u_1} {G : SimpleGraph V} {𝕜 : Type u_2} [inst : Ring 𝕜] [inst_1 : PartialOrder 𝕜]
[inst_2 : Fintype ↑G.edgeSet] {p : SimpleGraph V → Prop} {r₁ r₂ : 𝕜}, G.DeleteFar p r₂ → r₁ ≤ r₂ → G.DeleteFar p r₁
theorem SimpleGraph.DeleteFar.le_card_edgeFinset E1 #
∀ {V : Type u_1} {G : SimpleGraph V} {𝕜 : Type u_2} [inst : Ring 𝕜] [inst_1 : PartialOrder 𝕜]
[inst_2 : Fintype ↑G.edgeSet] {p : SimpleGraph V → Prop} {r : 𝕜}, G.DeleteFar p r → p ⊥ → r ≤ ↑G.edgeFinset.card