Compfiles/Imo1985P2.lean

GitHub source file

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:

  1. $i$ and $n-i$ always receive the same color, and
  2. $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
  1. def Imo1985P2.Condition The conditions on the problem's coloring C line 39 source

    Source documentation

    The conditions on the problem's coloring C. Although its domain is all of ℕ, we only care about its values in Set.Ico 1 n.

    no axioms what this means

    Statement uses: Nat, Fin, OfNat.ofNat

    Proof uses: And, Membership.mem, Set, Set.Ico, Eq, HSub.hSub, Ne, Int.natAbs, Int

    9 instances, coercions and auxiliary constants left out.

    def Condition (n j : ℕ) (C : ℕ → Fin 2) : Prop :=
    …
  2. lemma Imo1985P2.C_mul_mod For 1 ≤ k < n, k * j % n has the same color as j line 56 source

    Source documentation

    For 1 ≤ k < n, k * j % n has the same color as j.

    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.hMul

    Proof 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.dvd and 28 more

    76 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

  3. problem Imo1985P2.imo1985_p2 line 88 source

    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

    Proof 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, Not and 16 more

    50 instances, coercions and auxiliary constants left out.

    Tactic trace: 15 steps

    Open to load the checked before-and-after goal states.