Compfiles/Bulgaria1998P11.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

4 declarations, 0 contain sorry, 0 declared as axioms

Bulgarian Mathematical Olympiad 1998, Problem 11

Let m,n be natural numbers such that

A = ((m + 3)ⁿ + 1) / (3m)

is an integer. Prove that A is odd.

Imports (2)
Imported by 1 file
  1. lemma Bulgaria1998P11.exists_prime_fac_mod_three_eq_two A natural number that is 2 mod 3 has a prime factor that is 2 mod 3 line 32 source

    Source documentation

    A natural number that is 2 mod 3 has a prime factor that is 2 mod 3.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, HMod.hMod, OfNat.ofNat, Exists, And, Nat.Prime, Dvd.dvd

    Proof uses: Nat.strong_induction_on, LT.lt, Nat.exists_prime_and_dvd, Ne, HMul.hMul, Or, False.elim, Eq.mp, False, Eq.trans, congrFun', congrArg, MulZeroClass.zero_mul, Nat.mul_mod, lt_of_not_ge, LE.le, Mathlib.Tactic.Linarith.lt_irrefl, Int, HAdd.hAdd, Neg.neg and 72 more

    116 instances, coercions and auxiliary constants left out.

    Tactic trace: 20 steps

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

    lemma exists_prime_fac_mod_three_eq_two (m : ℕ) (hm : m % 3 = 2) :
        ∃ p, p.Prime ∧ p ∣ m ∧ p % 3 = 2 := by
    …
  2. lemma Bulgaria1998P11.mod_three_ne_two_of_sq_eq_neg_three Documented declaration: mod_three_ne_two_of_sq_eq_neg_three line 50 source

    Source documentation

    If -3 is a square mod an odd prime p, then p is not 2 mod 3: the element ω with 2 * ω = a - 1 satisfies ω² + ω + 1 = 0, hence has order three, so that 3 ∣ p - 1 by Fermat's little theorem.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Nat.Prime, Ne, OfNat.ofNat, ZMod, Eq, HPow.hPow, Neg.neg, HMod.hMod

    Proof uses: Fact, Fact.mk, Eq.mp, Dvd.dvd, congrArg, propext, Nat.prime_dvd_prime_iff_eq, Nat.prime_two, ZMod.natCast_eq_zero_iff, id, Eq.refl, HMul.hMul, HSub.hSub, Exists, False, Exists.intro, HDiv.hDiv, of_eq_true, Eq.trans, inferInstance and 120 more

    120 instances, coercions and auxiliary constants left out.

    Tactic trace: 29 steps

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

    lemma mod_three_ne_two_of_sq_eq_neg_three {p : ℕ} (hp : p.Prime) (hp2 : p ≠ 2)
        {a : ZMod p} (ha : a ^ 2 = -3) : p % 3 ≠ 2 := by
    …
  3. lemma Bulgaria1998P11.n_odd_and_m_mod_three line 80 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, HMul.hMul, OfNat.ofNat, HAdd.hAdd, HPow.hPow, And, Odd, HMod.hMod

    Proof uses: Ne, False, Eq.mp, congrArg, congrFun', pow_zero, Eq.symm, ZMod, Eq.mpr, id, Eq.refl, Mathlib.Tactic.LinearCombination.eq_of_eq, MulZeroClass.zero_mul, add_zero, of_decide_eq_true, Bool, Decidable.decide, Bool.true, congr, Eq.trans and 67 more

    103 instances, coercions and auxiliary constants left out.

    Tactic trace: 35 steps

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

  4. problem Bulgaria1998P11.bulgaria1998_p11 line 107 source

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, Eq, HMul.hMul, OfNat.ofNat, HAdd.hAdd, HPow.hPow, Odd

    Proof uses: HMod.hMod, And, Bulgaria1998P11.n_odd_and_m_mod_three, Decidable.byContradiction, Not, Eq.mpr, id, congrArg, Eq.symm, Nat.mul_mod, Eq.mp, Even, propext, Nat.even_iff, Nat.not_odd_iff_even, MulZeroClass.mul_zero, Nat.zero_mod, Eq.refl, Nat.pow_mod, Nat.zero_pow and 115 more

    105 instances, coercions and auxiliary constants left out.

    Tactic trace: 68 steps

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