-
Notifications
You must be signed in to change notification settings - Fork 195
feat: Add K3 verification for Conjecture 19 #1511
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
base: main
Are you sure you want to change the base?
feat: Add K3 verification for Conjecture 19 #1511
Conversation
Prove that K3 (complete graph on 3 vertices) satisfies Conjecture 19:
- K3_b: b(K3) = 2 (largest induced bipartite subgraph size)
- K3_ecc: ecc(K3, {v}) = 1 for all vertices
- K3_indepNeighbors: indepNeighbors(K3, v) = 1 for all vertices
- K3_not_counterexample: Main theorem showing K3 satisfies the conjecture
Includes helper lemma indepNum_completeGraph proving the independence
number of a complete graph is 1.
mo271
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
Just to check: is this a legit counter example to Conjecture 19 on
https://web.archive.org/web/20250908021324/http://cms.dt.uh.edu/faculty/delavinae/research/wowII/
or are there implicit, i.e. not captured by our formalisation, assumptions that exclude this (very small!) counterexample?
| rw [SimpleGraph.b, SimpleGraph.largestInducedBipartiteSubgraphSize] | ||
| norm_cast | ||
| apply le_antisymm | ||
| · -- b K3 <= 2 | ||
| apply csSup_le | ||
| · use 0 | ||
| use ∅ | ||
| simp | ||
| dsimp [SimpleGraph.IsBipartite] | ||
| apply SimpleGraph.colorable_of_isEmpty | ||
| · rintro n ⟨s, hs⟩ | ||
| by_contra h_gt | ||
| simp at h_gt | ||
| have h_card : s.card = 3 := by | ||
| have : s.card ≤ 3 := Finset.card_le_univ s | ||
| linarith | ||
| have h_univ : s = Finset.univ := Finset.eq_univ_of_card s h_card | ||
| rw [h_univ] at hs | ||
| have h_bip : K3.IsBipartite := by | ||
| have h_iso : K3.induce (Set.univ : Set (Fin 3)) ≃g K3 := SimpleGraph.induceUnivIso K3 | ||
| rw [← Finset.coe_univ] at h_iso | ||
| exact hs.1.of_embedding h_iso.symm.toEmbedding | ||
| have h_not_bip : ¬ K3.IsBipartite := by | ||
| dsimp [SimpleGraph.IsBipartite] | ||
| rw [← SimpleGraph.chromaticNumber_le_iff_colorable] | ||
| simp [K3, completeGraph, SimpleGraph.chromaticNumber_top] | ||
| norm_num | ||
| contradiction | ||
| · -- b K3 >= 2 | ||
| apply le_csSup | ||
| · use 3 | ||
| rintro n ⟨s, hs⟩ | ||
| rw [← hs.2] | ||
| exact Finset.card_le_univ s | ||
| · use {0, 1} | ||
| constructor | ||
| · -- K3.induce {0, 1} is bipartite (it's K2) | ||
| dsimp [SimpleGraph.IsBipartite] | ||
| fconstructor | ||
| refine SimpleGraph.Coloring.mk (fun x => if (x : Fin 3) = 0 then 0 else 1) ?_ | ||
| intro u v huv | ||
| have huv_ne : u ≠ v := SimpleGraph.Adj.ne huv | ||
| have u_mem : (u : Fin 3) ∈ ({0, 1} : Finset (Fin 3)) := u.property | ||
| have v_mem : (v : Fin 3) ∈ ({0, 1} : Finset (Fin 3)) := v.property | ||
| simp only [Finset.mem_insert, Finset.mem_singleton] at u_mem v_mem | ||
| rcases u_mem with u_eq_0 | u_eq_1 <;> rcases v_mem with v_eq_0 | v_eq_1 | ||
| · -- u = 0, v = 0 | ||
| exfalso; apply huv_ne; ext; simp only [u_eq_0, v_eq_0] | ||
| · -- u = 0, v = 1 | ||
| simp only [u_eq_0, v_eq_1, ↓reduceIte] | ||
| exact zero_ne_one | ||
| · -- u = 1, v = 0 | ||
| simp only [u_eq_1, v_eq_0, ↓reduceIte, one_ne_zero] | ||
| exact zero_ne_one.symm | ||
| · -- u = 1, v = 1 | ||
| exfalso; apply huv_ne; ext; simp only [u_eq_1, v_eq_1] | ||
| · simp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| rw [SimpleGraph.b, SimpleGraph.largestInducedBipartiteSubgraphSize] | |
| norm_cast | |
| apply le_antisymm | |
| · -- b K3 <= 2 | |
| apply csSup_le | |
| · use 0 | |
| use ∅ | |
| simp | |
| dsimp [SimpleGraph.IsBipartite] | |
| apply SimpleGraph.colorable_of_isEmpty | |
| · rintro n ⟨s, hs⟩ | |
| by_contra h_gt | |
| simp at h_gt | |
| have h_card : s.card = 3 := by | |
| have : s.card ≤ 3 := Finset.card_le_univ s | |
| linarith | |
| have h_univ : s = Finset.univ := Finset.eq_univ_of_card s h_card | |
| rw [h_univ] at hs | |
| have h_bip : K3.IsBipartite := by | |
| have h_iso : K3.induce (Set.univ : Set (Fin 3)) ≃g K3 := SimpleGraph.induceUnivIso K3 | |
| rw [← Finset.coe_univ] at h_iso | |
| exact hs.1.of_embedding h_iso.symm.toEmbedding | |
| have h_not_bip : ¬ K3.IsBipartite := by | |
| dsimp [SimpleGraph.IsBipartite] | |
| rw [← SimpleGraph.chromaticNumber_le_iff_colorable] | |
| simp [K3, completeGraph, SimpleGraph.chromaticNumber_top] | |
| norm_num | |
| contradiction | |
| · -- b K3 >= 2 | |
| apply le_csSup | |
| · use 3 | |
| rintro n ⟨s, hs⟩ | |
| rw [← hs.2] | |
| exact Finset.card_le_univ s | |
| · use {0, 1} | |
| constructor | |
| · -- K3.induce {0, 1} is bipartite (it's K2) | |
| dsimp [SimpleGraph.IsBipartite] | |
| fconstructor | |
| refine SimpleGraph.Coloring.mk (fun x => if (x : Fin 3) = 0 then 0 else 1) ?_ | |
| intro u v huv | |
| have huv_ne : u ≠ v := SimpleGraph.Adj.ne huv | |
| have u_mem : (u : Fin 3) ∈ ({0, 1} : Finset (Fin 3)) := u.property | |
| have v_mem : (v : Fin 3) ∈ ({0, 1} : Finset (Fin 3)) := v.property | |
| simp only [Finset.mem_insert, Finset.mem_singleton] at u_mem v_mem | |
| rcases u_mem with u_eq_0 | u_eq_1 <;> rcases v_mem with v_eq_0 | v_eq_1 | |
| · -- u = 0, v = 0 | |
| exfalso; apply huv_ne; ext; simp only [u_eq_0, v_eq_0] | |
| · -- u = 0, v = 1 | |
| simp only [u_eq_0, v_eq_1, ↓reduceIte] | |
| exact zero_ne_one | |
| · -- u = 1, v = 0 | |
| simp only [u_eq_1, v_eq_0, ↓reduceIte, one_ne_zero] | |
| exact zero_ne_one.symm | |
| · -- u = 1, v = 1 | |
| exfalso; apply huv_ne; ext; simp only [u_eq_1, v_eq_1] | |
| · simp | |
| simp only [GraphConjecture19.K3, b] | |
| norm_cast | |
| refine IsGreatest.csSup_eq ?_ | |
| constructor | |
| · simp [SimpleGraph.IsBipartite] | |
| use {0,1} | |
| constructor | |
| · use fun i => ite (i.1 = 0) 0 1 | |
| simp | |
| decide | |
| · decide | |
| · simp only [upperBounds, Finset.coe_sort_coe, completeGraph_eq_top, Set.mem_setOf_eq, forall_exists_index, | |
| and_imp, forall_apply_eq_imp_iff₂] | |
| intro a ha | |
| cases ha | |
| cases ‹_› | |
| decide+revert |
I think this could even be simplified further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to put this directly in the file
FormalConjectures/WrittenOnTheWallII/GraphConjecture19.lean,
Perhaps using the answer(False) \iff mechanism: this way we avoid copying the statement.
And let's optimize the proofs a bit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, this is not a counterexample. Millions of graphs have already been computationally tested against this conjecture (which was generated by an automated system, see e.g. https://www.sciencedirect.com/science/article/pii/S0004370215001575 for more details) without contradiction. The goal of this test is simply to establish a very basic baseline that we can expand to include more graphs later.
| import Mathlib.Combinatorics.SimpleGraph.Coloring | ||
| import Mathlib.Combinatorics.SimpleGraph.Bipartite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should work
| import Mathlib.Combinatorics.SimpleGraph.Coloring | |
| import Mathlib.Combinatorics.SimpleGraph.Bipartite |
Summary
Prove that K3 (complete graph on 3 vertices) satisfies Conjecture 19.
Changes
b(K3) = 2(largest induced bipartite subgraph size)ecc(K3, {v}) = 1for all verticesindepNeighbors(K3, v) = 1for all verticesIncludes helper lemma
indepNum_completeGraphproving the independence number of a complete graph is 1.Testing
lake buildsorryplaceholders remain in the file