Compfiles/Imo2017P6.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
61 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2017, Problem 6
A point (x,y) ∈ ℤ × ℤ is called primitive if gcd(x,y) = 1. Let S be a finite set of primitive points. Prove that there exists n > 0 and integers a₀,a₁,...,aₙ such that
a₀xⁿ + a₁xⁿ⁻¹y + a₂xⁿ⁻²y² + ... + aₙ₋₁xyⁿ⁻¹ + aₙyⁿ = 1
for each (x,y) ∈ S.
Imports (4)
Imported by 1 file
- structure
Imo2017P6.HFormA homogeneous polynomial in two variables with integer coefficients, represented by its degree and coefficient function line 38 sourceSource documentation
A homogeneous polynomial in two variables with integer coefficients, represented by its degree and coefficient function. Evaluation is
∑ i ∈ range (deg + 1), coeff i * x^i * y^(deg - i).no axioms what this means
structure HForm where …
- def
Imo2017P6.HForm.evalEvaluation of a homogeneous form at a point line 45 sourceSource documentation
Evaluation of a homogeneous form at a point.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
IntProof uses:
Finset.sum,Nat,Finset.range,HAdd.hAdd,Imo2017P6.HForm.deg,OfNat.ofNat,HMul.hMul,Imo2017P6.HForm.coeff,HPow.hPow,HSub.hSub12 instances, coercions and auxiliary constants left out.
def eval (f : HForm) (x y : ℤ) : ℤ := …
Mentions: f, Imo2017P6.HForm
- def
Imo2017P6.HForm.constThe constant form line 49 sourceSource documentation
The constant form.
no axioms what this means
Statement uses:
Int, Imo2017P6.HFormProof uses:
Imo2017P6.HForm.mk,OfNat.ofNat,Nat1 instances, coercions and auxiliary constants left out.
def const (c : ℤ) : HForm := ⟨0, fun _ => c⟩
Mentions: Imo2017P6.HForm
- def
Imo2017P6.HForm.linearThe linear formα * x + β * yline 52 sourceSource documentation
The linear form
α * x + β * y.no axioms what this means
Statement uses:
Int, Imo2017P6.HFormProof uses:
Imo2017P6.HForm.mk,OfNat.ofNat,Nat,ite,Eq2 instances, coercions and auxiliary constants left out.
def linear (α β : ℤ) : HForm := ⟨1, fun i => if i = 0 then β else α⟩
Mentions: Imo2017P6.HForm
- def
Imo2017P6.HForm.truncCoefficient function truncated above the degree line 55 sourceSource documentation
Coefficient function truncated above the degree.
no axioms what this means
Statement uses: Imo2017P6.HForm,
Nat,IntProof uses:
ite,LE.le,Imo2017P6.HForm.deg,Imo2017P6.HForm.coeff,OfNat.ofNat3 instances, coercions and auxiliary constants left out.
def trunc (f : HForm) : ℕ → ℤ := fun i => if i ≤ f.deg then f.coeff i else 0
Mentions: f, Imo2017P6.HForm
- lemma
Imo2017P6.HForm.trunc_of_leline 57 sourceno axioms what this means
Statement uses: Imo2017P6.HForm,
Nat,LE.le,Imo2017P6.HForm.deg,Eq,Int, Imo2017P6.HForm.trunc,Imo2017P6.HForm.coeffProof uses:
ite_eq_left,OfNat.ofNat4 instances, coercions and auxiliary constants left out.
- lemma
Imo2017P6.HForm.trunc_of_ltline 60 sourceno axioms what this means
Statement uses: Imo2017P6.HForm,
Nat,LT.lt,Imo2017P6.HForm.deg,Eq,Int, Imo2017P6.HForm.trunc,OfNat.ofNatProof uses:
ite_eq_right,LE.le,Iff.mpr,Not,not_le,Imo2017P6.HForm.coeff10 instances, coercions and auxiliary constants left out.
- lemma
Imo2017P6.HForm.eval_constline 63 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Eq, Imo2017P6.HForm.eval, Imo2017P6.HForm.constProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,Finset.sum,Nat,Finset.range,HAdd.hAdd,Imo2017P6.HForm.deg,OfNat.ofNat,HMul.hMul,Imo2017P6.HForm.coeff,HPow.hPow,HSub.hSub,Singleton.singleton,Finset,congr,zero_add,funextand 5 more30 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.HForm.eval_linearline 66 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Eq, Imo2017P6.HForm.eval, Imo2017P6.HForm.linear,HAdd.hAdd,HMul.hMulProof uses:
Eq.mpr,id,congrFun',congrArg,Eq.trans,Finset.sum,Nat,Finset.range,OfNat.ofNat,Imo2017P6.HForm.coeff,HPow.hPow,HSub.hSub,Imo2017P6.HForm.deg,ite,funext,ite_mul,Finset.sum_range_succ,congr,Singleton.singleton,Finsetand 30 more51 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.HForm.eval_eq_truncline 70 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Int,Eq, Imo2017P6.HForm.eval,Finset.sum,Nat,Finset.range,HAdd.hAdd,Imo2017P6.HForm.deg,OfNat.ofNat,HMul.hMul, Imo2017P6.HForm.trunc,HPow.hPow,HSub.hSubProof uses:
Finset.sum_congr,Imo2017P6.HForm.coeff,rfl,Finset,Membership.mem,Eq.mpr,id,congrArg, Imo2017P6.HForm.trunc_of_le,Eq.mp,LT.lt,Nat.succ,LE.le,propext,Nat.lt_succ_iff,Finset.mem_range,Eq.refl28 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.HForm.cauchy_sumThe Cauchy product formula for finite sums with vanishing tails line 78 sourceSource documentation
The Cauchy product formula for finite sums with vanishing tails.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Int,LT.lt,Eq,OfNat.ofNat,HMul.hMul,Finset.sum,Finset.range,HAdd.hAdd,HSub.hSubProof uses:
Prod,Finset.filter,Prod.fst,Prod.snd,SProd.sprod,Finset,Eq.mpr,Finset.HasAntidiagonal.antidiagonal,id,congrArg,Nat.succ,Eq.symm,Finset.Nat.sum_antidiagonal_eq_sum_range_succ,Finset.sum_subset,Membership.mem,Iff.mpr,Finset.HasAntidiagonal.mem_antidiagonal,And.right,Eq.mp,Andand 16 more46 instances, coercions and auxiliary constants left out.
Tactic trace: 32 steps
Open to load the checked before-and-after goal states.
lemma cauchy_sum (m n : ℕ) (u v : ℕ → ℤ) (hu : ∀ i, m < i → u i = 0) (hv : ∀ j, n < j → v j = 0) : (∑ i ∈ Finset.range (m + 1), u i) * (∑ j ∈ Finset.range (n + 1), v j) = ∑ k ∈ Finset.range (m + n + 1), ∑ i ∈ Finset.range (k + 1), u i * v (k - i) := by … - def
Imo2017P6.HForm.mulMultiplication of homogeneous forms (degrees add) line 120 sourceSource documentation
Multiplication of homogeneous forms (degrees add).
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm
Proof uses:
Imo2017P6.HForm.mk,HAdd.hAdd,Nat,Imo2017P6.HForm.deg,Finset.sum,Int,Finset.range,OfNat.ofNat,HMul.hMul, Imo2017P6.HForm.trunc,HSub.hSub8 instances, coercions and auxiliary constants left out.
def mul (f g : HForm) : HForm where …
Mentions: f, Imo2017P6.HForm
- lemma
Imo2017P6.HForm.eval_mulline 124 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Int,Eq, Imo2017P6.HForm.eval, Imo2017P6.HForm.mul,HMul.hMulProof uses:
Eq.mpr,Finset.sum,Nat,Finset.range,HAdd.hAdd,Imo2017P6.HForm.deg,OfNat.ofNat, Imo2017P6.HForm.trunc,HPow.hPow,HSub.hSub,id,congrArg, Imo2017P6.HForm.eval_eq_trunc, Imo2017P6.HForm.cauchy_sum,LT.lt, Imo2017P6.HForm.trunc_of_lt,MulZeroClass.zero_mul,Eq.refl,congrFun',Finset.sum_congrand 43 more51 instances, coercions and auxiliary constants left out.
Tactic trace: 27 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.HForm.powPowers of a homogeneous form line 152 sourceSource documentation
Powers of a homogeneous form.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Nat2 instances, coercions and auxiliary constants left out.
def pow (f : HForm) : ℕ → HForm | 0 => const 1 | n + 1 => mul (pow f n) f
Mentions: f, Imo2017P6.HForm, Imo2017P6.HForm.const, Imo2017P6.HForm.mul
- lemma
Imo2017P6.HForm.pow_degline 156 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Nat,Eq,Imo2017P6.HForm.deg, Imo2017P6.HForm.pow,HMul.hMul6 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.HForm.eval_powline 163 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Nat,Int,Eq, Imo2017P6.HForm.eval, Imo2017P6.HForm.pow,HPow.hPow10 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.HForm.addAddition of two forms of the same degree line 170 sourceSource documentation
Addition of two forms of the same degree.
no axioms what this means
Statement uses: Imo2017P6.HForm,
Eq,Nat,Imo2017P6.HForm.degProof uses:
Imo2017P6.HForm.mk,HAdd.hAdd,Int,Imo2017P6.HForm.coeff2 instances, coercions and auxiliary constants left out.
def add (f g : HForm) (_h : f.deg = g.deg) : HForm := …
Mentions: f, Imo2017P6.HForm
- lemma
Imo2017P6.HForm.eval_addline 173 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Eq,Nat,Imo2017P6.HForm.deg,Int, Imo2017P6.HForm.eval, Imo2017P6.HForm.add,HAdd.hAddProof uses:
Finset.sum,Finset.range,OfNat.ofNat,HMul.hMul,Imo2017P6.HForm.coeff,HPow.hPow,HSub.hSub,Eq.mpr,id,congrArg,Eq.refl,Eq.symm,Finset.sum_add_distrib,Finset.sum_congr,rfl,Finset,Membership.mem,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.mul_congrand 21 more36 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.HForm.negNegation of a form line 188 sourceSource documentation
Negation of a form.
no axioms what this means
Statement uses: Imo2017P6.HForm
Proof uses:
Imo2017P6.HForm.mk,Imo2017P6.HForm.deg,Nat,Neg.neg,Int,Imo2017P6.HForm.coeff1 instances, coercions and auxiliary constants left out.
def neg (f : HForm) : HForm := ⟨f.deg, fun i => -f.coeff i⟩
Mentions: f, Imo2017P6.HForm
- lemma
Imo2017P6.HForm.eval_negline 190 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Int,Eq, Imo2017P6.HForm.eval, Imo2017P6.HForm.neg,Neg.negProof uses:
Nat,HMul.hMul,Imo2017P6.HForm.coeff,HPow.hPow,HSub.hSub,Imo2017P6.HForm.deg,Mathlib.Tactic.Ring.of_eq,HAdd.hAdd,Nat.rawCast,Int.rawCast,inferInstance,Ring,Int.negOfNat,OfNat.ofNat,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.neg_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.mpr,idand 38 more40 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.HForm.subSubtraction of two forms of the same degree line 196 sourceSource documentation
Subtraction of two forms of the same degree.
standard axioms: propext what this means
Statement uses: Imo2017P6.HForm,
Eq,Nat,Imo2017P6.HForm.degProof uses: Imo2017P6.HForm.add, Imo2017P6.HForm.neg
1 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
def sub (f g : HForm) (h : f.deg = g.deg) : HForm := f.add g.neg (by simp [neg, h])
Mentions: f, Imo2017P6.HForm, h, Imo2017P6.HForm.neg
- lemma
Imo2017P6.HForm.sub_degline 198 sourcestandard axioms: propext what this means
Statement uses: Imo2017P6.HForm,
Eq,Nat,Imo2017P6.HForm.deg, Imo2017P6.HForm.subProof uses:
rfl - lemma
Imo2017P6.HForm.eval_subline 200 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Eq,Nat,Imo2017P6.HForm.deg,Int, Imo2017P6.HForm.eval, Imo2017P6.HForm.sub,HSub.hSubProof uses:
of_eq_true,Eq.trans,HAdd.hAdd,Neg.neg,True,congr,congrArg, Imo2017P6.HForm.add, Imo2017P6.HForm.neg, Imo2017P6.HForm.eval_add, Imo2017P6.HForm.eval_neg,sub_eq_add_neg,eq_self15 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.HForm.cmulScalar multiplication of a form by an integer line 205 sourceSource documentation
Scalar multiplication of a form by an integer.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int, Imo2017P6.HFormProof uses: Imo2017P6.HForm.mul, Imo2017P6.HForm.const
def cmul (c : ℤ) (f : HForm) : HForm := mul (const c) f
Mentions: f, Imo2017P6.HForm, Imo2017P6.HForm.mul, Imo2017P6.HForm.const
- lemma
Imo2017P6.HForm.cmul_degline 207 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int, Imo2017P6.HForm,Eq,Nat,Imo2017P6.HForm.deg, Imo2017P6.HForm.cmulProof uses:
zero_add2 instances, coercions and auxiliary constants left out.
- lemma
Imo2017P6.HForm.eval_cmulline 209 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int, Imo2017P6.HForm,Eq, Imo2017P6.HForm.eval, Imo2017P6.HForm.cmul,HMul.hMulProof uses:
id,Eq.mpr, Imo2017P6.HForm.mul, Imo2017P6.HForm.const,congrArg, Imo2017P6.HForm.eval_mul, Imo2017P6.HForm.eval_const,Eq.refl4 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.HForm.sumSum of a family of forms of the same degree line 214 sourceSource documentation
Sum of a family of forms of the same degree.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset, Imo2017P6.HForm,Nat,Membership.mem,Eq,Imo2017P6.HForm.degProof uses:
Imo2017P6.HForm.mk,Finset.sum,Int,Imo2017P6.HForm.coeff5 instances, coercions and auxiliary constants left out.
def sum {ι : Type*} (s : Finset ι) (F : ι → HForm) (n : ℕ) (_h : ∀ i ∈ s, (F i).deg = n) : HForm := …Mentions: Imo2017P6.HForm
- lemma
Imo2017P6.HForm.sum_degline 218 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset, Imo2017P6.HForm,Nat,Membership.mem,Eq,Imo2017P6.HForm.deg, Imo2017P6.HForm.sumProof uses:
rfl4 instances, coercions and auxiliary constants left out.
- lemma
Imo2017P6.HForm.eval_sumline 221 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset, Imo2017P6.HForm,Nat,Membership.mem,Eq,Imo2017P6.HForm.deg,Int, Imo2017P6.HForm.eval, Imo2017P6.HForm.sum,Finset.sumProof uses:
Eq.mpr,Finset.range,HAdd.hAdd,OfNat.ofNat,HMul.hMul,Imo2017P6.HForm.coeff,HPow.hPow,HSub.hSub,id,congrFun',congrArg,funext,Eq.trans,Finset.sum_mul,Finset.sum_comm,Finset.sum_congr,rfl,Eq.refl25 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.HForm.exists_prodProducts of families of homogeneous forms exist with the expected degree and evaluation line 232 sourceSource documentation
Products of families of homogeneous forms exist with the expected degree and evaluation.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset, Imo2017P6.HForm,Exists,And,Eq,Nat,Imo2017P6.HForm.deg,Finset.sum,Int, Imo2017P6.HForm.eval,Finset.prodProof uses:
Finset.induction_on,Classical.propDecidable,Exists.intro,EmptyCollection.emptyCollection, Imo2017P6.HForm.const,OfNat.ofNat,And.intro,Eq.mpr,id,congrArg,Finset.sum_empty,Eq.refl, Imo2017P6.HForm.eval_const,Finset.prod_empty,Not,Membership.mem,Insert.insert, Imo2017P6.HForm.mul,HAdd.hAdd,Finset.sum_insertand 5 more37 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma exists_prod {ι : Type*} (s : Finset ι) (F : ι → HForm) : ∃ G : HForm, G.deg = ∑ i ∈ s, (F i).deg ∧ ∀ x y, G.eval x y = ∏ i ∈ s, (F i).eval x y := by …Mentions: Imo2017P6.HForm, Imo2017P6.HForm.eval
- lemma
Imo2017P6.HForm.eval_neg_of_evenEvaluation at the antipode of a form of even degree line 249 sourceSource documentation
Evaluation at the antipode of a form of even degree.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Imo2017P6.HForm,
Even,Nat,Imo2017P6.HForm.deg,Int,Eq, Imo2017P6.HForm.eval,Neg.negProof uses:
Finset.sum_congr,Finset.range,HAdd.hAdd,OfNat.ofNat,HMul.hMul,Imo2017P6.HForm.coeff,HPow.hPow,HSub.hSub,rfl,Finset,Membership.mem,Eq.mpr,id,congrArg,Nat.add_sub_cancel',Eq.mp,LT.lt,Nat.succ,LE.le,propextand 44 more59 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma eval_neg_of_even (f : HForm) (hfe : Even f.deg) (x y : ℤ) : f.eval (-x) (-y) = f.eval x y := by …Mentions: f, Imo2017P6.HForm
- def
Imo2017P6.canonCanonical orientation of a nonzero lattice point: exactly one ofs,-ssatisfiescanon sline 266 sourceSource documentation
Canonical orientation of a nonzero lattice point: exactly one of
s,-ssatisfiescanon s.no axioms what this means
Statement uses:
Prod,IntProof uses:
Or,LT.lt,OfNat.ofNat,Prod.fst,And,Eq,Prod.snd2 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
def canon (s : ℤ × ℤ) : Prop := 0 < s.1 ∨ (s.1 = 0 ∧ 0 < s.2)
- instance
Imo2017P6.(instance at line 268)line 268 source - lemma
Imo2017P6.canon_iff_not_negline 272 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,Ne,Prod.mk,OfNat.ofNat,Iff, Imo2017P6.canon,Not,Neg.negProof uses:
Eq,Prod.fst,rfl,Prod.snd,And,Prod.ext,And.left,And.right,id,Eq.mpr,Or,LT.lt,congrArg,Iff.intro,False,dite,Or.inr,And.intro,False.elim,Or.inl19 instances, coercions and auxiliary constants left out.
Tactic trace: 34 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.repRepresentative of the antipodal class ofs, chosen insideSwhenever possible line 298 sourceSource documentation
Representative of the antipodal class of
s, chosen insideSwhenever possible.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,IntProof uses:
ite,And, Imo2017P6.canon,Membership.mem,Neg.neg9 instances, coercions and auxiliary constants left out.
def rep (S : Finset (ℤ × ℤ)) (s : ℤ × ℤ) : ℤ × ℤ := …
Mentions: S
- lemma
Imo2017P6.rep_memline 301 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem, Imo2017P6.repProof uses:
id,dite,ite,And, Imo2017P6.canon,Neg.neg,Eq.mpr,Eq,congrArg,ite_eq_left,Not,ite_eq_right,And.right11 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.rep_eq_self_or_negline 310 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Or,Eq, Imo2017P6.rep,Neg.negProof uses:
id,dite,ite,And, Imo2017P6.canon,Membership.mem,Eq.mpr,congrArg,ite_eq_left,Or.inl,rfl,Not,ite_eq_right,Or.symm,ite_eq_or_eq11 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.rep_negline 318 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem,Neg.neg,Ne,Prod.mk,OfNat.ofNat,Eq, Imo2017P6.repProof uses:
Iff, Imo2017P6.canon,Not, Imo2017P6.canon_iff_not_neg,dite,Iff.mp,id,Eq.mpr,ite,And,congrArg,ite_eq_left,And.intro,Eq.refl,ite_eq_right,And.left,neg_neg,Decidable.byContradiction,Iff.mpr26 instances, coercions and auxiliary constants left out.
Tactic trace: 26 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.rep_idemline 341 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem,Ne,Prod.mk,OfNat.ofNat,Eq, Imo2017P6.repProof uses:
Neg.neg,Or, Imo2017P6.rep_eq_self_or_neg,Eq.mpr,id,Eq.rec,Eq.refl,Eq.trans,congrArg, Imo2017P6.rep_mem,Eq.mp,Trans.trans, Imo2017P6.rep_neg10 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- def
Imo2017P6.TThe set of antipodal class representatives ofSline 353 sourceSource documentation
The set of antipodal class representatives of
S.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,IntProof uses:
Finset.image, Imo2017P6.rep2 instances, coercions and auxiliary constants left out.
def T (S : Finset (ℤ × ℤ)) : Finset (ℤ × ℤ) := S.image (rep S)
Mentions: S, Imo2017P6.rep
- lemma
Imo2017P6.T_subsetline 355 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,LE.le, Imo2017P6.TProof uses:
Membership.mem,And,Eq, Imo2017P6.rep,Exists,Eq.mp,Finset.image,congrArg,propext,Finset.mem_image,Imo2017P6.T.eq_1, Imo2017P6.rep_mem10 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.rep_mem_Tline 361 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem, Imo2017P6.T, Imo2017P6.repProof uses:
Finset.mem_image_of_mem6 instances, coercions and auxiliary constants left out.
- lemma
Imo2017P6.rep_specline 364 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem,Or,Eq, Imo2017P6.rep,Neg.negProof uses: Imo2017P6.rep_eq_self_or_neg,
Or.inl,Eq.symm,Or.inr,Eq.mpr,id,congrArg,neg_neg,Eq.refl20 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.ne_zero_of_isCoprimeline 370 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Prod,Int,IsCoprime,Prod.fst,Prod.snd,Ne,Prod.mk,OfNat.ofNatProof uses:
Eq,False,id,False.elim,Eq.mp,Nat,Int.gcd,Eq.trans,congrFun',congrArg,Int.gcd_self,propext,Int.isCoprime_iff_gcd_eq_one,Eq.symm11 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.T_ne_negline 377 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem,IsCoprime,Prod.fst,Prod.snd, Imo2017P6.T,Ne,Neg.negProof uses:
Eq,And, Imo2017P6.rep,Exists,False,Eq.mp,Finset.image,congrArg,propext,Finset.mem_image,Imo2017P6.T.eq_1,Prod.mk,OfNat.ofNat, Imo2017P6.ne_zero_of_isCoprime, Imo2017P6.rep_mem,Trans.trans,Eq.symm, Imo2017P6.rep_idem,Eq.mpr,idand 2 more17 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.eq_or_neg_of_mul_eqIf two primitive points have cross-product zero, they are equal or antipodal line 396 sourceSource documentation
If two primitive points have cross-product zero, they are equal or antipodal.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,IsCoprime,Eq,HMul.hMul,Or,And,Neg.negProof uses:
Dvd.dvd,IsCoprime.dvd_of_dvd_mul_left,Exists.intro,Eq.mpr,id,congrArg,mul_comm,Eq.symm,IsCoprime.symm,Nat,Int.natAbs,Iff.mpr,Int.natAbs_dvd_natAbs,Iff.mp,Int.natAbs_eq_natAbs_iff,Nat.dvd_antisymm,Or.inl,And.intro,OfNat.ofNat,Mathlib.Tactic.LinearCombination.eq_of_eqand 58 more81 instances, coercions and auxiliary constants left out.
Tactic trace: 66 steps
Open to load the checked before-and-after goal states.
lemma eq_or_neg_of_mul_eq {x₁ y₁ x₂ y₂ : ℤ} (h₁ : IsCoprime x₁ y₁) (h₂ : IsCoprime x₂ y₂) (h : x₁ * y₂ = x₂ * y₁) : (x₁ = x₂ ∧ y₁ = y₂) ∨ (x₁ = -x₂ ∧ y₁ = -y₂) := by …Mentions: h
- lemma
Imo2017P6.det_ne_zeroPoints of distinct classes inThave nonzero determinant line 440 sourceSource documentation
Points of distinct classes in
Thave nonzero determinant.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem,IsCoprime,Prod.fst,Prod.snd, Imo2017P6.T,Ne,HSub.hSub,HMul.hMul,OfNat.ofNatProof uses:
Eq, Imo2017P6.T_subset,Iff.mp,sub_eq_zero,Trans.trans,mul_comm,And,Neg.neg,Or,False, Imo2017P6.eq_or_neg_of_mul_eq,Prod.ext,Eq.symm,Eq.mpr,id,congrArg,neg_neg,Eq.refl, Imo2017P6.T_ne_neg42 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.
lemma det_ne_zero {S : Finset (ℤ × ℤ)} (hS : ∀ s ∈ S, IsCoprime s.1 s.2) {t t' : ℤ × ℤ} (ht : t ∈ T S) (ht' : t' ∈ T S) (hne : t' ≠ t) : t'.2 * t.1 - t'.1 * t.2 ≠ 0 := by …Mentions: S, Imo2017P6.T
- def
Imo2017P6.XfThe coordinate formxline 458 sourceSource documentation
The coordinate form
x.no axioms what this means
Statement uses: Imo2017P6.HForm
Proof uses: Imo2017P6.HForm.linear,
OfNat.ofNat,Int1 instances, coercions and auxiliary constants left out.
def Xf : HForm := HForm.linear 1 0
Mentions: Imo2017P6.HForm, Imo2017P6.HForm.linear
- def
Imo2017P6.YfThe coordinate formyline 461 sourceSource documentation
The coordinate form
y.no axioms what this means
Statement uses: Imo2017P6.HForm
Proof uses: Imo2017P6.HForm.linear,
OfNat.ofNat,Int1 instances, coercions and auxiliary constants left out.
def Yf : HForm := HForm.linear 0 1
Mentions: Imo2017P6.HForm, Imo2017P6.HForm.linear
- lemma
Imo2017P6.Xf_evalline 463 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Eq, Imo2017P6.HForm.eval, Imo2017P6.XfProof uses:
Eq.mpr, Imo2017P6.HForm.linear,OfNat.ofNat,id,congrArg, Imo2017P6.HForm,Imo2017P6.Xf.eq_1,HAdd.hAdd,HMul.hMul, Imo2017P6.HForm.eval_linear,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Tactic.Ring.Common.atom_pfand 12 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.Yf_evalline 467 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Eq, Imo2017P6.HForm.eval, Imo2017P6.YfProof uses:
Eq.mpr, Imo2017P6.HForm.linear,OfNat.ofNat,id,congrArg, Imo2017P6.HForm,Imo2017P6.Yf.eq_1,HAdd.hAdd,HMul.hMul, Imo2017P6.HForm.eval_linear,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.cast_zero,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Tactic.Ring.Common.atom_pfand 13 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.Xf_degline 471 sourceno axioms what this means
Statement uses:
Eq,Nat,Imo2017P6.HForm.deg, Imo2017P6.Xf,OfNat.ofNatProof uses:
rfl1 instances, coercions and auxiliary constants left out.
- lemma
Imo2017P6.Yf_degline 473 sourceno axioms what this means
Statement uses:
Eq,Nat,Imo2017P6.HForm.deg, Imo2017P6.Yf,OfNat.ofNatProof uses:
rfl1 instances, coercions and auxiliary constants left out.
- lemma
Imo2017P6.not_coprime_of_both_dvdline 475 sourcestandard axioms: propext what this means
Statement uses:
Int,IsCoprime,Dvd.dvd,OfNat.ofNatProof uses:
Exists,Eq,HAdd.hAdd,HMul.hMul,Eq.mpr,id,congrArg,Eq.symm,Dvd.dvd.linear_comb21 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.two_not_dvd_quad_zmodInZMod 2, the formx² + xy + y²does not vanish at a primitive point line 482 sourceSource documentation
In
ZMod 2, the formx² + xy + y²does not vanish at a primitive point.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,IsCoprime,Ne,ZMod,OfNat.ofNat,Nat,HAdd.hAdd,HPow.hPow,HMul.hMulProof uses:
Eq,Not,And,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,False,Dvd.dvd,Iff.mp,ZMod.intCast_zmod_eq_zero_iff_dvd, Imo2017P6.not_coprime_of_both_dvd,False.elim,Eq.mp,eq_false,Mathlib.Meta.NormNum.isInt_dvd_false,Int.ofNat,Mathlib.Meta.NormNum.IsNat.to_isIntand 8 more78 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma two_not_dvd_quad_zmod {x y : ℤ} (h : IsCoprime x y) : ((x ^ 2 + x * y + y ^ 2 : ℤ) : ZMod 2) ≠ 0 := by …Mentions: h
- lemma
Imo2017P6.odd_not_dvd_powsum_zmodInZMod pfor an odd primep, the formx^(p-1) + y^(p-1)does not vanish at a primitive point line 497 sourceSource documentation
In
ZMod pfor an odd primep, the formx^(p-1) + y^(p-1)does not vanish at a primitive point.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,Ne,OfNat.ofNat,Int,IsCoprime,ZMod,HAdd.hAdd,HPow.hPow,HSub.hSubProof uses:
LE.le,Nat.Prime.two_le,Fact,Fact.mk,Eq,Not,Dvd.dvd,Iff.mp,ZMod.intCast_zmod_eq_zero_iff_dvd, Imo2017P6.not_coprime_of_both_dvd,Nat.le_of_dvd,one_pos,Eq.mp,congrArg,propext,Int.natCast_dvd_natCast,Eq.mpr,id,Eq.trans,congrFun'and 21 more97 instances, coercions and auxiliary constants left out.
Tactic trace: 48 steps
Open to load the checked before-and-after goal states.
lemma odd_not_dvd_powsum_zmod {p : ℕ} (hp : p.Prime) (hp2 : p ≠ 2) {x y : ℤ} (h : IsCoprime x y) : ((x ^ (p - 1) + y ^ (p - 1) : ℤ) : ZMod p) ≠ 0 := by …Mentions: h
- def
Imo2017P6.GformThe local form used modulo the primep:x² + xy + y²forp = 2andx^(p-1) + y^(p-1)for oddpline 540 sourceSource documentation
The local form used modulo the prime
p:x² + xy + y²forp = 2andx^(p-1) + y^(p-1)for oddp.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Imo2017P6.HFormProof uses:
ite,Eq,OfNat.ofNat, Imo2017P6.HForm.add, Imo2017P6.HForm.pow, Imo2017P6.Xf, Imo2017P6.HForm.mul, Imo2017P6.Yf,HSub.hSub7 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
def Gform (p : ℕ) : HForm := …
Mentions: Imo2017P6.HForm
- lemma
Imo2017P6.Gform_degline 549 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Imo2017P6.HForm.deg, Imo2017P6.Gform,ite,OfNat.ofNat,HSub.hSubProof uses:
Eq.mpr, Imo2017P6.HForm, Imo2017P6.HForm.add, Imo2017P6.HForm.pow, Imo2017P6.Xf, Imo2017P6.HForm.mul, Imo2017P6.Yf,id,congrArg,Imo2017P6.Gform.eq_1,dite,congr,ite_eq_left,HMul.hMul, Imo2017P6.HForm.pow_deg, Imo2017P6.Xf_deg,Eq.refl,Not,ite_eq_right,mul_one18 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.Gform_eval_zmodline 557 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fact,Nat.Prime,Int,IsCoprime,Ne,ZMod, Imo2017P6.HForm.eval, Imo2017P6.Gform,OfNat.ofNatProof uses:
Eq.mpr,ite, Imo2017P6.HForm,Eq, Imo2017P6.HForm.add, Imo2017P6.HForm.pow, Imo2017P6.Xf, Imo2017P6.HForm.mul, Imo2017P6.Yf,HSub.hSub,id,congrArg,Imo2017P6.Gform.eq_1,dite,ite_eq_left,rfl,HAdd.hAdd, Imo2017P6.HForm.eval_add,HPow.hPow, Imo2017P6.HForm.eval_pow and 10 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2017P6.exists_gDocumented declaration: exists_g line 571 sourceSource documentation
The key construction: a homogeneous form
gof positive even degree whose value at every point ofT Sis nonzero and not divisible by any prime dividingD(the product of all inter-class determinants).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem,IsCoprime,Prod.fst,Prod.snd,Finset.Nonempty, Imo2017P6.T,Exists, Imo2017P6.HForm,And,Even,Nat,Imo2017P6.HForm.deg,LT.lt,OfNat.ofNat,Ne, Imo2017P6.HForm.eval,Nat.Primeand 6 moreProof uses:
Eq.mpr,id,Eq,congrArg,rfl, Imo2017P6.det_ne_zero,And.right,Eq.mp,propext,Finset.mem_erase,And.left,Finset.prod_ne_zero_iff,Iff.mpr,Nat.primeFactors,Int.natAbs,Exists.intro,HAdd.hAdd,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat.rawCastand 153 more194 instances, coercions and auxiliary constants left out.
Tactic trace: 181 steps
Open to load the checked before-and-after goal states.
lemma exists_g (S : Finset (ℤ × ℤ)) (hS : ∀ s ∈ S, IsCoprime s.1 s.2) (_hne : (T S).Nonempty) : ∃ g : HForm, Even g.deg ∧ 0 < g.deg ∧ (∀ t ∈ T S, g.eval t.1 t.2 ≠ 0) ∧ (∀ t ∈ T S, ∀ p : ℕ, p.Prime → (p : ℤ) ∣ (∏ t ∈ T S, ∏ t' ∈ (T S).erase t, (t'.2 * t.1 - t'.1 * t.2)) → ¬ (p : ℤ) ∣ g.eval t.1 t.2) := by …Mentions: S, Imo2017P6.T, Imo2017P6.HForm
- problem
Imo2017P6.imo2017_p6line 761 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Prod,Int,Membership.mem,Eq,GCDMonoid.gcd,Prod.fst,Prod.snd,OfNat.ofNat,Exists,Nat,And,LT.lt,Finset.sum,Finset.range,HAdd.hAdd,HMul.hMul,HPow.hPow,HSub.hSubProof uses:
IsCoprime,Eq.mpr,Int.gcd,id,congrArg,propext,Int.isCoprime_iff_gcd_eq_one,cast,Eq.trans,Eq.symm,Nat.cast_one,Eq.mp,Int.coe_gcd,dite,Finset.Nonempty, Imo2017P6.T, Imo2017P6.HForm,Even,Imo2017P6.HForm.deg,Neand 164 more178 instances, coercions and auxiliary constants left out.
Tactic trace: 199 steps
Open to load the checked before-and-after goal states.