{
  "id": "8272",
  "ident": "NS.08272",
  "slug": "wikipedia-oppermann",
  "title": "Oppermann's Conjecture",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "For every integer $x \\ge 2$ there exists a prime between $x(x-1)$ and $x^2$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Oppermann.oppermann_conjecture.parts.i",
  "statement_lean": "theorem oppermann_conjecture.parts.i (x : ℕ) (hx : 2 ≤ x) :\n    ∃ p ∈ Ioo (x * (x - 1)) (x^2), p.Prime",
  "challenge_source": "/-\nCopyright 2025 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Oppermann's Conjecture\n\n*References:*\n- [Wikipedia](https://en.wikipedia.org/wiki/Oppermann%27s_conjecture)\n- [Luan Alberto Ferreira, *Real exponential sums over primes and prime gaps*](https://arxiv.org/abs/2307.08725)\n-/\n\n@[expose] public section\n\nopen Finset Filter\n\nnamespace Oppermann\n\n/--\nFor every integer $x \\ge 2$ there exists a prime between $x(x-1)$ and $x^2$.\n-/\n@[category research open, AMS 11]\ntheorem oppermann_conjecture.parts.i (x : ℕ) (hx : 2 ≤ x) :\n    ∃ p ∈ Ioo (x * (x - 1)) (x^2), p.Prime := by\n  sorry\n\n/--\nFor every integer $x \\ge 2$ there exists a prime between $x^2$ and $x(x+1)$.\n-/\n@[category research open, AMS 11]\ntheorem oppermann_conjecture.parts.ii (x : ℕ) (hx : 2 ≤ x) :\n    ∃ p ∈ Ioo (x^2) (x * (x + 1)), p.Prime := by\n  sorry\n\n/--\n**Oppermann's Conjecture**:\nFor every integer $x \\ge 2$, the following hold:\n- There exists a prime between $x(x-1)$ and $x^2$.\n- There exists a prime between $x^2$ and $x(x+1)$.\n-/\n@[category research open, AMS 11]\ntheorem oppermann_conjecture (x : ℕ) (hx : 2 ≤ x) :\n    (∃ p ∈ Ioo (x * (x - 1)) (x^2), p.Prime) ∧\n    (∃ p ∈ Ioo (x^2) (x * (x + 1)), p.Prime) := by\n  sorry\n\n/-- Oppermann's conjecture implies Brocard's conjecture. -/\n@[category textbook, AMS 11]\ntheorem oppermann_implies_brocard (n : ℕ) (hn : 1 ≤ n) (P : type_of% oppermann_conjecture) :\n    letI prev := n.nth Nat.Prime\n    letI next := (n+1).nth Nat.Prime\n    4 ≤ ((Ioo (prev ^ 2) (next ^ 2)).filter Nat.Prime).card := by\n  set prev := n.nth Nat.Prime with hprev_def\n  set next := (n+1).nth Nat.Prime with hnext_def\n  have hprev_prime : prev.Prime := Nat.prime_nth_prime n\n  have hnext_prime : next.Prime := Nat.prime_nth_prime (n+1)\n  have hprev_ge : 3 ≤ prev := Nat.nth_prime_one_eq_three ▸\n    (Nat.nth_le_nth Nat.infinite_setOfPred_prime).mpr hn\n  have hlt : prev < next :=\n    Nat.nth_strictMono Nat.infinite_setOfPred_prime (Nat.lt_succ_self n)\n  have hgap : prev + 2 ≤ next := by\n    rcases hprev_prime.odd_of_ne_two (by omega) with ⟨k, hk⟩\n    rcases hnext_prime.odd_of_ne_two (by omega) with ⟨m, hm⟩\n    omega\n  obtain ⟨_, p1, hp1mem, hp1p⟩ := P prev (by omega)\n  obtain ⟨⟨p2, hp2mem, hp2p⟩, p3, hp3mem, hp3p⟩ := P (prev+1) (by omega)\n  obtain ⟨p4, hp4mem, hp4p⟩ := (P (prev+2) (by omega)).1\n  simp only [Finset.mem_Ioo, show prev + 1 - 1 = prev from rfl,\n    show prev + 2 - 1 = prev + 1 from rfl, show prev + 1 + 1 = prev + 2 from rfl]\n    at hp1mem hp2mem hp3mem hp4mem\n  have hsq : (prev + 2)^2 ≤ next^2 := Nat.pow_le_pow_left hgap 2\n  have hsq1 : (prev + 1)^2 ≤ next^2 := Nat.pow_le_pow_left (by omega) 2\n  have hb0 : prev * (prev + 1) < (prev + 1)^2 := by nlinarith\n  have hb1 : (prev + 1) * (prev + 2) < (prev + 2)^2 := by nlinarith\n  have h12 : p1 < p2 := by linarith [hp1mem.2, hp2mem.1]\n  have h23 : p2 < p3 := by linarith [hp2mem.2, hp3mem.1]\n  have h34 : p3 < p4 := by linarith [hp3mem.2, hp4mem.1]\n  refine ((show ({p1, p2, p3, p4} : Finset ℕ).card = 4 from ?_) ▸\n    Finset.card_le_card (s := {p1, p2, p3, p4}) ?_)\n  · simp [Finset.card_insert_of_notMem, h12.ne, (h12.trans h23).ne,\n      (h12.trans (h23.trans h34)).ne, h23.ne, (h23.trans h34).ne, h34.ne]\n  · intro x hx\n    simp only [Finset.mem_insert, Finset.mem_singleton] at hx\n    rcases hx with rfl | rfl | rfl | rfl <;>\n      refine Finset.mem_filter.mpr ⟨Finset.mem_Ioo.mpr ⟨?_, ?_⟩, by assumption⟩ <;>\n      linarith [hp1mem.1, hp1mem.2, hp2mem.1, hp2mem.2, hp3mem.1, hp3mem.2,\n        hp4mem.1, hp4mem.2, hb0, hb1, hsq, hsq1]\n\n/-- Oppermann's conjecture implies Legendre's conjecture. -/\n@[category textbook, AMS 11]\ntheorem oppermann_implies_legendre (n : ℕ) (hn : 1 ≤ n) (P : type_of% oppermann_conjecture) :\n    ∃ p ∈ Ioo (n ^ 2) ((n + 1) ^ 2), p.Prime := by\n  obtain ⟨⟨p, ph⟩, _⟩ := P (n + 1) (by simpa)\n  use p\n  refine ⟨Finset.Ioo_subset_Ioo_left ?_ ph.1, ph.2⟩\n  push_cast [sq, add_one_mul,le_self_add]\n\n/--\nFerreira proved that Oppermann's conjecture is true for sufficiently large x.\n-/\n@[category research solved, AMS 11]\ntheorem oppermann_conjecture.ferreira_large_x : ∀ᶠ x in atTop,\n    (∃ p ∈ Ioo (x * (x - 1)) (x^2), p.Prime) ∧\n    (∃ p ∈ Ioo (x^2) (x * (x + 1)), p.Prime) := by\n  sorry\n\nend Oppermann\n",
  "statement_hash": "6fb0cd2d5e7d7e21783e27e2ee50f165c2773fc6c79ea5212a6b2de16122c90a",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}