File tree Expand file tree Collapse file tree
Mathlib/Combinatorics/SimpleGraph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,27 @@ lemma eq_top_iff_forall_eccent_eq_one [Nontrivial α] :
9797 rw [Order.one_le_iff_pos, pos_iff_ne_zero, edist_eq_zero_iff.ne]
9898 exact huv.ne
9999
100+ lemma eccent_le_iff (u : α) (k : ℕ∞) : G.eccent u ≤ k ↔ ∀ v, G.edist u v ≤ k :=
101+ iSup_le_iff
102+
103+ lemma eccent_le_one_iff (u : α) : G.eccent u ≤ 1 ↔ ∀ v, u ≠ v → G.Adj u v := by
104+ constructor
105+ · intro h v huv
106+ have hd : G.edist u v ≤ 1 := LE.le.trans edist_le_eccent h
107+ have hd' : 1 ≤ G.edist u v := Order.one_le_iff_pos.mpr (G.edist_pos_of_ne huv)
108+ exact edist_eq_one_iff_adj.mp (le_antisymm (hd') hd).symm
109+ · intro hall
110+ rw [eccent_le_iff]
111+ intro v
112+ rw [edist_le_one_iff_adj_or_eq]
113+ exact or_iff_not_imp_right.mpr (hall v)
114+
115+ lemma eccent_eq_one_iff [Nontrivial α] (u : α) :
116+ G.eccent u = 1 ↔ ∀ v, u ≠ v → G.Adj u v := by
117+ have h : 1 ≤ G.eccent u := ENat.one_le_iff_ne_zero.mpr (eccent_ne_zero u)
118+ rw [← LE.le.ge_iff_eq' h]
119+ exact eccent_le_one_iff u
120+
100121end eccent
101122
102123section ediam
Original file line number Diff line number Diff line change @@ -134,6 +134,14 @@ theorem edist_eq_one_iff_adj : G.edist u v = 1 ↔ G.Adj u v := by
134134 exact w.adj_of_length_eq_one <| Nat.cast_eq_one.mp <| h ▸ hw
135135 · exact le_antisymm (edist_le h.toWalk) (Order.one_le_iff_pos.mpr <| edist_pos_of_ne h.ne)
136136
137+ lemma edist_le_one_iff_adj_or_eq : G.edist u v ≤ 1 ↔ G.Adj u v ∨ u = v := by
138+ by_cases huv : u = v
139+ · simp [huv]
140+ · simp only [huv, or_false]
141+ have h : 0 < G.edist u v := edist_pos_of_ne huv
142+ rw [LE.le.ge_iff_eq' (Order.one_le_iff_pos.mpr h)]
143+ exact edist_eq_one_iff_adj
144+
137145lemma edist_bot_of_ne (h : u ≠ v) : (⊥ : SimpleGraph V).edist u v = ⊤ := by
138146 rwa [ne_eq, ← reachable_bot.not, ← edist_ne_top_iff_reachable.not, not_not] at h
139147
You can’t perform that action at this time.
0 commit comments