{
  "artifactId": "artifact.library.mathlib.infinitely-many-primes.v001",
  "candidateOnly": false,
  "category": "Number theory",
  "claimBoundary": "This is the exact threshold-existence form in Mathlib. It proves a prime exists at or above every natural-number bound; it does not give a quantitative prime-gap estimate or a count of primes below a bound.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem Nat.exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p",
  "family": "Prime numbers",
  "id": "library.mathlib.infinitely-many-primes.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/infinitely-many-primes/",
    "entryData": "/data/library-theorems/infinitely-many-primes.json",
    "evidence": "/proofs/artifact.library.mathlib.infinitely-many-primes.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.infinitely-many-primes.v001.evidence.json",
    "source": "/sources/upstream/infinitely-many-primes/"
  },
  "landmark": {
    "completeFormalType": "Nat.exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p",
    "concepts": [
      "prime numbers",
      "natural numbers",
      "unboundedness",
      "existence"
    ],
    "plainLanguage": "Choose any natural number n. There is always a prime number p with p at least n, so no finite threshold contains all primes.",
    "poster": {
      "alt": "An ivory theorem poster shows a path crossing an arbitrary natural-number threshold n and continuing to a prime beacon p at or above it, with a three-step reading guide and an unboundedness-only scope panel.",
      "byteSize": 2865645,
      "caption": "Every threshold has a prime at or above it; the poster presents unboundedness without implying a prime-gap or counting estimate.",
      "description": "A blue threshold gate labeled n opens onto a gold path toward a green prime beacon p and a repeating horizon. The formal threshold-existence statement sits above, while lower panels explain the three reading steps and explicitly exclude prime-gap and prime-count estimates.",
      "derivatives": [
        {
          "byteSize": 138198,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/infinitely-many-primes/theorem-poster-v1-640.webp",
          "sha256": "sha256:51c3d8e1a5851f813cfd8199a1d640b1ef4564d9b54a2be5ded58ae052cc6dc0",
          "width": 640
        },
        {
          "byteSize": 303980,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/infinitely-many-primes/theorem-poster-v1-1024.webp",
          "sha256": "sha256:007a2aafa3cbe50a1edb0ed75ec7ddf53f2af2b8d23a99e58c68d3159e7457ed",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-18T16:12:46.651Z",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/infinitely-many-primes/theorem-poster-v1.png",
      "sha256": "sha256:3530d4b96071821abff7dbc1d3460dd6a2bd8f70bc44f3731adf9bfbfb0a0880",
      "title": "Infinitely Many Primes at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "NUMBER THEORY · UNBOUNDED PRIMES\nINFINITELY MANY PRIMES\n∀ n ∈ ℕ\n∃ p, n ≤ p ∧ Prime(p)\nCHOOSE ANY THRESHOLD n\nFIND A PRIME p\nAT OR ABOVE n\nREPEAT BEYOND EVERY BOUND\nHOW TO READ IT\n1 · Start with n\n2 · Produce p ≥ n\n3 · Check that p is prime\nEXACT SCOPE\nUnboundedness only. No prime-gap or prime-count estimate."
    },
    "visual": {
      "alt": "A stone path passes a gate and continues toward an open horizon, marked by isolated gold beacons among irregular composite piles.",
      "byteSize": 4118788,
      "caption": "Beyond any chosen threshold, another prime can be found.",
      "description": "An engraved road crosses a foreground gate and climbs through a forest-green landscape. Gold beacons continue after the gate toward a luminous open horizon, while irregular stone clusters sit away from the path.",
      "derivatives": [
        {
          "byteSize": 80112,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/infinitely-many-primes/theorem-schematic-v1-640.webp",
          "sha256": "sha256:69e2ad75a8fa080a934c523db277482cfdf03d032a52d837a19c263424ad8a4d",
          "width": 640
        },
        {
          "byteSize": 326864,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/infinitely-many-primes/theorem-schematic-v1-1200.webp",
          "sha256": "sha256:34bed71cfd2ab2ac594bf75ecaee3cd26ecba6e9af51a53af041cc57910c6865",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-17T20:00:08Z",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/infinitely-many-primes/theorem-schematic-v1.png",
      "sha256": "sha256:856d66c0e6ba482dd478283da44612c6eca3be9099051b35e26a19e1c6b47a5c",
      "title": "Prime beacons beyond every threshold schematic",
      "width": 1536
    },
    "walkthrough": {
      "introduction": "Mathlib chooses p as the least prime factor of n! + 1, proves p prime, and rules out p below the arbitrary threshold because such a p would divide both n! and n! + 1 and therefore divide one. The result is unboundedness of primes, not a next-prime or prime-gap theorem.",
      "pages": [
        {
          "alt": "A finite forest-green factorial wheel and one separate gold pebble enter a selection vessel, from which a luminous three-notched gold key emerges beside a cobalt gate.",
          "byteSize": 3476433,
          "caption": "From the factorial successor, select its least prime factor; the source proves that this selected factor is prime.",
          "description": "The source defines p to be minFac (n! + 1). Factorial positivity shows n! + 1 is not one, so minFac_prime proves that this specifically selected least factor p is prime.",
          "derivatives": [
            {
              "byteSize": 56372,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-01-v1-640.webp",
              "sha256": "sha256:d614691c85860472e967f584522cff89f698682672eac67e8a5f5af495c83bf9",
              "width": 640
            },
            {
              "byteSize": 218152,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-01-v1-1200.webp",
              "sha256": "sha256:08a8294bfcb65d8b87a2ae73a889f0142b5ca63c339b7bffc93193630305e0a4",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-20T18:34:51Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-01-v1.png",
          "sha256": "sha256:6785cd03ce73a20a50cbbc66bfbbe88152aa3954fe59733cf30e4eaf68c54009",
          "title": "Select the least prime factor of the factorial successor",
          "width": 1536,
          "equation": "p := minFac (n! + 1) and Nat.Prime p",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 1
        },
        {
          "alt": "Identical three-notched gold keys tile a green factorial wheel and its successor vessel, then one intact key meets a single gold pebble across a tiny vermilion mismatch spark.",
          "byteSize": 3325515,
          "caption": "If the selected prime factor lay at or below the threshold, it would divide both the factorial and its successor, hence divide one—impossible for a prime.",
          "description": "Assume contrariwise that p lies at or below n. Positivity of p and dvd_factorial then give p ∣ n!, while minFac_dvd gives p ∣ n! + 1; the addition divisibility lemma forces p ∣ 1, contradicting the fact that p is prime.",
          "derivatives": [
            {
              "byteSize": 53014,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-02-v1-640.webp",
              "sha256": "sha256:392150726c425a05ed338f0b6c946b06bc2d47578e8303adb70719d7932cfd24",
              "width": 640
            },
            {
              "byteSize": 194546,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-02-v1-1200.webp",
              "sha256": "sha256:e3b8b3f4eb8dbf5de65512d158a3ca9a9734853bb1be948266516b51471d726b",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-20T18:42:02Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-02-v1.png",
          "sha256": "sha256:6e464c6c107ba6bec32f9cd8ff39c6a4485686693e493882a1542a160b45f782",
          "title": "A factor at or below the threshold would divide one",
          "width": 1536,
          "equation": "p ∣ n! and p ∣ n! + 1 imply p ∣ 1, contradicting Nat.Prime p",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 2
        },
        {
          "alt": "The recurring factorial wheel releases a three-notched gold key beyond a tall cobalt threshold gate, with fainter gates and gold keys continuing along an open stone path.",
          "byteSize": 3197860,
          "caption": "The contradiction places the selected prime at or above the arbitrary threshold, establishing that primes are unbounded.",
          "description": "The divisibility contradiction proves n ≤ p. Pairing that bound with the already established primality of p yields the witness ⟨p, np, pp⟩ for the arbitrary threshold n, which is exactly the theorem's unbounded-primes conclusion.",
          "derivatives": [
            {
              "byteSize": 46606,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-03-v1-640.webp",
              "sha256": "sha256:710d36f30a62b7692f9fad455137e73e7115ce46be82ab96b43174ac4acb642c",
              "width": 640
            },
            {
              "byteSize": 180794,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-03-v1-1200.webp",
              "sha256": "sha256:bae8519f20b5cff0cb2a65e32dc593e28d7470106763d7ab28287cab9c8c3715",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-20T18:42:02Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/infinitely-many-primes/proof-walkthrough-03-v1.png",
          "sha256": "sha256:3803cce55cdd00a2c317a63e3f5f270ab4e7442f2fd2c0a87a9a6581a5fa65a8",
          "title": "A prime exists at or above every threshold",
          "width": 1536,
          "equation": "∃ p, n ≤ p ∧ Nat.Prime p",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 3
        }
      ],
      "title": "A least-prime-factor route beyond every threshold"
    },
    "whyLandmark": "Euclid's theorem is the archetypal infinitude argument in number theory. This threshold formulation states unboundedness of the prime numbers directly."
  },
  "nonClaims": [
    "Proof Atlas did not originate Euclid's theorem or Mathlib's declaration.",
    "The page indexes and locally reproduces an upstream theorem.",
    "No quantitative distribution theorem for primes is asserted."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.infinitely-many-primes.v001",
  "statusAxes": {
    "acceptedAtlasResult": "Not recorded for the preferred artifact",
    "locallyReproduced": "Exact upstream declaration replayed",
    "reviewedPage": "Current public presentation reviewed",
    "upstreamIndexed": "Pinned source bytes verified locally"
  },
  "summary": "For every natural-number threshold, there is a prime at or above it.",
  "targetId": "target.library.mathlib.infinitely-many-primes.v001",
  "title": "Infinitely Many Primes",
  "upstreamOrigin": {
    "declarationName": "Nat.exists_infinite_primes",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Data/Nat/Prime/Infinite.lean#L33",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:a466db9136dd0e4d239badd1cc0b7413eb49b618391c3f11e2cf807cb0135616",
    "sourceByteLength": 1530,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Data/Nat/Prime/Infinite.lean",
    "sourceLine": 33,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
