@@ -1019,10 +1019,72 @@ theorem Adj.not_isIsolated_right (h : G.Adj u v) : ¬G.IsIsolated v :=
10191019 h.symm.not_isIsolated_left
10201020
10211021@[simp]
1022- theorem isIsolated_bot : IsIsolated ⊥ v :=
1022+ protected theorem IsIsolated.bot : IsIsolated ⊥ v :=
10231023 neighborSet_eq_empty _ |>.mp neighborSet_bot
10241024
1025+ @ [deprecated (since := "2026-06-19" )]
1026+ alias isIsolated_bot := IsIsolated.bot
1027+
10251028theorem eq_bot_iff_isIsolated : G = ⊥ ↔ ∀ v, G.IsIsolated v := by
10261029 simp [eq_bot_iff_forall_not_adj, ← neighborSet_eq_empty, Set.eq_empty_iff_forall_notMem]
10271030
1031+ section IsUniversal
1032+
1033+ variable {G}
1034+
1035+ /-- A vertex in a graph is universal if it's adjacent to every other vertex. -/
1036+ def IsUniversal (G : SimpleGraph V) (v : V) : Prop := ∀ ⦃w⦄, v ≠ w → G.Adj v w
1037+
1038+ @[simp] lemma insert_neighborSet_eq_univ :
1039+ insert v (G.neighborSet v) = Set.univ ↔ G.IsUniversal v := by
1040+ simp only [Set.ext_iff, Set.mem_insert_iff, mem_neighborSet, IsUniversal]
1041+ grind
1042+
1043+ @[simp] lemma neighborSet_eq_compl_singleton : G.neighborSet v = {v}ᶜ ↔ G.IsUniversal v := by
1044+ grind [insert_neighborSet_eq_univ, notMem_neighborSet_self]
1045+
1046+ protected alias ⟨IsUniversal.of_neighborSet_eq, IsUniversal.neighborSet_eq⟩ :=
1047+ neighborSet_eq_compl_singleton
1048+
1049+ @[simp]
1050+ theorem IsUniversal.of_subsingleton [Subsingleton V] : G.IsUniversal v :=
1051+ fun _ hne ↦ False.elim <| hne (Subsingleton.elim ..)
1052+
1053+ theorem IsUniversal.not_isIsolated [Nontrivial V] (h : G.IsUniversal v) (w : V) :
1054+ ¬G.IsIsolated w := by
1055+ by_cases h' : v = w
1056+ · obtain ⟨u, hu⟩ := exists_ne v
1057+ exact h' ▸ Adj.not_isIsolated_left (h hu.symm)
1058+ · exact Adj.not_isIsolated_right (h h')
1059+
1060+ theorem IsIsolated.not_isUniversal [Nontrivial V] (h : G.IsIsolated v) (w : V) :
1061+ ¬G.IsUniversal w := by
1062+ contrapose! h
1063+ exact h.not_isIsolated v
1064+
1065+ @[simp]
1066+ theorem isUniversal_compl_iff_isIsolated : Gᶜ.IsUniversal v ↔ G.IsIsolated v := by
1067+ refine ⟨fun h x hx ↦ ?_, fun h x hx ↦ ?_⟩
1068+ · simpa [hx] using h hx.ne
1069+ · simpa [hx] using h x
1070+
1071+ alias ⟨IsIsolated.of_isUniversal_compl, _⟩ := isUniversal_compl_iff_isIsolated
1072+
1073+ @[simp]
1074+ theorem isIsolated_compl_iff_isUniversal : Gᶜ.IsIsolated v ↔ G.IsUniversal v := by
1075+ refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
1076+ · simpa using isUniversal_compl_iff_isIsolated.mpr h
1077+ · exact isUniversal_compl_iff_isIsolated.mp (by simpa)
1078+
1079+ alias ⟨IsUniversal.of_isIsolated_compl, _⟩ := isIsolated_compl_iff_isUniversal
1080+
1081+ theorem eq_top_iff_forall_isUniversal : G = ⊤ ↔ ∀ v, G.IsUniversal v := by
1082+ simp [eq_top_iff_forall_ne_adj, IsUniversal]
1083+
1084+ @[simp]
1085+ protected theorem IsUniversal.top : IsUniversal ⊤ v :=
1086+ eq_top_iff_forall_isUniversal.mp rfl v
1087+
1088+ end IsUniversal
1089+
10281090end SimpleGraph
0 commit comments