FormalConjectures/OEIS/67836.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
17 declarations, 1 contain sorry, 0 declared as axioms
Euclid–Fortunate prime coverage
OEIS A067836 starts with $2$. Each later term is the gap from the product of all previous terms to the least prime strictly greater than that product plus one.
References:
Imports (1)
- def
OeisA67836.primeCandidatesThe finite set in which the least prime strictly abovenis sought line 36 sourceSource documentation
The finite set in which the least prime strictly above
nis sought.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,FinsetProof uses:
Finset.filter,Nat.Prime,Finset.Icc,HAdd.hAdd,OfNat.ofNat,HMul.hMul8 instances, coercions and auxiliary constants left out.
def primeCandidates (n : ℕ) : Finset ℕ := …
- lemma
OeisA67836.primeCandidates_nonemptyBertrand's postulate makes the finite prime-candidate set nonempty line 41 sourceSource documentation
Bertrand's postulate makes the finite prime-candidate set nonempty.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset.Nonempty, OeisA67836.primeCandidatesProof uses:
And,Nat.Prime,LT.lt,HAdd.hAdd,OfNat.ofNat,LE.le,HMul.hMul,Exists,Nat.bertrand,Eq,Exists.intro,Membership.mem,Finset,Eq.mpr,id,Eq.trans,Finset.filter,Finset.Icc,congrFun',congrArgand 3 more20 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma primeCandidates_nonempty (n : ℕ) : (primeCandidates n).Nonempty := by …
Mentions: OeisA67836.primeCandidates
- def
OeisA67836.leastPrimeAboveThe least prime strictly greater thann, found in the Bertrand interval line 48 sourceSource documentation
The least prime strictly greater than
n, found in the Bertrand interval.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Finset.min', OeisA67836.primeCandidates, OeisA67836.primeCandidates_nonempty1 instances, coercions and auxiliary constants left out.
def leastPrimeAbove (n : ℕ) : ℕ := …
- lemma
OeisA67836.leastPrimeAbove_specThe chosen number is strictly above the bound and is prime line 53 sourceSource documentation
The chosen number is strictly above the bound and is prime.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,And,LT.lt, OeisA67836.leastPrimeAbove,Nat.PrimeProof uses:
Membership.mem,Finset, OeisA67836.primeCandidates,Finset.min', OeisA67836.primeCandidates_nonempty,Finset.min'_mem,Eq.mpr,LE.le,HAdd.hAdd,OfNat.ofNat,Finset.filter,Finset.Icc,HMul.hMul,Finset.Nonempty,id,Eq,Eq.refl,And.left,Eq.mp,Eq.transand 4 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
lemma leastPrimeAbove_spec (n : ℕ) : n < leastPrimeAbove n ∧ (leastPrimeAbove n).Prime := by …Mentions: OeisA67836.leastPrimeAbove
- lemma
OeisA67836.leastPrimeAbove_leThe least prime abovenis no larger than any other prime abovenline 65 sourceSource documentation
The least prime above
nis no larger than any other prime aboven.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,Nat.Prime,LE.le, OeisA67836.leastPrimeAboveProof uses:
dite,HMul.hMul,OfNat.ofNat,HAdd.hAdd,Membership.mem,Finset, OeisA67836.primeCandidates,Eq.mpr,And,id,Eq,Eq.trans,Finset.filter,Finset.Icc,congrFun',congrArg,And.intro,Decidable.byContradiction,Not,Finset.min'_leand 8 more22 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma leastPrimeAbove_le (n p : ℕ) (hnp : n < p) (hp : p.Prime) : leastPrimeAbove n ≤ p := by …Mentions: OeisA67836.leastPrimeAbove
- lemma
OeisA67836.not_prime_of_lt_leastPrimeAboveNo number strictly betweennandleastPrimeAbove nis prime line 80 sourceSource documentation
No number strictly between
nandleastPrimeAbove nis prime.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt, OeisA67836.leastPrimeAbove,Not,Nat.PrimeProof uses:
LE.le, OeisA67836.leastPrimeAbove_le4 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma not_prime_of_lt_leastPrimeAbove (n p : ℕ) (hnp : n < p) (hp : p < leastPrimeAbove n) : ¬ p.Prime := by …Mentions: OeisA67836.leastPrimeAbove
- lemma
OeisA67836.leastPrimeAbove_eqA convenient criterion for computing the least prime above a concrete bound line 88 sourceSource documentation
A convenient criterion for computing the least prime above a concrete bound.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,Nat.Prime,Not,Eq, OeisA67836.leastPrimeAboveProof uses:
Nat.le_antisymm, OeisA67836.leastPrimeAbove_le,Decidable.byContradiction,LE.le,And.left, OeisA67836.leastPrimeAbove_spec,And.right6 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma leastPrimeAbove_eq (n p : ℕ) (hnp : n < p) (hp : p.Prime) (hmin : ∀ q, n < q → q < p → ¬ q.Prime) : leastPrimeAbove n = p := by …Mentions: OeisA67836.leastPrimeAbove
- structure
OeisA67836.StateThe recursive state records the latest term and the product of all official terms so far line 96 sourceSource documentation
The recursive state records the latest term and the product of all official terms so far.
no axioms what this means
structure State where …
- def
OeisA67836.stateThe state afternofficial terms, with the empty state initialized by term and product one line 101 sourceSource documentation
The state after
nofficial terms, with the empty state initialized by term and product one.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, OeisA67836.State2 instances, coercions and auxiliary constants left out.
def state : ℕ → State | 0 => ⟨1, 1⟩ | n + 1 => let previous := state n …Mentions: OeisA67836.State
- def
OeisA67836.aOEIS A067836, with the convenience valuea 0 = 1preceding its official first term line 109 sourceSource documentation
OEIS A067836, with the convenience value
a 0 = 1preceding its official first term.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
OeisA67836.State.term, OeisA67836.statedef a (n : ℕ) : ℕ := …
- theorem
OeisA67836.a_0line 113 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA67836.a,OfNat.ofNatProof uses:
Eq.refl2 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA67836.a_1line 116 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA67836.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA67836.a_2line 120 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA67836.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA67836.a_3line 124 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA67836.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA67836.a_4line 128 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA67836.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA67836.a_5line 133 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat, OeisA67836.a,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- theorem
OeisA67836.conjectureOEIS A067836 asks: "Do all primes occur in the sequence?" sorry line 138 sourceSource documentation
OEIS A067836 asks: "Do all primes occur in the sequence?"
L4DEL explanation
OEIS A067836 asks: "Do all primes occur in the sequence?"
Sources and attribution: Pinned Lean source (1646ca16afd6)
depends on sorry what this means
Statement uses:
Iff,True,Nat,Nat.Prime,Exists,And,GE.ge,OfNat.ofNat,Eq, OeisA67836.aProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem conjecture : answer(sorry) ↔ ∀ p, p.Prime → ∃ n ≥ 1, a n = p := by …Mentions: OeisA67836.a