Skip to content

[Merged by Bors] - feat(Combinatorics/SimpleGraph/Clique): add results on cliqueFree graphs #24981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Mathlib/Combinatorics/SimpleGraph/Clique.lean
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,23 @@ protected theorem CliqueFree.sup_edge (h : G.CliqueFree n) (v w : α) :
fun _ hs ↦ (hs.erase_of_sup_edge_of_mem <|
(h.mono n.le_succ).mem_of_sup_edge_isNClique hs).not_cliqueFree h

lemma IsNClique.exists_not_adj_of_cliqueFree_succ (hc : G.IsNClique n s)
(h : G.CliqueFree (n + 1)) (x : α) : ∃ y, y ∈ s ∧ ¬ G.Adj x y := by
classical
by_contra! hf
exact (hc.insert hf).not_cliqueFree h

lemma exists_of_maximal_cliqueFree_not_adj [DecidableEq α]
(h : Maximal (fun H ↦ H.CliqueFree (n + 1)) G) {x y : α} (hne : x ≠ y) (hn : ¬ G.Adj x y) :
∃ s, x ∉ s ∧ y ∉ s ∧ G.IsNClique n (insert x s) ∧ G.IsNClique n (insert y s) := by
obtain ⟨t, hc⟩ := not_forall_not.1 <| h.not_prop_of_gt <| G.lt_sup_edge _ _ hne hn
use (t.erase x).erase y, erase_right_comm (a := x) ▸ (not_mem_erase _ _), not_mem_erase _ _
have h1 := h.1.mem_of_sup_edge_isNClique hc
have h2 := h.1.mem_of_sup_edge_isNClique (edge_comm .. ▸ hc)
rw [insert_erase <| mem_erase_of_ne_of_mem hne.symm h2, erase_right_comm,
insert_erase <| mem_erase_of_ne_of_mem hne h1]
exact ⟨(edge_comm .. ▸ hc).erase_of_sup_edge_of_mem h2, hc.erase_of_sup_edge_of_mem h1⟩

end CliqueFree

section CliqueFreeOn
Expand Down
Loading