The Smallest Missing Prime
Abstract
Missing-prime threshold tests reduce to the least prime not dividing the integer.
Theorem 1.1 (Strict decrease across primes).
Proof. Machine-checked in Lean as D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.golden_layer_marginal_one_strictAnti (✓ std3). ∎
Source. Repository-derived.
Commentary.
For primes p less than q, the first-layer marginal at q is strictly smaller than at p. Cancelling the first-layer ratio gives log(1 + 1/p) divided by log p. Its positive numerator strictly decreases with p and its positive denominator strictly increases. This comparison across primes is the new estimate used below; the existing decrease with layer number does not supply it.
Theorem 1.2 (Threshold propagation).
Proof. Machine-checked in Lean as D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.golden_layer_marginal_one_threshold_of_le (✓ std3). ∎
Source. Repository-derived.
Commentary.
At any real price, a first-layer threshold valid at q is valid at every prime p at least q. Equality of primes is included. Consequently the implication also holds when both primes are required not to divide a given positive integer.
Theorem 1.3 (The least missing prime decides the condition).
Proof. Machine-checked in Lean as D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.golden_missing_prime_threshold_iff_of_isLeast (✓ std3). ∎
Source. Repository-derived.
Commentary.
Given the least prime q not dividing n, all missing primes have first-layer marginal at most the price exactly when q does. The reverse implication uses the new prime comparison. IsLeast includes both membership and minimality, so the hypothesis identifies an actual missing prime.
Theorem 1.4 (Existence for every positive integer).
Proof. Machine-checked in Lean as D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.exists_smallest_missing_prime_threshold (✓ std3). ∎
Source. Repository-derived.
Commentary.
Every integer n at least one has a least missing prime q, and this single q decides the missing-prime condition for every real price. Mathlib supplies a prime above n, which cannot divide the positive integer n; Nat.find selects the least missing prime. The witness q is chosen before the price. No finite search bound or numerical threshold is assumed.
References
- Truth anchor:
D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.exists_smallest_missing_prime_threshold - Truth anchor:
D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.golden_layer_marginal_one_strictAnti - Truth anchor:
D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.golden_layer_marginal_one_threshold_of_le - Truth anchor:
D5/S3/Arith/GoldenResource/GoldenSmallestMissingPrime.golden_missing_prime_threshold_iff_of_isLeast - Dependency: D5/S3/Arith/GoldenResourceOptimalInteger