Compfiles/Usa2017P5.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
27 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 2017, Problem 5
Determine the set of positive real numbers c such that there exists a labeling of the lattice points in ℤ² with positive integers for which:
- only finitely many distinct labels occur, and
- for each label i, the distance between any two points labeled i is at least cⁱ.
Imports (2)
Imported by 1 file
- determine
Usa2017P5.solution_setline 30 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,RealProof uses:
Set.Ioo,OfNat.ofNat,Real.sqrt6 instances, coercions and auxiliary constants left out.
- def
Usa2017P5.distline 32 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,RealProof uses:
Usa2017P5.dist.match_1,Real.sqrt,HAdd.hAdd,HPow.hPow,Nat,HSub.hSub,OfNat.ofNat11 instances, coercions and auxiliary constants left out.
- def
Usa2017P5.labellingline 40 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
RealProof uses:
Subtype,Prod,Int,Nat,And,Set.Finite,Set.range,LT.lt,OfNat.ofNat,Ne,Eq,LE.le,HPow.hPow, Usa2017P5.dist7 instances, coercions and auxiliary constants left out.
- instance
Usa2017P5.(instance at line 46)line 46 source - instance
Usa2017P5.(instance at line 51)line 51 source - instance
Usa2017P5.(instance at line 53)line 53 source - abbrev
Usa2017P5.transposeline 55 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Real, Usa2017P5.labellingProof uses:
HAdd.hAdd,Subtype.mk,Nat,And,Set.Finite,Set.range,LT.lt,OfNat.ofNat,Ne,Eq,LE.le,HPow.hPow, Usa2017P5.dist,Function.comp13 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- abbrev
Usa2017P5.flipline 67 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Real, Usa2017P5.labellingProof uses:
Prod,Int,Prod.mk,HSub.hSub,HPow.hPow,OfNat.ofNat,Prod.fst,Prod.snd,Subtype.mk,And,Set.Finite,Set.range,LT.lt,Ne,Eq,LE.le, Usa2017P5.dist,Function.comp14 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.dist_ltline 80 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Nat,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Subtype,Membership.mem,Finset,Finset.Icc,Neg.neg,HPow.hPow,Or,LT.lt,abs,Prod.fst,Prod.snd,Real, Usa2017P5.dist and 2 moreProof uses:
Eq.mpr,HSub.hSub,id,Eq,congrArg,Usa2017P5.dist.eq_1,Trans.trans,rfl,of_eq_true,Eq.trans,True,congr,congrFun',Int.cast_abs,sq_abs,eq_self,propext,Real.sqrt_lt_sqrt_iff_of_pos,Subtype.mk,add_lt_add_iff_of_le_of_leand 25 more177 instances, coercions and auxiliary constants left out.
Tactic trace: 27 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.dist_lt'line 99 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Nat,Eq,HMul.hMul,OfNat.ofNat,HAdd.hAdd,Subtype,Membership.mem,Finset,Finset.Icc,Neg.neg,HPow.hPow,LT.lt,Real, Usa2017P5.dist,Prod.mk,Prod.fst,Prod.snd,Real.sqrtProof uses:
Eq.mpr,HSub.hSub,id,congrArg,Usa2017P5.dist.eq_1,Trans.trans,LE.le,abs,rfl,of_eq_true,Eq.trans,True,congr,congrFun',Int.cast_abs,sq_abs,eq_self,propext,Real.sqrt_le_sqrt_iff,Subtype.mkand 76 more173 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.dist_neline 113 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Ne,LE.le,Real,OfNat.ofNat, Usa2017P5.distProof uses:
Prod.mk,Eq.mpr,Real.sqrt,HAdd.hAdd,HPow.hPow,Nat,HSub.hSub,id,Eq,congrArg,Usa2017P5.dist.eq_1,Iff.mpr,Real.one_le_sqrt,Eq.trans,congrFun',Eq.symm,Nat.cast_one,congr,Int.cast_one,diteand 84 more120 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.dist_scaleline 127 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Eq,Real, Usa2017P5.dist,Prod.mk,HMul.hMul,OfNat.ofNat,NatProof uses:
id,Eq.mpr,Real.sqrt,HAdd.hAdd,HPow.hPow,HSub.hSub,congr,congrArg,Eq.trans,congrFun',mul_pow,Int.cast_mul,Int.cast_add,Int.cast_pow,Int.cast_sub,Int.cast_ofNat,Real.sqrt_mul,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefland 67 more114 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.exclusionline 135 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Nat,Ne,Eq,LE.le,Real,HPow.hPow,Real.sqrt,OfNat.ofNat, Usa2017P5.dist,Subtype,Membership.mem,Finset,Finset.Icc,Neg.neg,LT.lt,HAdd.hAdd,Prod.mk,Prod.fstand 2 moreProof uses:
Mathlib.Tactic.Contrapose.contrapose₃,Eq.mpr,Not,Exists,And,id,implies_congr,Eq.refl,Eq.trans,Mathlib.Tactic.Push.not_forall_eq,congrArg,funext,Exists.intro,And.intro,Mathlib.Tactic.Contrapose.contrapose₄,eq_of_heq,HEq,HEq.refl,Eq.symm,And.leftand 3 more71 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.square_squeeze'line 149 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa2017P5.labelling,Real.sqrt,OfNat.ofNat,Real,Exists,Prod,Subtype,Membership.mem,Finset,Finset.range,HPow.hPow,LT.lt,HMul.hMul,Int,Usa2017P5.instCoeOutProdSubtypeNatMemFinsetRangeHPowOfNatInt.match_1,Prod.mkProof uses:
Nat.recAux,Exists.intro,Subtype.mk,of_eq_true,Eq.trans,Eq,True,Singleton.singleton,congrFun',congrArg,pow_zero,eq_self,Eq.mpr,And,Set.Finite,Set.range,Not,LE.le, Usa2017P5.dist,idand 143 more274 instances, coercions and auxiliary constants left out.
Tactic trace: 194 steps
Open to load the checked before-and-after goal states.
- def
Usa2017P5.labelline 294 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int2 instances, coercions and auxiliary constants left out.
- lemma
Usa2017P5.label_maxline 301 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,LE.le, Usa2017P5.label,HAdd.hAdd,HMul.hMul,OfNat.ofNatProof uses:
Nat.recAux,of_eq_true,Eq.trans,True,congrArg,congrFun',MulZeroClass.mul_zero,zero_add,Eq.mpr,ite,Odd,Prod.fst,Prod.snd,And,Prod.mk,HDiv.hDiv,id,Eq,Nat.succ,Usa2017P5.label.eq_228 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_finiteline 308 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Set.Finite,Set.range,Prod,Int, Usa2017P5.labelProof uses:
Eq.mpr,BddAbove,id,Eq,Exists,Membership.mem,Set,LE.le,congrArg,funext,forall_congr,implies_congr,Eq.refl,Exists.intro,HAdd.hAdd,HMul.hMul,OfNat.ofNat, Usa2017P5.label_max19 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_posline 314 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,LT.lt,OfNat.ofNat, Usa2017P5.labelProof uses:
Nat.recAux,of_eq_true,Eq.trans,Eq,True,eq_self,Eq.mpr,HAdd.hAdd,ite,Odd,Prod.fst,Prod.snd,And,Prod.mk,HDiv.hDiv,id,congrArg,Nat.succ,Usa2017P5.label.eq_234 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_casesline 320 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,Or,Eq, Usa2017P5.label,HAdd.hAdd,OfNat.ofNat,Prod.mk,HDiv.hDiv,Prod.fst,Prod.sndProof uses:
dite,Odd,of_eq_true,Eq.trans,True,congr,congrArg,congrFun',ite_eq_left_of_eq_true,ite,And,eq_true,eq_self,False,false_or,true_or,Not,ite_eq_right_of_eq_false,eq_false,or_true25 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_one_iffline 326 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,Iff,Eq, Usa2017P5.label,HAdd.hAdd,OfNat.ofNat,Odd,Prod.fst,Prod.snd6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_two_iffline 329 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,Iff,Eq, Usa2017P5.label,HAdd.hAdd,OfNat.ofNat,And,Odd,Prod.fst,Prod.snd5 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_more_iffline 332 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,Iff,Eq, Usa2017P5.label,HAdd.hAdd,OfNat.ofNat,Prod.mk,HDiv.hDiv,Prod.fst,Prod.snd,And,Even8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_max_exists_eqline 335 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,Eq, Usa2017P5.label,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Exists,Prod.mk,HPow.hPowProof uses:
Nat.recAux,Exists.intro,Prod.fst,Prod.snd,of_eq_true,Eq.trans,True,congrArg,congr,pow_zero,mul_one,Prod.mk.eta,eq_self,HDiv.hDiv34 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_congrline 342 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Prod,Int,Eq, Usa2017P5.label,HAdd.hAdd,OfNat.ofNat,Or,And,Odd,Prod.fst,Prod.snd,Even9 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa2017P5.label_distFor the normal case, following the bound of √2 ^ i < dist p₁ p₂ line 349 sourceSource comment
For the normal case, following the bound of √2 ^ i < dist p₁ p₂standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Ne,Nat,Eq, Usa2017P5.label,HAdd.hAdd,HMul.hMul,OfNat.ofNat,LE.le,Real,HPow.hPow,Real.sqrt, Usa2017P5.distProof uses:
Nat.recAux,And,Odd,Prod.fst,Prod.snd,Or,Even, Usa2017P5.label_congr,Eq.mpr,id,congrArg,Iff.mpr, Usa2017P5.label_one_iff,pow_one,HSub.hSub,Prod.mk,Usa2017P5.dist.eq_1,propext,Real.sqrt_le_iff,And.introand 119 more193 instances, coercions and auxiliary constants left out.
Tactic trace: 68 steps
Open to load the checked before-and-after goal states.
lemma label_dist {p₁ p₂ : ℤ × ℤ} (h_ne : p₁ ≠ p₂) {limit : ℕ} (hp : label limit p₁ = label limit p₂) (hv : label limit p₁ ≠ 2 * limit + 1) : √2 ^ (label limit p₁) ≤ dist p₁ p₂ := by …Mentions: Usa2017P5.label, Usa2017P5.dist
- lemma
Usa2017P5.label_dist_maxFor the last case, where all of the rest of the unfilled squares are marked with the same label line 409 sourceSource comment
For the last case, where all of the rest of the unfilled squares are marked with the same labelstandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Ne,Nat,Eq, Usa2017P5.label,HAdd.hAdd,HMul.hMul,OfNat.ofNat,LE.le,Real,HPow.hPow,Real.sqrt, Usa2017P5.distProof uses:
Nat.recAux,of_eq_true,Eq.trans,True,congrFun',congrArg,MulZeroClass.mul_zero,pow_zero,eq_true, Usa2017P5.dist_ne,Exists,Prod.mk, Usa2017P5.label_max_exists_eq,Eq.mpr,id,congr,pow_succ, Usa2017P5.dist_scale,Nat.mul_add_one,pow_addand 23 more85 instances, coercions and auxiliary constants left out.
Tactic trace: 26 steps
Open to load the checked before-and-after goal states.
lemma label_dist_max {p₁ p₂ : ℤ × ℤ} (h : p₁ ≠ p₂) {limit : ℕ} (hp₁ : label limit p₁ = 2 * limit + 1) (hp₂ : label limit p₂ = 2 * limit + 1) : √2 ^ (2 * limit) ≤ dist p₁ p₂ := by …Mentions: h, Usa2017P5.label, Usa2017P5.dist
- problem
Usa2017P5.usa2017_p5line 431 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Real,Iff,Membership.mem,Set, Usa2017P5.solution_set,And,LT.lt,OfNat.ofNat,Exists,Prod,Int,Nat,Set.Finite,Set.range,Ne,Eq,LE.le,HPow.hPow, Usa2017P5.distProof uses:
Eq.mpr,Set.Ioo,Real.sqrt,id,congrArg,Usa2017P5.solution_set.eq_1,propext,Set.mem_Ioo,and_congr_right_iff,Iff.intro,HDiv.hDiv,Real.log,HMul.hMul,HSub.hSub,exists_nat_gt,HAdd.hAdd,Real.pow_lt_iff_lt_log,of_eq_true,Eq.trans,Trueand 113 more198 instances, coercions and auxiliary constants left out.
Tactic trace: 42 steps
Open to load the checked before-and-after goal states.