@@ -10,7 +10,7 @@ public import Mathlib.Data.Set.Card
1010/-!
1111# Vertex Connectivity
1212
13- This file defines k-vertex- connectivity for simple graphs.
13+ This file defines k-vertex connectivity for simple graphs.
1414
1515## Main definitions
1616
@@ -36,7 +36,11 @@ lemma deleteVerts_empty : G.deleteVerts ∅ = G := by
3636 ext; simp [deleteVerts]
3737
3838@[simp]
39- lemma deleteVerts_subset_le (s : Set V) : G.deleteVerts s ≤ G :=
39+ lemma deleteVerts_bot (s : Set V) : (⊥ : SimpleGraph V).deleteVerts s = ⊥ := by
40+ ext; simp [deleteVerts]
41+
42+ @[simp]
43+ lemma deleteVerts_le (s : Set V) : G.deleteVerts s ≤ G :=
4044 fun _ _ h ↦ h.2 .2
4145
4246variable (G k u v) in
@@ -53,6 +57,9 @@ lemma IsVertexReachable.refl (u : V) : G.IsVertexReachable k u u :=
5357lemma IsVertexReachable.symm (h : G.IsVertexReachable k u v) : G.IsVertexReachable k v u :=
5458 fun _ hs hv hu ↦ (h hs hu hv).symm
5559
60+ lemma isVertexReachable_symm : G.IsVertexReachable k u v ↔ G.IsVertexReachable k v u :=
61+ ⟨.symm, .symm⟩
62+
5663@[gcongr]
5764lemma IsVertexReachable.mono (hGH : G ≤ H) (h : G.IsVertexReachable k u v) :
5865 H.IsVertexReachable k u v :=
@@ -78,18 +85,18 @@ lemma IsVertexReachable.reachable {hk : k ≠ 0} (h : G.IsVertexReachable k u v)
7885 rwa [deleteVerts_empty] at h
7986
8087variable (G k) in
81- /-- A graph is `k`-vertex-connected if its order is strictly greater than `k`
88+ /-- A graph is `k`-vertex-connected if it has more than `k` vertices
8289and any two distinct vertices are `k`-vertex-reachable. -/
8390def IsVertexConnected [Fintype V] (k : ℕ) : Prop :=
8491 k < Fintype.card V ∧ ∀ u v : V, u ≠ v → G.IsVertexReachable k u v
8592
8693@[simp]
87- protected lemma IsVertexConnected.zero [Fintype V] : G.IsVertexConnected 0 ↔ Nonempty V := by
94+ lemma isVertexConnected_zero [Fintype V] : G.IsVertexConnected 0 ↔ Nonempty V := by
8895 simp [IsVertexConnected, Fintype.card_pos_iff]
8996
9097/-- 1-vertex-connectivity is equivalent to being a connected graph with at least 2 vertices. -/
9198@[simp]
92- protected lemma IsVertexConnected.one [Fintype V] :
99+ protected lemma isVertexConnected_one [Fintype V] :
93100 G.IsVertexConnected 1 ↔ 1 < Fintype.card V ∧ G.Connected := by
94101 classical
95102 constructor
@@ -113,23 +120,22 @@ protected lemma IsVertexConnected.one [Fintype V] :
113120 rw [deleteVerts_empty]
114121 exact h_conn.preconnected u v
115122
116- /-- Vertex connectivity is monotonic in `k`. -/
123+ /-- Vertex connectivity is antitonic in `k`. -/
117124@[gcongr]
118125lemma IsVertexConnected.anti [Fintype V] {k l : ℕ} (hkl : l ≤ k) (hc : G.IsVertexConnected k) :
119126 G.IsVertexConnected l :=
120- ⟨lt_of_le_of_lt hkl hc.1 ,
121- fun u v huv ↦ IsVertexReachable.anti (Nat.cast_le.mpr hkl) (hc.2 u v huv)⟩
127+ ⟨hkl.trans_lt hc.1 , fun u v huv ↦ (hc.2 u v huv).anti (Nat.cast_le.mpr hkl)⟩
122128
123129/-- Vertex connectivity is monotonic in the graph. -/
124130@[gcongr]
125131lemma IsVertexConnected.mono [Fintype V] {k : ℕ} (hGH : G ≤ H) (hc : G.IsVertexConnected k) :
126132 H.IsVertexConnected k :=
127- ⟨hc.1 , fun u v huv ↦ IsVertexReachable.mono hGH (hc.2 u v huv)⟩
133+ ⟨hc.1 , fun u v huv ↦ (hc.2 u v huv).mono hGH ⟩
128134
129135/-- The complete graph on `n` vertices is `(n-1)`-vertex-connected. -/
130- lemma completeGraph_isVertexConnected [Fintype V] (h : 1 < Fintype.card V) :
136+ lemma isVertexConnected_completeGraph [Fintype V] [Nonempty V] :
131137 (⊤ : SimpleGraph V).IsVertexConnected (Fintype.card V - 1 ) :=
132- ⟨Nat.sub_lt (lt_trans Nat.zero_lt_one h) Nat.zero_lt_one,
138+ ⟨Nat.sub_lt Fintype.card_pos Nat.zero_lt_one,
133139 fun u v huv ↦ IsVertexReachable.of_adj (by simp [huv]) _⟩
134140
135141end SimpleGraph
0 commit comments