Compfiles/Usa1999P3.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
13 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 1999, Problem 3
Let p > 2 be a prime and let a, b, c, d be integers not divisible by p, such that
{ra/p} + {rb/p} + {rc/p} + {rd/p} = 2
for any integer r not divisible by p. (Here, {t} = t − ⌊t⌋ is the fractional part.) Prove that at least two of the numbers a + b, a + c, a + d, b + c, b + d, c + d are divisible by p.
Imports (4)
Imported by 1 file
- def
Usa1999P3.rtThe primitivep-th root of unity used throughout the proof line 60 sourceSource documentation
The primitive
p-th root of unity used throughout the proof.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ComplexProof uses:
Complex.exp,HDiv.hDiv,HMul.hMul,OfNat.ofNat,Real.pi,Complex.I10 instances, coercions and auxiliary constants left out.
def rt (p : ℕ) : ℂ := Complex.exp (2 * Real.pi * Complex.I / p)
- def
Usa1999P3.chiThe additive characterZMod p → ℂgiven byj ↦ ζ ^ j.valline 63 sourceSource documentation
The additive character
ZMod p → ℂgiven byj ↦ ζ ^ j.val.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ZMod,ComplexProof uses:
HPow.hPow, Usa1999P3.rt,ZMod.val5 instances, coercions and auxiliary constants left out.
def chi (p : ℕ) (j : ZMod p) : ℂ := rt p ^ j.val
Mentions: Usa1999P3.rt
- def
Usa1999P3.SwThe weighted character sum∑ k, k.val * χ (j * k)line 66 sourceSource documentation
The weighted character sum
∑ k, k.val * χ (j * k).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,ZMod,ComplexProof uses:
Finset.sum,Finset.univ,HMul.hMul,ZMod.val, Usa1999P3.chi15 instances, coercions and auxiliary constants left out.
def Sw (p : ℕ) [NeZero p] (j : ZMod p) : ℂ := ∑ k : ZMod p, (k.val : ℂ) * chi p (j * k)
Mentions: Usa1999P3.chi
- lemma
Usa1999P3.isPrimitiveRoot_rtline 68 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,IsPrimitiveRoot,Complex, Usa1999P3.rtProof uses:
id,Complex.isPrimitiveRoot_exp,LT.lt.ne',OfNat.ofNat,Nat.Prime.pos6 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1999P3.chi_zeroline 72 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Complex, Usa1999P3.chi,OfNat.ofNat,ZModProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,HPow.hPow, Usa1999P3.rt,ZMod.val,ZMod.val_zero,pow_zero,eq_self25 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1999P3.chi_addline 75 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,ZMod,Eq,Complex, Usa1999P3.chi,HAdd.hAdd,HMul.hMulProof uses:
NeZero,NeZero.mk,LT.lt.ne',OfNat.ofNat,Nat.Prime.pos,HPow.hPow, Usa1999P3.rt,IsPrimitiveRoot.pow_eq_one, Usa1999P3.isPrimitiveRoot_rt,LT.lt,ZMod.val,ZMod.val_lt,id,Eq.mpr,HMod.hMod,congrArg,ZMod.val_add,LE.le,Or,lt_or_geand 11 more51 instances, coercions and auxiliary constants left out.
Tactic trace: 23 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1999P3.chi_eq_one_iffline 97 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,ZMod,Iff,Eq,Complex, Usa1999P3.chi,OfNat.ofNatProof uses:
NeZero,NeZero.mk,LT.lt.ne',Nat.Prime.pos,IsPrimitiveRoot, Usa1999P3.rt, Usa1999P3.isPrimitiveRoot_rt,Iff.intro,Dvd.dvd,ZMod.val,Iff.mp,HPow.hPow,IsPrimitiveRoot.pow_eq_one_iff_dvd,Nat.eq_zero_of_dvd_of_lt,ZMod.val_lt,ZMod.val_eq_zero, Usa1999P3.chi_zero,Eq.symm30 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1999P3.sum_zmod_valSums overZMod pof a function of the residue can be written as sums overFinset.range pline 110 sourceSource documentation
Sums over
ZMod pof a function of the residue can be written as sums overFinset.range p.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,Complex,Eq,Finset.sum,ZMod,Finset.univ,ZMod.val,Finset.rangeProof uses:
Finset.sum_bij,Membership.mem,Finset,Iff.mpr,LT.lt,Finset.mem_range,ZMod.val_lt,ZMod.natCast_zmod_val,Eq.mpr,id,congrArg,Eq.symm,Eq.refl,Iff.mp,Exists.intro,Exists,Finset.mem_univ,ZMod.val_natCast_of_lt17 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
lemma sum_zmod_val {p : ℕ} [NeZero p] (f : ℕ → ℂ) : ∑ j : ZMod p, f (j.val) = ∑ i ∈ Finset.range p, f i := by …Mentions: f
- lemma
Usa1999P3.sum_chi_selfline 125 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,Nat.Prime,LT.lt,OfNat.ofNat,Eq,Complex,Finset.sum,ZMod,Finset.univ, Usa1999P3.chiProof uses:
IsPrimitiveRoot, Usa1999P3.rt, Usa1999P3.isPrimitiveRoot_rt,id,Eq.mpr,HPow.hPow,ZMod.val,Finset.range,congrArg, Usa1999P3.sum_zmod_val,IsPrimitiveRoot.geom_sum_eq_zero28 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1999P3.sum_chiline 132 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,Nat.Prime,LT.lt,OfNat.ofNat,ZMod,Eq,Complex,Finset.sum,Finset.univ, Usa1999P3.chi,HMul.hMul,iteProof uses:
Fact,Fact.mk,dite,Eq.mpr,id,congrArg,ite_eq_left,rfl,Finset.sum_congr,Finset,Membership.mem,MulZeroClass.zero_mul, Usa1999P3.chi_zero,HSMul.hSMul,Finset.card,Finset.sum_const,Fintype.card,Finset.card_univ,ZMod.card,nsmul_eq_muland 10 more69 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1999P3.Sw_mul_sub_oneThe key identity(χ j - 1) * Sw j = pfor nonzeroj, obtained by reindexing the sum definingSwalongk ↦ k + 1line 156 sourceSource documentation
The key identity
(χ j - 1) * Sw j = pfor nonzeroj, obtained by reindexing the sum definingSwalongk ↦ k + 1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,NeZero,Nat.Prime,LT.lt,OfNat.ofNat,ZMod,Ne,Eq,Complex,HMul.hMul,HSub.hSub, Usa1999P3.chi, Usa1999P3.SwProof uses:
Finset.sum,Finset.univ,ZMod.val,id,Eq.mpr,congrArg,Finset.mul_sum,HAdd.hAdd,Finset.sum_congr,rfl,Finset,Membership.mem,Trans.trans,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat.rawCast,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.atom_pf,Eq.symm,Eq.refland 87 more111 instances, coercions and auxiliary constants left out.
Tactic trace: 80 steps
Open to load the checked before-and-after goal states.
lemma Sw_mul_sub_one {p : ℕ} [NeZero p] (hp : p.Prime) (hp2 : 2 < p) {j : ZMod p} (hj : j ≠ 0) : (chi p j - 1) * Sw p j = (p : ℂ) := by …Mentions: Usa1999P3.chi, Usa1999P3.Sw
- lemma
Usa1999P3.alg_symmThe symmetric-polynomial identity obtained by clearing denominators in∑ 1 / (xᵢ - 1) = -2line 243 sourceSource documentation
The symmetric-polynomial identity obtained by clearing denominators in
∑ 1 / (xᵢ - 1) = -2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Complex,Ne,OfNat.ofNat,Eq,HAdd.hAdd,HDiv.hDiv,HSub.hSub,Neg.neg,Nat,HMul.hMulProof uses:
Iff.mpr,sub_ne_zero,Mathlib.Tactic.LinearCombination.eq_of_eq,inferInstance,CommGroupWithZero,Eq.symm,Eq.mp,Mathlib.Tactic.FieldSimp.eq_eq_cancel_eq,Mathlib.Tactic.FieldSimp.NF.eval,Mathlib.Tactic.FieldSimp.NF.cons,Prod.mk,Int,List.nil,Prod,Mathlib.Tactic.FieldSimp.eq_mul_of_eq_eq_eq_mul,rfl,Eq.trans,Mathlib.Tactic.FieldSimp.subst_add,congr_arg₂,Mathlib.Tactic.FieldSimp.NF.div_eq_evaland 76 more101 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma alg_symm {x₁ x₂ x₃ x₄ : ℂ} (h₁ : x₁ ≠ 1) (h₂ : x₂ ≠ 1) (h₃ : x₃ ≠ 1) (h₄ : x₄ ≠ 1) (h : 1 / (x₁ - 1) + 1 / (x₂ - 1) + 1 / (x₃ - 1) + 1 / (x₄ - 1) = -2) : 2 + (x₁ * x₂ * x₃ + x₁ * x₂ * x₄ + x₁ * x₃ * x₄ + x₂ * x₃ * x₄) = x₁ + x₂ + x₃ + x₄ + 2 * (x₁ * x₂ * x₃ * x₄) := by …Mentions: h
- problem
Usa1999P3.usa1999_p3line 258 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,LT.lt,OfNat.ofNat,Int,Not,Dvd.dvd,Eq,Real,HAdd.hAdd,Int.fract,HDiv.hDiv,HMul.hMul,Or,AndProof uses:
NeZero,NeZero.mk,LT.lt.ne',Nat.Prime.pos,Fact,Fact.mk,ZMod,rfl,Ne,Iff.mpr,Iff.not,ZMod.intCast_zmod_eq_zero_iff_dvd,ZMod.val,Eq.mpr,id,congrArg,Int.cast_natCast,ZMod.natCast_zmod_val,Eq.symm,propextand 159 more228 instances, coercions and auxiliary constants left out.
Tactic trace: 389 steps (first 200 of 389)
Open to load the checked before-and-after goal states.