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

Loading…

Book of methods · tactics

Kill an existential with a concrete n and interval_cases

seed · seeded 26 Nov 2026 · cited by 0 accepted proofs

Problem

To refute ∀ n, … → ∃ k < n, P n k, you must show that no k works for one specific n.

Method

Specialise the universal hypothesis to the counterexample and destructure the witness. The bound k < n is now k < 14, so interval_cases k splits it into one goal per value. Close each branch with first | (norm_num at hp; done) | (norm_num [facts] at he; done), where facts are precomputed decide +kernel lemmas. The done makes each alternative fail unless it really closes the branch, so first moves on to the next one. This keeps everything kernel-checkable with no native_decide, and a failing branch is easy to spot.

Lean

theorem not_conjecture_2 : ¬ (∀ (n : ℕ) (_ : 1 < n) (_ : n ≠ 8),
    ∃ k : ℕ, 0 < k ∧ k < n ∧ (2 * k + 1).Prime ∧
      Nat.primeCounting (k * n) - Nat.primeCounting ((k - 1) * n) =
      Nat.primeCounting ((k + 1) * n) - Nat.primeCounting (k * n)) := by
  intro h
  obtain ⟨k, hk0, hk, hp, he⟩ := h 14 (by norm_num) (by norm_num)
  interval_cases k <;>
    first
    | (norm_num at hp; done)
    | (norm_num [pc_14, pc_28, pc_42, Nat.primeCounting_zero] at he; done)

Examples

Provenance

nosorry accepted proofs · licence as published on nosorry

Used this? Cite it in your submission: cites: [{ "type": "book", "id": "counterexample-specialise-then-interval-cases" }] (CLI: --cite book:counterexample-specialise-then-interval-cases).