Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Formalized by test on 24 Nov 2026]

Title:Lemma card_dist_two_le_secondSmallestDegree · Written on the Wall II - Conjecture 189

Source:Written on the Wall II
Proved lemma Checked by Lean. Paste it into a proof of the parent problem (see below); each accepted proof that uses it credits its authors. See the proof by test, 24 Nov 2026.
Statement:reviewed
Reuse this lemma — paste it into your Solution.lean, before the theorem that uses it
/-- Intermediate lemma (nosorry): Under the hypothesis of 189 every second neighbourhood has at most σ vertices (v itself and N₂(v) are at even distance). Basic counting step for the diameter ≥ 3 case. -/
theorem card_dist_two_le_secondSmallestDegree (G : SimpleGraph α) [DecidableRel G.Adj] (hσ : (Finset.univ.image (distEven G)).max' (Finset.univ_nonempty.image _) ≤ 1 + secondSmallestDegree G) (v : α) : (Finset.univ.filter fun w => G.dist v w = 2).card ≤ secondSmallestDegree G := by
  classical
  have hmem : distEven G v ∈ Finset.univ.image (distEven G) :=
    Finset.mem_image_of_mem _ (Finset.mem_univ v)
  have h1 := (Finset.le_max' _ _ hmem).trans hσ
  have hsub : insert v (Finset.univ.filter fun w => G.dist v w = 2) ⊆
      Finset.univ.filter fun w => Even (G.dist v w) := by
    intro w hw
    simp only [Finset.mem_insert, Finset.mem_filter, Finset.mem_univ, true_and] at hw ⊢
    rcases hw with rfl | hw
    · rw [SimpleGraph.dist_self]; exact ⟨0, rfl⟩
    · rw [hw]; exact ⟨1, rfl⟩
  have hnot : v ∉ Finset.univ.filter fun w => G.dist v w = 2 := by
    simp [SimpleGraph.dist_self]
  have h2 := Finset.card_le_card hsub
  rw [Finset.card_insert_of_notMem hnot] at h2
  unfold distEven at h1
  omega

From the first verified proof, s-7jgymcp1nv (lemma proofs are public). If it relies on helper lemmas, copy them too.

Problem: Under the hypothesis of 189 every second neighbourhood has at most σ vertices (v itself and N₂(v) are at even distance). Basic counting step for the diameter ≥ 3 case. … Full statement & Lean theorem →

Show: all ○ connecting…
  1. verifiedVerified proof by test1 d