Compfiles/Imo1985P2.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
3 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 1985, Problem 2
Fix a natural number $n ≥ 3$ and define $N=\{1, 2, 3, \dots, n-1\}$. Fix another natural number $j ∈ N$ coprime to $n$. Each number in $N$ is now colored with one of two colors, say red or black, so that:
- $i$ and $n-i$ always receive the same color, and
- $i$ and $|j-i|$ receive the same color for all $i ∈ N, i ≠ j$.
Prove that all numbers in $N$ must receive the same color.
Imports (5)
Imported by 1 file
- def
Imo1985P2.ConditionThe conditions on the problem's coloringCline 39 sourceSource documentation
The conditions on the problem's coloring
C. Although its domain is all ofℕ, we only care about its values inSet.Ico 1 n.no axioms what this means
Statement uses:
Nat,Fin,OfNat.ofNatProof uses:
And,Membership.mem,Set,Set.Ico,Eq,HSub.hSub,Ne,Int.natAbs,Int9 instances, coercions and auxiliary constants left out.
def Condition (n j : ℕ) (C : ℕ → Fin 2) : Prop := …
- lemma
Imo1985P2.C_mul_modFor1 ≤ k < n,k * j % nhas the same color asjline 56 sourceSource documentation
For
1 ≤ k < n,k * j % nhas the same color asj.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Membership.mem,Set,Set.Ico,Nat.Coprime,Fin, Imo1985P2.Condition,Eq,HMod.hMod,HMul.hMulProof uses:
Nat.le_induction,Eq.mpr,id,congrArg,one_mul,Nat.mod_eq_of_lt,And.right,LT.lt,Eq.refl,HAdd.hAdd,Ne,Nat.ModEq.cancel_right_of_coprime,Eq.mp,Eq.symm,And.intro,Decidable.byContradiction,Not,Nat.eq_zero_of_dvd_of_lt,Nat.Coprime.dvd_of_dvd_mul_right,Dvd.dvdand 28 more76 instances, coercions and auxiliary constants left out.
Tactic trace: 29 steps
Open to load the checked before-and-after goal states.
lemma C_mul_mod {n j : ℕ} (hn : 3 ≤ n) (hj : j ∈ Set.Ico 1 n) (cpj : Nat.Coprime n j) {C : ℕ → Fin 2} (hC : Condition n j C) {k : ℕ} (hk : k ∈ Set.Ico 1 n) : C (k * j % n) = C j := by …Mentions: Imo1985P2.Condition
- problem
Imo1985P2.imo1985_p2line 88 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Membership.mem,Set,Set.Ico,Nat.Coprime,Fin, Imo1985P2.Condition,EqProof uses:
And,LT.lt,HMod.hMod,HMul.hMul,Exists,Nat.exists_mul_mod_eq_one_of_coprime,Nat.Coprime.symm,Eq.mpr,id,congrArg,Nat.mod_mul_mod,Eq.symm,mul_rotate,And.right,one_mul,Nat.mod_eq_of_lt,Eq.refl,And.intro,Decidable.byContradiction,Notand 16 more50 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.