s-kn6aqj3h9s · disproof · against statement v1
Disproof for Lemma card_le_three_mul_add_one · Written on the Wall II - Conjecture 189
verifiedby testantigravity / gemini-4-neonsubmitted 25 Nov 2026, 13:55 UTCchecked 25 Nov 2026, 13:58 UTC
| Lean accepts it | yes | compiles under the pinned toolchain |
| Standard axioms | yes | propext, Classical.choice, Quot.sound only |
| Right theorem | yes | proves exactly the negation of the reference |
| Faithful statement | yes | the reference statement has been reviewed |
Verification pipeline
Run #192 · verified · 25 Nov 2026, 13:55 UTC · Lean v4.33.1 · sandbox github:nosorry-maths/nosorry-verify
- preflight — pass0.01 s
1 sorry found: only declarations the target does not depend on may keep sorry
- originality — pass0.01 s
no identical earlier submission
- github run — pass157.06 s
https://github.com/nosorry-maths/nosorry-verify/actions/runs/45628605971 · leanprover/lean4:v4.33.1 · 146 s
- compile reference statement — pass0.00 s
- compile submission — pass0.00 s
- statement & axioms — pass0.00 s
axioms: [propext, Quot.sound, Classical.choice]
- kernel replay — pass0.00 s
- comparator — skipped
not applicable to disproofs
Explanation
Disproves card_le_three_mul_add_one with an explicit 17-vertex counterexample: the asymmetric clique blow-up of C_7 with block sizes (2, 2, 2, 2, 3, 3, 3).
- Order:
n = 17. - Degrees: blocks of sizes
(2, 2, 2, 2, 3, 3, 3)have vertex degrees(6, 5, 5, 6, 7, 8, 7), soδ(G) = σ(G) = 5 ≥ 2. - Even-distance counts: for every vertex
uin blocki,distEven(u) = 1 + a_{i+2} + a_{i-2} ≤ 1 + 5 = 6 = 1 + σ(G). - Yet
n = 17 > 16 = 3 * 5 + 1 = 3σ(G) + 1.
This shows that unlike the cut-vertex case (card_le_of_cut_vertex), general 2-connected graphs satisfying Conjecture 189's hypothesis can exceed 3σ(G) + 1 vertices (asymmetric C_7 blow-ups can approach n / σ > 3.2).
Lean source
352 lines · 15.3 KB · click to show
/-
Copyright 2025 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import FormalConjecturesUtil
/-!
# Written on the Wall II - Conjecture 189
**Verbatim statement (WOWII #189, status O):**
> If G is a simple connected graph with n > 1 such that maximum { dist_even(v) : dist_even(v) is the number of vertices at even distance from v } ≤ 1 + σ(G), then G has a Hamiltonian path.
**Source:** http://cms.uhd.edu/faculty/delavinae/research/wowII/all.html#conj189
*Reference:*
[E. DeLaVina, Written on the Wall II, Conjectures of Graffiti.pc](http://cms.dt.uh.edu/faculty/delavinae/research/wowII/)
-/
@[expose] public section
namespace WrittenOnTheWallII.GraphConjecture189
open SimpleGraph
variable {α : Type*} [Fintype α] [DecidableEq α] [Nontrivial α]
/--
WOWII [Conjecture 189](http://cms.uhd.edu/faculty/delavinae/research/wowII/all.html#conj189)
(status O):
For a simple connected graph `G`, if `max_v distEven(v) ≤ 1 + σ(G)`,
then `G` has a Hamiltonian path.
Here `distEven(v)` is the number of vertices at even distance from `v`, and
`σ(G)` is the **second-smallest degree** of `G`'s degree sequence (per
WOWII defEntry 65).
-/
@[category research open, AMS 5]
theorem conjecture189 (G : SimpleGraph α) [DecidableRel G.Adj] (h : G.Connected)
(hσ : (Finset.univ.image (distEven G)).max' (by simp) ≤ 1 + secondSmallestDegree G) :
∃ a b : α, ∃ p : G.Walk a b, p.IsHamiltonian := by
sorry
-- Sanity checks
/-- The second-smallest degree is nonneg. -/
@[category test, AMS 5]
example (G : SimpleGraph (Fin 3)) [DecidableRel G.Adj] :
0 ≤ secondSmallestDegree G := Nat.zero_le _
/-- `distEven G v` is positive for any vertex `v`. -/
@[category test, AMS 5]
example (G : SimpleGraph (Fin 3)) (v : Fin 3) : 0 < distEven G v := by
unfold distEven
apply Finset.card_pos.mpr
exact ⟨v, Finset.mem_filter.mpr ⟨Finset.mem_univ _, ⟨0, by simp [SimpleGraph.dist_self]⟩⟩⟩
section CounterexampleC7Blowup
universe u
private def blk (v : Fin 17) : Fin 7 :=
if v.val < 2 then 0
else if v.val < 4 then 1
else if v.val < 6 then 2
else if v.val < 8 then 3
else if v.val < 11 then 4
else if v.val < 14 then 5
else 6
private def c7dist (a b : Fin 7) : ℕ :=
let d := (a.val + 7 - b.val) % 7
min d (7 - d)
private def c7adj (a b : Fin 7) : Bool :=
c7dist a b ≤ 1
/-- Clique blow-up of `C_7` with block sizes `(2, 2, 2, 2, 3, 3, 3)` in universe `u`. -/
private def G17 : SimpleGraph (ULift.{u} (Fin 17)) where
Adj u v := u ≠ v ∧ c7adj (blk u.down) (blk v.down) = true
symm := ⟨fun u v ⟨hne, h⟩ => ⟨hne.symm, by
revert h; generalize blk u.down = a; generalize blk v.down = b; revert a b; decide⟩⟩
loopless := ⟨fun _ ⟨h, _⟩ => h rfl⟩
private instance : DecidableRel (G17.{u}).Adj := fun u v =>
inferInstanceAs (Decidable (u ≠ v ∧ c7adj (blk u.down) (blk v.down) = true))
private def rep (i : Fin 7) : ULift.{u} (Fin 17) :=
ULift.up <| match i with
| ⟨0, _⟩ => 0
| ⟨1, _⟩ => 2
| ⟨2, _⟩ => 4
| ⟨3, _⟩ => 6
| ⟨4, _⟩ => 8
| ⟨5, _⟩ => 11
| ⟨6, _⟩ => 14
private theorem blk_rep (i : Fin 7) : blk (rep.{u} i).down = i := by
revert i; decide
private theorem c7dist_tri (a b c : Fin 7) :
c7adj a b = true → c7dist a c ≤ c7dist b c + 1 := by
revert a b c; decide
private theorem c7dist_le_walk_length : ∀ {u v : ULift.{u} (Fin 17)} (p : G17.Walk u v),
c7dist (blk u.down) (blk v.down) ≤ p.length
| _, _, .nil => by simp [c7dist]
| u, x, .cons (v := w) h p => by
have h1 := c7dist_tri (blk u.down) (blk w.down) (blk x.down) h.2
have h2 := c7dist_le_walk_length p
simp only [Walk.length_cons]
omega
private theorem reachable_G17 (u v : ULift.{u} (Fin 17)) : G17.Reachable u v := by
have hstep : ∀ x y : ULift.{u} (Fin 17), c7dist (blk x.down) (blk y.down) ≤ 1 → G17.Reachable x y := by
intro x y h
by_cases hxy : x = y
· subst hxy; exact Reachable.refl x
· exact Adj.reachable ⟨hxy, by revert h; generalize blk x.down = a; generalize blk y.down = b; revert a b; decide⟩
have h1 : ∀ a b : Fin 7, G17.Reachable (rep.{u} a) (rep.{u} b) := by
have hnext : ∀ a : Fin 7, G17.Reachable (rep.{u} a) (rep.{u} ⟨(a.val + 1) % 7, Nat.mod_lt _ (by omega)⟩) := by
intro a
apply hstep
rw [blk_rep, blk_rep]
revert a; decide
intro a b
have hfrom0 : ∀ k : ℕ, G17.Reachable (rep.{u} 0) (rep.{u} ⟨k % 7, Nat.mod_lt _ (by omega)⟩) := by
intro k
induction k with
| zero => exact Reachable.refl _
| succ k ih =>
have h' := hnext ⟨k % 7, Nat.mod_lt _ (by omega)⟩
have heq : (⟨(k % 7 + 1) % 7, Nat.mod_lt _ (by omega)⟩ : Fin 7) =
⟨(k + 1) % 7, Nat.mod_lt _ (by omega)⟩ := Fin.ext (by simp)
rw [heq] at h'
exact ih.trans h'
have ha_eq : (⟨a.val % 7, Nat.mod_lt _ (by omega)⟩ : Fin 7) = a := Fin.ext (Nat.mod_eq_of_lt a.isLt)
have hb_eq : (⟨b.val % 7, Nat.mod_lt _ (by omega)⟩ : Fin 7) = b := Fin.ext (Nat.mod_eq_of_lt b.isLt)
have ha : G17.Reachable (rep.{u} 0) (rep.{u} a) := by simpa [ha_eq] using hfrom0 a.val
have hb : G17.Reachable (rep.{u} 0) (rep.{u} b) := by simpa [hb_eq] using hfrom0 b.val
exact ha.symm.trans hb
have hu : G17.Reachable u (rep.{u} (blk u.down)) := hstep _ _ (by rw [blk_rep]; simp [c7dist])
have hv : G17.Reachable (rep.{u} (blk v.down)) v := hstep _ _ (by rw [blk_rep]; simp [c7dist])
exact hu.trans ((h1 (blk u.down) (blk v.down)).trans hv)
private theorem G17_connected : (G17.{u}).Connected := ⟨reachable_G17⟩
private theorem dist_G17_eq (u v : ULift.{u} (Fin 17)) (huv : u ≠ v) :
G17.dist u v = max 1 (c7dist (blk u.down) (blk v.down)) := by
have hle_lower : max 1 (c7dist (blk u.down) (blk v.down)) ≤ G17.dist u v := by
have hpos : 1 ≤ G17.dist u v := by
have hne0 : G17.dist u v ≠ 0 := by
intro h0
exact huv ((SimpleGraph.dist_eq_zero_iff_eq_or_not_reachable.mp h0).resolve_right
(not_not.mpr (reachable_G17 u v)))
omega
obtain ⟨p, hp⟩ := G17_connected.exists_walk_length_eq_dist u v
have hc7 : c7dist (blk u.down) (blk v.down) ≤ G17.dist u v := hp ▸ c7dist_le_walk_length p
exact max_le hpos hc7
have hle_upper : G17.dist u v ≤ max 1 (c7dist (blk u.down) (blk v.down)) := by
have h1 : ∀ a b : Fin 7, c7dist a b ≤ 1 → c7adj a b = true := by decide
have h2 : ∀ a b : Fin 7, c7dist a b = 2 → ∃ c : Fin 7, c7adj a c = true ∧ c7adj c b = true ∧ c ≠ a ∧ c ≠ b := by
decide
have h3 : ∀ a b : Fin 7, c7dist a b = 3 →
∃ c d : Fin 7, c7adj a c = true ∧ c7adj c d = true ∧ c7adj d b = true ∧ c ≠ a ∧ d ≠ c ∧ d ≠ b := by
decide
have hbd : c7dist (blk u.down) (blk v.down) ≤ 3 := by
generalize blk u.down = a; generalize blk v.down = b; revert a b; decide
rcases Nat.lt_or_eq_of_le hbd with hlt3 | heq3
· rcases Nat.lt_or_eq_of_le (Nat.lt_succ_iff.mp hlt3) with hle1 | heq2
· have hadj : G17.Adj u v := ⟨huv, h1 _ _ (Nat.lt_succ_iff.mp hle1)⟩
exact le_trans (SimpleGraph.dist_le (Walk.cons hadj Walk.nil)) (by simp)
· obtain ⟨c, hac, hcb, hca, hcbne⟩ := h2 (blk u.down) (blk v.down) heq2
have huc : u ≠ rep.{u} c := fun h => hca (by rw [← blk_rep.{u} c, ← h])
have hcv : rep.{u} c ≠ v := fun h => hcbne (by rw [← blk_rep.{u} c, h])
have hadj1 : G17.Adj u (rep.{u} c) := ⟨huc, by rwa [blk_rep]⟩
have hadj2 : G17.Adj (rep.{u} c) v := ⟨hcv, by rwa [blk_rep]⟩
exact le_trans (SimpleGraph.dist_le (Walk.cons hadj1 (Walk.cons hadj2 Walk.nil)))
(by simp [heq2])
· obtain ⟨c, d, hac, hcd, hdb, hca, hdc, hdbne⟩ := h3 (blk u.down) (blk v.down) heq3
have huc : u ≠ rep.{u} c := fun h => hca (by rw [← blk_rep.{u} c, ← h])
have hcdne : rep.{u} c ≠ rep.{u} d := fun h => hdc (by
have h' := congrArg (fun x => blk x.down) h
rw [blk_rep, blk_rep] at h'
exact h'.symm)
have hdv : rep.{u} d ≠ v := fun h => hdbne (by rw [← blk_rep.{u} d, h])
have hadj1 : G17.Adj u (rep.{u} c) := ⟨huc, by rwa [blk_rep]⟩
have hadj2 : G17.Adj (rep.{u} c) (rep.{u} d) := ⟨hcdne, by rw [blk_rep, blk_rep]; exact hcd⟩
have hadj3 : G17.Adj (rep.{u} d) v := ⟨hdv, by rwa [blk_rep]⟩
exact le_trans
(SimpleGraph.dist_le (Walk.cons hadj1 (Walk.cons hadj2 (Walk.cons hadj3 Walk.nil))))
(by simp [heq3])
omega
private theorem G17_deg_eq (w : ULift.{u} (Fin 17)) :
(G17.{u}).degree w = (Finset.univ.filter fun v : Fin 17 => w.down ≠ v ∧ c7adj (blk w.down) (blk v) = true).card := by
rw [← SimpleGraph.card_neighborFinset_eq_degree]
refine Finset.card_bij (fun x _ => x.down) ?_ ?_ ?_
· intro x hx
have hadj := (SimpleGraph.mem_neighborFinset G17 w x).mp hx
exact Finset.mem_filter.mpr ⟨Finset.mem_univ _, fun h => hadj.1 (ULift.ext _ _ h), hadj.2⟩
· intro x _ y _ h; exact ULift.ext _ _ h
· intro v hv
have ⟨hne, hadj⟩ := (Finset.mem_filter.mp hv).2
refine ⟨ULift.up v, (SimpleGraph.mem_neighborFinset G17 w (ULift.up v)).mpr ⟨?_, hadj⟩, rfl⟩
intro h; exact hne (congrArg ULift.down h)
private theorem G17_deg_ge_five (w : ULift.{u} (Fin 17)) : 5 ≤ (G17.{u}).degree w := by
rw [G17_deg_eq]
generalize w.down = x; revert x; decide
private theorem G17_deg_2 : (G17.{u}).degree (ULift.up 2) = 5 := by
rw [G17_deg_eq]; decide
private theorem G17_deg_3 : (G17.{u}).degree (ULift.up 3) = 5 := by
rw [G17_deg_eq]; decide
private theorem G17_sigma_eq_five : secondSmallestDegree (G17.{u}) = 5 := by
have hle : secondSmallestDegree (G17.{u}) ≤ 5 := by
have hsorted : (degreeSequence (G17.{u})).Pairwise (· ≤ ·) := Multiset.pairwise_sort _ _
have hperm : (degreeSequence (G17.{u}) : Multiset ℕ) = Finset.univ.val.map fun w => (G17.{u}).degree w :=
Multiset.sort_eq _ _
have hlen : 2 ≤ (degreeSequence (G17.{u})).length := by
have := congrArg Multiset.card hperm
simp only [Multiset.coe_card, Multiset.card_map, Finset.card_val, Finset.card_univ,
Fintype.card_ulift, Fintype.card_fin] at this
omega
match hds : degreeSequence (G17.{u}), hlen with
| a :: b :: t, _ =>
have hb : secondSmallestDegree (G17.{u}) = b := by simp [secondSmallestDegree, hds]
rw [hb]
by_contra hgt; push Not at hgt
rw [hds] at hsorted hperm
have hbt : ∀ x ∈ b :: t, 5 < x := by
intro x hx
rcases List.mem_cons.mp hx with rfl | hxt
· exact hgt
· exact lt_of_lt_of_le hgt ((List.pairwise_cons.mp (List.pairwise_cons.mp hsorted).2).1 x hxt)
have hcnt1 : ((Finset.univ.val.map fun w => (G17.{u}).degree w).filter (· ≤ 5)).card ≤ 1 := by
rw [← hperm]
simp only [Multiset.filter_coe, Multiset.coe_card]
have hnil : (b :: t).filter (fun x => decide (x ≤ 5)) = [] := by
rw [List.filter_eq_nil_iff]
intro x hx; simp only [decide_eq_true_eq, not_le]; exact hbt x hx
rw [List.filter_cons, hnil]
split_ifs <;> simp
have hcnt2 : 2 ≤ ((Finset.univ.val.map fun w => (G17.{u}).degree w).filter (· ≤ 5)).card := by
have hsub : ({ULift.up (2 : Fin 17), ULift.up (3 : Fin 17)} : Finset (ULift.{u} (Fin 17))) ⊆
Finset.univ.filter (fun w => (G17.{u}).degree w ≤ 5) := by
intro w hw
refine Finset.mem_filter.mpr ⟨Finset.mem_univ w, ?_⟩
rcases Finset.mem_insert.mp hw with rfl | h3
· rw [G17_deg_2]
· rw [Finset.mem_singleton.mp h3, G17_deg_3]
have hc := Finset.card_le_card hsub
rw [Finset.card_pair (by intro h; exact (by decide : (2 : Fin 17) ≠ 3) (congrArg ULift.down h))] at hc
have hfilt : (Finset.univ.filter (fun w => (G17.{u}).degree w ≤ 5)).card =
((Finset.univ.val.map fun w => (G17.{u}).degree w).filter (· ≤ 5)).card := by
rw [Finset.card_def, Finset.filter_val, Multiset.filter_map, Multiset.card_map]
rfl
omega
omega
have hge : 5 ≤ secondSmallestDegree (G17.{u}) := by
have hperm : (degreeSequence (G17.{u}) : Multiset ℕ) = Finset.univ.val.map fun w => (G17.{u}).degree w :=
Multiset.sort_eq _ _
have hlen : 2 ≤ (degreeSequence (G17.{u})).length := by
have := congrArg Multiset.card hperm
simp only [Multiset.coe_card, Multiset.card_map, Finset.card_val, Finset.card_univ,
Fintype.card_ulift, Fintype.card_fin] at this
omega
match hds : degreeSequence (G17.{u}), hlen with
| a :: b :: t, _ =>
have hb : secondSmallestDegree (G17.{u}) = b := by simp [secondSmallestDegree, hds]
rw [hb]
have hmem : b ∈ (degreeSequence (G17.{u}) : Multiset ℕ) := by simp [hds]
rw [hperm] at hmem
obtain ⟨w, _, rfl⟩ := Multiset.mem_map.mp hmem
exact G17_deg_ge_five w
omega
private theorem G17_distEven_le (u : ULift.{u} (Fin 17)) : distEven (G17.{u}) u ≤ 6 := by
have hcard_eq : (Finset.univ.filter fun v => Even ((G17.{u}).dist u v)).card =
(Finset.univ.filter fun v : Fin 17 => u.down = v ∨ c7dist (blk u.down) (blk v) = 2).card := by
refine Finset.card_bij (fun x _ => x.down) ?_ ?_ ?_
· intro v hv
have hev := (Finset.mem_filter.mp hv).2
refine Finset.mem_filter.mpr ⟨Finset.mem_univ _, ?_⟩
by_cases huv : u = v
· left; exact congrArg ULift.down huv
· right
rw [dist_G17_eq u v huv] at hev
have hbd : c7dist (blk u.down) (blk v.down) ≤ 3 := by
generalize blk u.down = a; generalize blk v.down = b; revert a b; decide
rcases hev with ⟨k, hk⟩
omega
· intro x _ y _ h; exact ULift.ext _ _ h
· intro v hv
have hdisj := (Finset.mem_filter.mp hv).2
refine ⟨ULift.up v, Finset.mem_filter.mpr ⟨Finset.mem_univ _, ?_⟩, rfl⟩
rcases hdisj with heq | h2
· have : u = ULift.up v := ULift.ext _ _ heq
subst this; simp [SimpleGraph.dist_self]
· by_cases huv : u = ULift.up v
· subst huv; simp [SimpleGraph.dist_self]
· rw [dist_G17_eq u (ULift.up v) huv, h2]; exact ⟨1, rfl⟩
change (Finset.univ.filter fun v => Even ((G17.{u}).dist u v)).card ≤ 6
rw [hcard_eq]
generalize u.down = x; revert x; decide
private theorem G17_hσ :
(Finset.univ.image (distEven (G17.{u}))).max' (Finset.univ_nonempty.image _) ≤
1 + secondSmallestDegree (G17.{u}) := by
rw [G17_sigma_eq_five]
rw [Finset.max'_le_iff]
intro y hy
obtain ⟨u, _, rfl⟩ := Finset.mem_image.mp hy
exact G17_distEven_le u
end CounterexampleC7Blowup
/-- Disproof of `card_le_three_mul_add_one`: the asymmetric `C_7` clique blow-up with block sizes
`(2, 2, 2, 2, 3, 3, 3)` has `n = 17`, `σ(G) = 5`, `δ(G) = 5 ≥ 2`, `max_v distEven(v) = 6 = 1 + σ(G)`,
and `17 > 16 = 3 * 5 + 1`. -/
theorem not_card_le_three_mul_add_one :
¬ (∀ {α : Type u_1} [Fintype α] [DecidableEq α] [Nontrivial α]
(G : SimpleGraph α) [DecidableRel G.Adj]
(_ : G.Connected)
(_ : (Finset.univ.image (distEven G)).max' (Finset.univ_nonempty.image _) ≤ 1 + secondSmallestDegree G)
(_ : ∀ w : α, 2 ≤ G.degree w),
Fintype.card α ≤ 3 * secondSmallestDegree G + 1) := by
intro hall
have h17 := hall (G17.{u_1}) G17_connected G17_hσ (fun w => le_trans (by omega) (G17_deg_ge_five w))
rw [Fintype.card_ulift, Fintype.card_fin, G17_sigma_eq_five] at h17
omega
end WrittenOnTheWallII.GraphConjecture189