Compfiles/Usa1986P1.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 compfiles documentation, Pinned compfiles corpus index
8 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 1986, Problem 1
(a) Do there exist 14 consecutive positive integers, each of which is divisible by a prime less than 13?
(b) Do there exist 21 consecutive positive integers, each of which is divisible by a prime less than 17?
Imports (5)
Imported by 1 file
- lemma
Usa1986P1.prime_lt_thirteen_ne_twoA prime less than13that is not2is one of3, 5, 7, 11line 34 sourceSource documentation
A prime less than
13that is not2is one of3, 5, 7, 11.standard axioms: propext what this means
Statement uses:
Nat,Nat.Prime,LT.lt,OfNat.ofNat,Ne,Or,EqProof uses:
LE.le,Nat.Prime.two_le,dite,False.elim,Eq.mp,False,eq_false,Mathlib.Meta.NormNum.isNat_not_prime,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Meta.NormNum.not_prime_mul_of_ble,Bool,Bool.false,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCast,Mathlib.Meta.NormNum.IsNat.to_raw_eq,Notand 17 more11 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma prime_lt_thirteen_ne_two {p : ℕ} (hp : p.Prime) (h13 : p < 13) (h2 : p ≠ 2) : p = 3 ∨ p = 5 ∨ p = 7 ∨ p = 11 := by … - lemma
Usa1986P1.eq_of_dvdDocumented declaration: eq_of_dvd line 44 sourceSource documentation
If the same prime
p ∈ {7, 11}divides botha + 2 * j₁anda + 2 * j₂withj₁, j₂ < 7, thenj₁ = j₂:pdivides2 * (j₂ - j₁), which has absolute value less than14, so it must be zero.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Or,And,Dvd.dvd,HAdd.hAdd,HMul.hMul,Eq19 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma eq_of_dvd (j₁ j₂ : ℕ) (a : ℕ) (h₁ : j₁ < 7) (h₂ : j₂ < 7) (h : (7 ∣ a + 2 * j₁ ∧ 7 ∣ a + 2 * j₂) ∨ (11 ∣ a + 2 * j₁ ∧ 11 ∣ a + 2 * j₂)) : j₁ = j₂ := by …Mentions: h
- lemma
Usa1986P1.not_all_divisible_of_threeDocumented declaration: not_all_divisible_of_three line 57 sourceSource documentation
Pigeonhole principle: among three pairwise distinct indices
t₁, t₂, t₃ < 7, it cannot happen that each ofa + 2 * t₁,a + 2 * t₂,a + 2 * t₃is divisible by7or by11(two of them would share a prime, contradictingeq_of_dvd). Hence, if none of them is divisible by3or5, one of them is divisible by none of3, 5, 7, 11.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Ne,LT.lt,OfNat.ofNat,And,Not,Dvd.dvd,HAdd.hAdd,HMul.hMul,ExistsProof uses:
dite,Or,absurd,Eq, Usa1986P1.eq_of_dvd,Or.inl,And.intro,Or.inr,Exists.intro,And.left,And.right,Iff.mp,not_or17 instances, coercions and auxiliary constants left out.
Tactic trace: 22 steps
Open to load the checked before-and-after goal states.
lemma not_all_divisible_of_three (t₁ t₂ t₃ : ℕ) (a : ℕ) (h₁₂ : t₁ ≠ t₂) (h₁₃ : t₁ ≠ t₃) (h₂₃ : t₂ ≠ t₃) (b₁ : t₁ < 7) (b₂ : t₂ < 7) (b₃ : t₃ < 7) (s₁ : ¬ 3 ∣ a + 2 * t₁ ∧ ¬ 5 ∣ a + 2 * t₁) (s₂ : ¬ 3 ∣ a + 2 * t₂ ∧ ¬ 5 ∣ a + 2 * t₂) (s₃ : ¬ 3 ∣ a + 2 * t₃ ∧ ¬ 5 ∣ a + 2 * t₃) : ∃ j < 7, ¬ 3 ∣ a + 2 * j ∧ ¬ 5 ∣ a + 2 * j ∧ ¬ 7 ∣ a + 2 * j ∧ ¬ 11 ∣ a + 2 * j := by … - lemma
Usa1986P1.not_all_divisibleAmong any seven consecutive odd numbersa, a + 2, …, a + 12, at least one is divisible by none of the primes3, 5, 7, 11line 92 sourceSource documentation
Among any seven consecutive odd numbers
a, a + 2, …, a + 12, at least one is divisible by none of the primes3, 5, 7, 11.The proof follows the classical USAMO solution. At most three of the seven numbers are divisible by
3(and if there are three, the two endpoints are among them), at most two by5(and then an endpoint is among them), at most one by7and at most one by11, so at most six of the seven numbers can be divisible by one of3, 5, 7, 11. We check the finitely many cases fora % 3anda % 5: in each case three explicit indices avoid3and5, andnot_all_divisible_of_threefinishes.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Exists,And,LT.lt,OfNat.ofNat,Not,Dvd.dvd,HAdd.hAdd,HMul.hMulProof uses:
HMod.hMod,Nat.mod_lt,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.false,dite,LE.le,Eq, Usa1986P1.not_all_divisible_of_three,Mathlib.Meta.NormNum.isNat_eq_false,And.intro,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCast,Mathlib.Meta.NormNum.IsNat.to_raw_eq,Nat.zero_le118 instances, coercions and auxiliary constants left out.
Tactic trace: 216 steps (first 200 of 216)
Open to load the checked before-and-after goal states.
lemma not_all_divisible (a : ℕ) : ∃ j < 7, ¬ 3 ∣ a + 2 * j ∧ ¬ 5 ∣ a + 2 * j ∧ ¬ 7 ∣ a + 2 * j ∧ ¬ 11 ∣ a + 2 * j := by … - determine
Usa1986P1.does_exist_14line 146 sourceno axioms what this means
Statement uses:
BoolProof uses:
Bool.false - determine
Usa1986P1.does_exist_21line 148 sourceno axioms what this means
Statement uses:
BoolProof uses:
Bool.true - problem
Usa1986P1.usa1986_p1aline 150 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ite,Eq,Bool, Usa1986P1.does_exist_14,Bool.true,Exists,Nat,And,LT.lt,OfNat.ofNat,Membership.mem,Finset,Finset.range,Nat.Prime,Dvd.dvd,HAdd.hAdd,NotProof uses:
id,False,HSub.hSub,HMod.hMod,HMul.hMul, Usa1986P1.not_all_divisible,Iff.mpr,Finset.mem_range,Ne,Eq.rec,Eq.mp,congrArg,Eq.symm,Or, Usa1986P1.prime_lt_thirteen_ne_two29 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
- problem
Usa1986P1.usa1986_p1bline 174 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ite,Eq,Bool, Usa1986P1.does_exist_21,Bool.true,Exists,Nat,And,LT.lt,OfNat.ofNat,Membership.mem,Finset,Finset.range,Nat.Prime,Dvd.dvd,HAdd.hAdd,NotProof uses:
id,Exists.intro,And.intro,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool.false,dite,LE.le,Mathlib.Meta.NormNum.isNat_prime_2,Mathlib.Meta.NormNum.isNat_minFac_2,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.isNat_dvd_true,Mathlib.Meta.NormNum.isNat_add,Eq.symm,le_antisymm,Nat.ge_of_not_lt,Mathlib.Tactic.IntervalCases.of_lt_right,Nat.rawCast,Eq.mpand 8 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 110 steps
Open to load the checked before-and-after goal states.