Skip to content

Conversation

@henrykmichalewski
Copy link
Member

Summary

Prove that K3 (complete graph on 3 vertices) satisfies Conjecture 19.

Changes

  • K3_b: Proves b(K3) = 2 (largest induced bipartite subgraph size)
  • K3_ecc: Proves ecc(K3, {v}) = 1 for all vertices
  • K3_indepNeighbors: Proves 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.

Testing

  • All proofs compile successfully with lake build
  • No sorry placeholders remain in the file

henrykmichalewski and others added 2 commits January 6, 2026 17:58
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.
Copy link
Collaborator

@mo271 mo271 left a 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?

Comment on lines +28 to +84
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Collaborator

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...

Copy link
Member Author

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.

Comment on lines +18 to +19
import Mathlib.Combinatorics.SimpleGraph.Coloring
import Mathlib.Combinatorics.SimpleGraph.Bipartite
Copy link
Member

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

Suggested change
import Mathlib.Combinatorics.SimpleGraph.Coloring
import Mathlib.Combinatorics.SimpleGraph.Bipartite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants