Download lean/ComparatorChallenges/PrimeGaps.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/ComparatorChallenges/PrimeGaps.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/ComparatorChallenges/PrimeGaps.lean
-
curl -L -o PrimeGaps.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/ComparatorChallenges/PrimeGaps.lean
1.2 kB
| import Mathlib | |
| namespace OAI | |
| namespace LargePrimeGaps | |
| noncomputable def prime (n : ℕ) : ℕ := Nat.nth Nat.Prime (n - 1) | |
| noncomputable def largeGapIndices (C : ℝ) (N : ℕ) : Finset ℕ := by | |
| classical | |
| exact (Finset.Icc 1 N).filter fun n => | |
| C * Real.log (prime n : ℝ) < (prime (n + 1) : ℝ) - (prime n : ℝ) | |
| end LargePrimeGaps | |
| noncomputable section | |
| namespace Problem344 | |
| def primeAt (n : ℕ) : ℕ := | |
| Nat.nth Nat.Prime (n - 1) | |
| def initialCount (A : Set ℕ) (N : ℕ) : ℕ := by | |
| classical | |
| exact ((Finset.Icc 1 N).filter (fun n => n ∈ A)).card | |
| def lowerAsymptoticDensity (A : Set ℕ) : ℝ := | |
| sSup {d : ℝ | ∃ N0 : ℕ, ∀ N : ℕ, N0 ≤ N → | |
| d ≤ (initialCount A N : ℝ) / (N : ℝ)} | |
| def ratioIncreaseIndices : Set ℕ := | |
| {n | 1 ≤ n ∧ | |
| (primeAt n : ℝ) / (n : ℝ) < | |
| (primeAt (n + 1) : ℝ) / ((n + 1 : ℕ) : ℝ)} | |
| theorem large_gaps_and_ratio_density : | |
| (∀ C : ℝ, 0 < C → | |
| ∃ c : ℝ, 0 < c ∧ ∃ N₀ : ℕ, ∀ N : ℕ, N₀ ≤ N → | |
| c * (N : ℝ) ≤ ((LargePrimeGaps.largeGapIndices C N).card : ℝ)) ∧ | |
| 0 < lowerAsymptoticDensity ratioIncreaseIndices := by | |
| sorry | |
| end Problem344 | |
| end | |
| end OAI | |