Compfiles/Imo2005P2.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
4 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2005, Problem 2
Let $a_1, a_2, \dots$ be a sequence of integers with infinitely many positive and negative terms. Suppose that for every positive integer $n$ the numbers $a_1, a_2, \dots, a_n$ leave $n$ different remainders upon division by $n$. Prove that every integer occurs exactly once in the sequence.
Imports (2)
Imported by 1 file
- lemma
Imo2005P2.a_injectiveline 41 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int,GT.gt,OfNat.ofNat,Eq,Finset.card,Finset.image,HMod.hMod,Finset.range,Function.InjectiveProof uses:
Decidable.byContradiction,Not,HAdd.hAdd,Max.max,rfl,Set.InjOn,Finset,Finset.injOn_of_card_image_eq,Eq.mpr,id,congrArg,Finset.card_range,Eq.refl,Iff.mpr,Membership.mem,Set,Finset.mem_coe,LT.lt,Finset.mem_range,Nat.lt_succ_of_leand 2 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2005P2.abs_sub_ltAny two of the firstnterms differ by less thannline 55 sourceSource documentation
Any two of the first
nterms differ by less thann.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int,GT.gt,OfNat.ofNat,Eq,Finset.card,Finset.image,HMod.hMod,Finset.range,LT.lt,abs,HSub.hSubProof uses:
Ne,Or,eq_or_ne,Eq.mpr,id,congrFun',congrArg,Eq.trans,sub_self,abs_zero,cast,Eq.symm,Nat.cast_zero,Nat.zero_lt_of_lt,Decidable.byContradiction,Not,Int.natAbs,rfl,LE.le,Int.abs_eq_natAbsand 17 more65 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
lemma abs_sub_lt (a : ℕ → ℤ) (rem : ∀ n > 0, ((Finset.range n).image (fun i => a i % n)).card = n) {i j n : ℕ} (hi : i < n) (hj : j < n) : |a i - a j| < n := by … - lemma
Imo2005P2.mem_of_betweenThe firstnterms form a set ofnconsecutive integers, so any integer sandwiched between two of them is itself one of them line 77 sourceSource documentation
The first
nterms form a set ofnconsecutive integers, so any integer sandwiched between two of them is itself one of them.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int,GT.gt,OfNat.ofNat,Eq,Finset.card,Finset.image,HMod.hMod,Finset.range,LT.lt,LE.le,ExistsProof uses:
Finset,rfl,Membership.mem,Iff.mpr,And,Finset.mem_image,Exists.intro,And.intro,Finset.mem_range,Finset.Nonempty,Eq.mpr,id,congrArg,Finset.card_image_of_injOn,Function.Injective.injOn, Imo2005P2.a_injective,Finset.card_range,Eq.refl,Finset.max',Iff.mpand 19 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
lemma mem_of_between (a : ℕ → ℤ) (rem : ∀ n > 0, ((Finset.range n).image (fun i => a i % n)).card = n) {n : ℕ} {z : ℤ} {i j : ℕ} (hi : i < n) (hj : j < n) (hzi : z ≤ a i) (hjz : a j ≤ z) : ∃ k, a k = z := by … - problem
Imo2005P2.imo2005_p2line 108 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int,Set.Infinite,Set.ofPred,LT.lt,OfNat.ofNat,GT.gt,Eq,Finset.card,Finset.image,HMod.hMod,Finset.range,ExistsUniqueProof uses:
Exists,LE.le,Classical.byContradiction,Not,Set.Finite.subset,Set.preimage,Set.Ioo,Set.Finite.preimage,Function.Injective.injOn, Imo2005P2.a_injective,Set.finite_Ioo,Membership.mem,Set,Iff.mpr,Set.mem_preimage,And,Set.mem_Ioo,And.intro,Eq.mp,Eq.transand 10 more32 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.