|
| 1 | +/- |
| 2 | +Copyright 2025 The Formal Conjectures Authors. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +-/ |
| 16 | + |
| 17 | +import FormalConjectures.Util.ProblemImports |
| 18 | + |
| 19 | +/-! |
| 20 | +# Erdős Problem 141 |
| 21 | +
|
| 22 | +*References:* |
| 23 | +- [erdosproblems.com/141](https://www.erdosproblems.com/141) |
| 24 | +- [Wikipedia](https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression#Consecutive_primes_in_arithmetic_progression) |
| 25 | +-/ |
| 26 | + |
| 27 | +/-- |
| 28 | +The predicate that a set `s` consists of `l` consecutive primes (possibly infinite). |
| 29 | +This predicate does not assert a specific value for the first term. |
| 30 | +-/ |
| 31 | +def Set.IsPrimeProgressionOfLength (s : Set ℕ) (l : ℕ∞) : Prop := |
| 32 | + ∃ a, ENat.card s = l ∧ s = {(a + n).nth Nat.Prime | (n : ℕ) (_ : n < l)} |
| 33 | + |
| 34 | +open Nat |
| 35 | + |
| 36 | +/-- |
| 37 | +The first three odd primes are an example of three consecutive primes. |
| 38 | +-/ |
| 39 | +@[category test, AMS 5 11] |
| 40 | +theorem first_three_odd_primes : ({3, 5, 7} : Set ℕ).IsPrimeProgressionOfLength 3 := by |
| 41 | + use 1 |
| 42 | + constructor |
| 43 | + · aesop |
| 44 | + · norm_num [exists_lt_succ, or_assoc, eq_comm, Set.insert_def, |
| 45 | + show (2).nth Nat.Prime = 5 from nth_count prime_five, |
| 46 | + show (3).nth Nat.Prime = 7 from Nat.nth_count (by decide : (7).Prime)] |
| 47 | + |
| 48 | +/-- |
| 49 | +The predicate that a set `s` is both an arithmetic progression of length `l` and a progression |
| 50 | +of `l` consecutive primes. |
| 51 | +-/ |
| 52 | +def Set.IsAPAndPrimeProgressionOfLength (s : Set ℕ) (l : ℕ) := |
| 53 | + s.IsAPOfLength l ∧ s.IsPrimeProgressionOfLength l |
| 54 | + |
| 55 | +/-- |
| 56 | +There are 3 consecutive primes in arithmetic progression. |
| 57 | +-/ |
| 58 | +@[category test, AMS 5 11] |
| 59 | +example : ∃ (s : Set ℕ), s.IsAPAndPrimeProgressionOfLength 3 := by |
| 60 | + use {3, 5, 7} |
| 61 | + constructor |
| 62 | + · use 3, 2 |
| 63 | + unfold Set.IsAPOfLengthWith |
| 64 | + constructor |
| 65 | + · aesop |
| 66 | + · norm_num [exists_lt_succ, or_assoc, eq_comm, Set.insert_def] |
| 67 | + · exact first_three_odd_primes |
| 68 | + |
| 69 | +/-- |
| 70 | +Let $k≥3$. Are there $k$ consecutive primes in arithmetic progression? |
| 71 | +-/ |
| 72 | +@[category research open, AMS 5 11] |
| 73 | +theorem erdos_141 : (∀ k ≥ 3, ∃ (s : Set ℕ), s.IsAPAndPrimeProgressionOfLength k) |
| 74 | + ↔ answer(sorry) := by |
| 75 | + sorry |
| 76 | + |
| 77 | +/-- |
| 78 | +The existence of such progressions has been verified for $k≤10$. |
| 79 | +-/ |
| 80 | +@[category research solved, AMS 5 11] |
| 81 | +theorem erdos_141.variant.first_cases : |
| 82 | + (∀ k ≥ 3, k ≤ 10 → ∃ (s : Set ℕ), s.IsAPAndPrimeProgressionOfLength k) := by |
| 83 | + sorry |
| 84 | + |
| 85 | +/-- |
| 86 | +Are there $11$ consecutive primes in arithmetic progression? |
| 87 | +-/ |
| 88 | +@[category research open, AMS 5 11] |
| 89 | +theorem erdos_141.variant.eleven : (∃ (s : Set ℕ), s.IsAPAndPrimeProgressionOfLength 11) |
| 90 | + ↔ answer(sorry) := by |
| 91 | + sorry |
| 92 | + |
| 93 | +/-- |
| 94 | +The set of arithmetic progressions of consecutive primes of length $k$. |
| 95 | +-/ |
| 96 | +def consecutivePrimeArithmeticProgressions (k : ℕ) : Set (Set ℕ) := |
| 97 | + {s | s.IsAPAndPrimeProgressionOfLength k} |
| 98 | + |
| 99 | +/-- |
| 100 | +It is open, even for $k=3$, whether there are infinitely many such progressions. |
| 101 | +-/ |
| 102 | +@[category research open, AMS 5 11] |
| 103 | +theorem erdos_141.variant.infinite_three : |
| 104 | + (consecutivePrimeArithmeticProgressions 3).Infinite ↔ answer(sorry) := |
| 105 | + sorry |
| 106 | + |
| 107 | +/-- |
| 108 | +Fix a $k \geq 3$. Is it true that there are infinitely many arithmetic prime progressions of length $k$? |
| 109 | +-/ |
| 110 | +@[category research open, AMS 5 11] |
| 111 | +theorem erdos_141.variant.infinite_general_case (k : ℕ) (hk : k ≥ 3) : |
| 112 | + (consecutivePrimeArithmeticProgressions k).Infinite ↔ answer(sorry) := |
| 113 | + sorry |
| 114 | + |
0 commit comments