{
  "id": "7839",
  "ident": "NS.07839",
  "slug": "wikipedia-diophantinetuple--rational-7-tuple",
  "title": "Diophantine $m$-tuples · rational_7_tuple",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Does there exist a rational Diophantine 7-tuple? [Du16]",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "DiophantineTuple.rational_7_tuple",
  "statement_lean": "theorem rational_7_tuple :\n    ∃ t, IsRationalDiophantineTuple t ∧ t.card = 7",
  "challenge_source": "/-\nCopyright 2026 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# Diophantine $m$-tuples\n\nA **Diophantine $m$-tuple** is a set of $m$ distinct positive integers\n$\\{a_1, \\dots, a_m\\}$ such that $a_i a_j + 1$ is a perfect square for every\n$i \\neq j$.\n\n*References:*\n- [Wikipedia](https://en.wikipedia.org/wiki/Diophantine_quintuple)\n- [Du16] Dujella, Andrej,\n  [*What is... a Diophantine m-tuple?*](https://www.ams.org/journals/notices/201607/rnoti-p772.pdf),\n  Notices Amer. Math. Soc. 63 (2016), 772--774.\n- [Du] Dujella, Andrej,\n  [*Diophantine quintuple conjecture*](https://web.math.pmf.unizg.hr/~duje/quint.html).\n- [HTZ19] He, Bo, Togbé, Alain and Ziegler, Volker,\n  [*There is no Diophantine quintuple*](https://arxiv.org/abs/1610.04020),\n  Trans. Amer. Math. Soc. 371 (2019), 6665--6709.\n- [BD69] Baker, Alan and Davenport, Harold, The equations $3x^2-2=y^2$ and $8x^2-7=z^2$.\n  Quart. J. Math. Oxford Ser. (2) 20 (1969), 129--137.\n- [Gi99] Gibbs, Philip,\n  [*Some rational Diophantine sextuples*](https://arxiv.org/abs/math/9902081), (1999).\n-/\n\n@[expose] public section\n\nnamespace DiophantineTuple\n\nvariable {R : Type*} [Semiring R]\n\n/--\nA finite set `s` is a **Diophantine tuple** if each element is nonzero and the product\nof any two distinct elements is one less than a perfect square.\n\nWe define this for all semirings and specialize to the integral and rational cases in this file;\nthese are the most common in the literature. Note that the cases of `ℕ` and `ℕ+` are\nmathematically equivalent.\n-/\ndef IsDiophantineTuple (s : Finset R) : Prop :=\n  (∀ x ∈ s, x ≠ 0) ∧\n  ∀ x ∈ s, ∀ y ∈ s, x ≠ y → IsSquare (x * y + 1)\n\n/-- An **integral Diophantine tuple** is a Diophantine tuple of positive integers. -/\nabbrev IsIntegralDiophantineTuple (s : Finset ℕ) : Prop := IsDiophantineTuple (R := ℕ) s\n\n/-- A **rational Diophantine tuple** is a Diophantine tuple of nonzero rationals. -/\nabbrev IsRationalDiophantineTuple (s : Finset ℚ) : Prop := IsDiophantineTuple (R := ℚ) s\n\n/--\nThe property of being a Diophantine tuple is closed under subsets. [Du16]\n-/\n@[category textbook, AMS 11]\ntheorem isDiophantineTuple_of_subset (s t : Finset R) (h1 : IsDiophantineTuple t)\n    (h2 : s ⊆ t) : IsDiophantineTuple s :=\n  ⟨fun x hx => h1.1 x (h2 hx), fun x hx y hy hxy => h1.2 x (h2 hx) y (h2 hy) hxy⟩\n\n/-\nConjectures / theorems about existence of integral Diophantine m-tuples for various values of m\n-/\n\n/--\nThere exists a Diophantine 4-tuple; this example is due to Fermat.\n-/\n@[category test, AMS 11]\ntheorem fermat_4_tuple : IsIntegralDiophantineTuple {1, 3, 8, 120} := by\n  norm_num [IsDiophantineTuple]\n\n/--\nThe set of integral Diophantine 4-tuples.\n-/\ndef integralDiophantine4Tuple : Set (Finset ℕ) :=\n  { s | IsIntegralDiophantineTuple s ∧ s.card = 4 }\n\n/--\nThere exist infinitely many integral Diophantine 4-tuples. [Du16]\n\nProof: many parameterizations exist, e.g. $\\{k, k + 2, 4k + 4, 16k^3 + 48k^2 + 44k + 12\\}$.\n-/\n@[category textbook, AMS 11]\nexample : integralDiophantine4Tuple.encard = ⊤ := by\n  -- The family from the docstring, with `k + 1` in place of `k` so that every element is positive.\n  let s : ℕ → Finset ℕ := fun k =>\n    {k + 1, k + 3, 4 * k + 8, 16 * (k + 1) ^ 3 + 48 * (k + 1) ^ 2 + 44 * (k + 1) + 12}\n  have hmem : ∀ k x, x ∈ s k → k + 1 ≤ x := by\n    intro k x hx\n    simp only [s, Finset.mem_insert, Finset.mem_singleton] at hx\n    rcases hx with rfl | rfl | rfl | rfl <;> omega\n  have hinj : Function.Injective s := by\n    intro k k' h\n    have h1 : k + 1 ∈ s k' := by rw [← h]; simp [s]\n    have h2 : k' + 1 ∈ s k := by rw [h]; simp [s]\n    have := hmem k' _ h1\n    have := hmem k _ h2\n    omega\n  refine Set.encard_eq_top_iff.mpr\n    (Set.infinite_of_injective_forall_mem hinj fun k => ⟨⟨?_, ?_⟩, ?_⟩)\n  · exact fun x hx => by have := hmem k x hx; omega\n  · intro x hx y hy hxy\n    simp only [s, Finset.mem_insert, Finset.mem_singleton] at hx hy\n    rcases hx with rfl | rfl | rfl | rfl <;> rcases hy with rfl | rfl | rfl | rfl <;>\n      first\n      | exact absurd rfl hxy\n      | exact ⟨k + 2, by ring1⟩\n      | exact ⟨2 * k + 3, by ring1⟩\n      | exact ⟨2 * k + 5, by ring1⟩\n      | exact ⟨4 * (k + 1) ^ 2 + 6 * (k + 1) + 1, by ring1⟩\n      | exact ⟨4 * (k + 1) ^ 2 + 10 * (k + 1) + 5, by ring1⟩\n      | exact ⟨8 * (k + 1) ^ 2 + 16 * (k + 1) + 7, by ring1⟩\n  · have h : 4 * k + 8 < 16 * (k + 1) ^ 3 + 48 * (k + 1) ^ 2 + 44 * (k + 1) + 12 := by omega\n    rw [Finset.card_insert_of_notMem (by simp; omega),\n      Finset.card_insert_of_notMem (by simp; omega),\n      Finset.card_insert_of_notMem (by simp; omega), Finset.card_singleton]\n\n/--\nThe statement that there is no integral Diophantine 5-tuple.\n-/\nabbrev NoIntegralDiophantineFiveTuple := ¬∃ t, IsIntegralDiophantineTuple t ∧ t.card = 5\n\n/--\nThe Diophantine 5-tuple theorem: there does not exist an integral Diophantine 5-tuple. [HTZ19]\n-/\n@[category research solved, AMS 11]\ntheorem noIntegralDiophantineFiveTuple : NoIntegralDiophantineFiveTuple := by sorry\n\n/-\nConjectures / theorems about extending integral Diophantine tuples\n-/\n\n/--\nGiven an integral Diophantine 3-tuple, there is a standard way to extend it to a 4-tuple by\nadjoining the value of this function. This is $d_+$ in [Du].\n\nNote that when $\\{a, b, c\\}$ is a Diophantine tuple, each factor under the square root\n(e.g. $ab + 1$) is a perfect square.\n-/\ndef regularExtension (a b c : ℕ) : ℕ :=\n  a + b + c + 2 * a * b * c + 2 * Nat.sqrt ((a * b + 1) * (a * c + 1) * (b * c + 1))\n\n@[category test, AMS 11]\nexample : regularExtension 1 3 8 = 120 := by norm_num [regularExtension]\n\n/--\nThe property that the Diophantine 3-tuple $\\{a, b, c\\}$ extends to a 4-tuple $\\{a, b, c, d\\}$\nwith $d > \\max(a, b, c)$ only via `regularExtension`.\n-/\ndef HasUniqueExtension (a b c : ℕ) : Prop :=\n  (IsIntegralDiophantineTuple { a, b, c }) ∧\n  ∀ d : ℕ, (IsIntegralDiophantineTuple { a, b, c, d }) → max a (max b c) < d →\n    d = regularExtension a b c\n\n/--\nThe statement that every integral Diophantine triple of three distinct elements has a unique\nextension by a larger element.\n-/\nabbrev HasUniqueExtensionOfForall :=\n  ∀ a b c : ℕ, ({a, b, c} : Finset ℕ).card = 3 → IsIntegralDiophantineTuple {a, b, c} →\n    HasUniqueExtension a b c\n\n/--\nThe \"strong Diophantine 5-tuple conjecture\", so-called because it implies the Diophantine\n5-tuple theorem (see `noIntegralDiophantineFiveTuple_of_hasUniqueExtensionOfForall`). [Du]\n-/\n@[category research open, AMS 11]\ntheorem hasUniqueExtension_of_forall : HasUniqueExtensionOfForall := by sorry\n\n/--\nIf every integral Diophantine triple has a unique extension by a larger element, then there\nis no integral Diophantine 5-tuple. [Du]\n\nProof: suppose a 5-tuple $a < b < c < d_1 < d_2$ exists; then $d_1 = d_2$ by unique extension.\n-/\n@[category textbook, AMS 11]\ntheorem noIntegralDiophantineFiveTuple_of_hasUniqueExtensionOfForall :\n    HasUniqueExtensionOfForall → NoIntegralDiophantineFiveTuple := by\n  rintro h ⟨t, ht, hcard⟩\n  set g := t.orderEmbOfFin hcard with hg\n  have hm : StrictMono g := (t.orderEmbOfFin hcard).strictMono\n  have hmem : ∀ i, g i ∈ t := fun i => t.orderEmbOfFin_mem hcard i\n  have h01 : g 0 < g 1 := hm (by decide)\n  have h12 : g 1 < g 2 := hm (by decide)\n  have h23 : g 2 < g 3 := hm (by decide)\n  have h34 : g 3 < g 4 := hm (by decide)\n  have hs3 : ({g 0, g 1, g 2} : Finset ℕ) ⊆ t := by\n    simp [Finset.insert_subset_iff, hmem]\n  have hs4 : ({g 0, g 1, g 2, g 3} : Finset ℕ) ⊆ t := by\n    simp [Finset.insert_subset_iff, hmem]\n  have hs4' : ({g 0, g 1, g 2, g 4} : Finset ℕ) ⊆ t := by\n    simp [Finset.insert_subset_iff, hmem]\n  have hc3 : ({g 0, g 1, g 2} : Finset ℕ).card = 3 :=\n    Finset.card_eq_three.mpr ⟨_, _, _, h01.ne, (h01.trans h12).ne, h12.ne, rfl⟩\n  obtain ⟨-, hu⟩ := h (g 0) (g 1) (g 2) hc3 (isDiophantineTuple_of_subset (R := ℕ) _ _ ht hs3)\n  have e1 : g 3 = regularExtension (g 0) (g 1) (g 2) := by\n    refine hu _ (isDiophantineTuple_of_subset (R := ℕ) _ _ ht hs4) ?_\n    simp only [max_eq_right h12.le]\n    omega\n  have e2 : g 4 = regularExtension (g 0) (g 1) (g 2) := by\n    refine hu _ (isDiophantineTuple_of_subset (R := ℕ) _ _ ht hs4') ?_\n    simp only [max_eq_right h12.le]\n    omega\n  omega\n\n/--\n`HasUniqueExtension` is known to hold for certain triples, including $\\{1, 3, 8\\}$: this is\nessentially the Baker–Davenport theorem [BD69], which states that $120$ is the only integer\n$d$ such that $\\{1, 3, 8, d\\}$ is a Diophantine tuple. Together with a finite check ruling out\n$d < 8$, this shows that no integral Diophantine tuple properly extends $\\{1, 3, 8, 120\\}$.\n-/\n@[category research solved, AMS 11]\ntheorem hasUniqueExtension_of_1_3_8 : HasUniqueExtension 1 3 8 := by sorry\n\n/-\nTheorems and conjectures about the rational case\n-/\n\n/--\nAn example due to Euler which extends `fermat_4_tuple`, showing that\n`hasUniqueExtension_of_1_3_8` requires integrality.\n-/\n@[category test, AMS 11]\nexample : IsRationalDiophantineTuple {1, 3, 8, 120, 777480/8288641} := by\n  norm_num [IsDiophantineTuple]\n\n/--\nA known rational Diophantine 6-tuple. [Gi99]\n-/\n@[category test, AMS 11]\ntheorem gibbs_6_tuple :\n    IsRationalDiophantineTuple {11/192, 35/192, 155/27, 512/27, 1235/48, 180873/16} := by\n  norm_num [IsDiophantineTuple]\n\n/--\nDoes there exist a rational Diophantine 7-tuple? [Du16]\n-/\n@[category research open, question, AMS 11]\ntheorem rational_7_tuple :\n    ∃ t, IsRationalDiophantineTuple t ∧ t.card = 7 := by\n  sorry\n\nend DiophantineTuple\n",
  "statement_hash": "aff296f297920c2b7c171b768889e21639ecb57b2acd6514839253943637d6bd",
  "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."
}