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

30 declarations, 0 contain sorry, 0 declared as axioms

International Mathematical Olympiad 2024, Problem 6

A function f: ℚ → ℚ is called aquaesulian if the following property holds: for every x, y ∈ ℚ, f(x + f(y)) = f(x) + y or f(f(x) + y) = x + f(y).

Show that there exists an integer c such that for any aquaesulian function f there are at most c different rational numbers of the form f(r)+f(-r) for some rational number r, and find the smallest possible value of c.

Imports (3)
Imported by 1 file
  1. def Imo2024P6.Aquaesulian line 36 source

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

    Statement uses: Rat

    Proof uses: Or, Eq, HAdd.hAdd

    2 instances, coercions and auxiliary constants left out.

  2. def Imo2024P6.General.Aquaesulian The condition on functions in the problem (for a general AddCommGroup and in symmetric form) line 58 source

    Source documentation

    The condition on functions in the problem (for a general AddCommGroup and in symmetric form).

    no axioms what this means

    Statement uses: AddCommGroup

    Proof uses: Or, Eq, HAdd.hAdd

    5 instances, coercions and auxiliary constants left out.

    def Aquaesulian (f : G → G) : Prop := ∀ x y, f (f y + x) = f x + y ∨ f (f x + y) = f y + x
    …

    Mentions: f

  3. lemma Imo2024P6.General.Aquaesulian.apply_apply_add line 63 source

    no axioms what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Eq, HAdd.hAdd

    Proof uses: Or

    11 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  4. lemma Imo2024P6.General.Aquaesulian.eq_of_apply_eq_inl line 66 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Eq, HAdd.hAdd

    Proof uses: Eq.symm, Eq.mp, congrArg, propext, add_right_inj, Imo2024P6.General.Aquaesulian.apply_apply_add

    14 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  5. lemma Imo2024P6.General.Aquaesulian.injective line 71 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Function.Injective

    Proof uses: Eq, HAdd.hAdd, Or, Eq.symm, Imo2024P6.General.Aquaesulian.eq_of_apply_eq_inl

    6 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

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

  6. lemma Imo2024P6.General.Aquaesulian.apply_zero line 77 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Eq, OfNat.ofNat

    Proof uses: Imo2024P6.General.Aquaesulian.injective, Eq.mpr, HAdd.hAdd, eq_of_heq, HEq, Eq.refl, HEq.refl, Eq.symm, of_eq_true, Eq.trans, True, congrArg, add_zero, eq_self, Imo2024P6.General.Aquaesulian.apply_apply_add

    23 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  7. lemma Imo2024P6.General.Aquaesulian.apply_neg_apply_add line 81 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Eq, HAdd.hAdd, Neg.neg, OfNat.ofNat

    Proof uses: Or, Imo2024P6.General.Aquaesulian.injective, Eq.mp, congrArg, Eq.symm, Imo2024P6.General.Aquaesulian.apply_zero, add_neg_cancel

    33 instances, coercions and auxiliary constants left out.

    Tactic trace: 7 steps

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

  8. lemma Imo2024P6.General.Aquaesulian.apply_neg_apply line 88 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Eq, Neg.neg

    Proof uses: Eq.mpr, HAdd.hAdd, OfNat.ofNat, id, congrArg, Eq.symm, propext, add_eq_zero_iff_eq_neg, Imo2024P6.General.Aquaesulian.apply_neg_apply_add

    20 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  9. lemma Imo2024P6.General.Aquaesulian.apply_neg_apply_neg line 92 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Eq, Neg.neg

    Proof uses: of_eq_true, Eq.trans, True, congrFun', congrArg, Imo2024P6.General.Aquaesulian.apply_neg_apply, neg_neg, eq_self

    11 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  10. lemma Imo2024P6.General.Aquaesulian.apply_neg_of_apply_eq line 95 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Eq, Neg.neg

    Proof uses: Eq.mpr, id, congrArg, Eq.symm, Imo2024P6.General.Aquaesulian.apply_neg_apply

    10 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  11. lemma Imo2024P6.General.Aquaesulian.apply_neg_eq_neg_iff line 99 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Iff, Eq, Neg.neg

    Proof uses: Iff.intro, Eq.mpr, eq_of_heq, HEq, Eq.refl, HEq.refl, Eq.symm, id, congrArg, neg_neg, Imo2024P6.General.Aquaesulian.apply_neg_of_apply_eq

    14 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  12. lemma Imo2024P6.General.Aquaesulian.pair_lemma line 103 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Ne, Or, Eq

    Proof uses: False.elim, Eq.trans, Eq.symm, Or.inr, Or.inl, Function.Injective.ne, Imo2024P6.General.Aquaesulian.injective

    1 instances, coercions and auxiliary constants left out.

    Tactic trace: 10 steps

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

  13. lemma Imo2024P6.General.Aquaesulian.g_two line 111 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Ne, Eq, HAdd.hAdd, Neg.neg, Or

    Proof uses: Imo2024P6.General.Aquaesulian.pair_lemma, of_eq_true, Not, Eq.trans, False, True, congrArg, eq_false, not_false_eq_true, Eq.mpr, eq_of_heq, HEq, Eq.refl, HEq.refl, Eq.symm, id, Imo2024P6.General.Aquaesulian.apply_neg_apply_neg, add_comm, HSMul.hSMul, Int and 28 more

    48 instances, coercions and auxiliary constants left out.

    Tactic trace: 27 steps

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

  14. lemma Imo2024P6.General.Aquaesulian.u_eq_zero line 131 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Ne, Eq, HAdd.hAdd, Neg.neg, OfNat.ofNat

    Proof uses: Or, HSub.hSub, Eq.mp, congrArg, Eq.symm, propext, eq_sub_iff_add_eq, add_comm, neg_add_cancel_left, neg_sub, Imo2024P6.General.Aquaesulian.apply_neg_eq_neg_iff, HSMul.hSMul, Int, Eq.trans, neg_zsmul, one_zsmul, Mathlib.Tactic.Abel.termg, Mathlib.Tactic.Abel.subst_into_addg, Mathlib.Tactic.Abel.subst_into_negg, Mathlib.Tactic.Abel.term_atom_pfg and 28 more

    60 instances, coercions and auxiliary constants left out.

    Tactic trace: 13 steps

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

  15. lemma Imo2024P6.General.Aquaesulian.u_eq_zero_or_v_eq_zero line 145 source

    standard axioms: propext what this means

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, Ne, Eq, HAdd.hAdd, Neg.neg, Or, OfNat.ofNat

    Proof uses: Imo2024P6.General.Aquaesulian.g_two, Or.inl, Imo2024P6.General.Aquaesulian.u_eq_zero, Or.inr, Ne.symm, Eq.mp, congrArg, add_comm

    25 instances, coercions and auxiliary constants left out.

    Tactic trace: 6 steps

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

  16. lemma Imo2024P6.General.Aquaesulian.card_le_two line 152 source

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

    Statement uses: AddCommGroup, Imo2024P6.General.Aquaesulian, LE.le, Cardinal, Cardinal.mk, Set.range, HAdd.hAdd, Neg.neg, OfNat.ofNat, Nat

    Proof uses: dite, Eq, Classical.propDecidable, of_eq_true, Eq.trans, True, congrFun', congrArg, Fintype.card, Singleton.singleton, Set, funext, Set.range_const, Cardinal.mk_fintype, Fintype.card_unique, Nat.cast_one, Not, Exists, Eq.mp, propext and 34 more

    74 instances, coercions and auxiliary constants left out.

    Tactic trace: 23 steps

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

  17. lemma Imo2024P6.aquaesulian_iff_general line 178 source

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

    Statement uses: Rat, Iff, Imo2024P6.Aquaesulian, Imo2024P6.General.Aquaesulian

    Proof uses: Eq.mpr, Or, Eq, HAdd.hAdd, id, congrArg, Imo2024P6.Aquaesulian.eq_1, Imo2024P6.General.Aquaesulian.eq_1, forall_congr', add_comm, Iff.rfl

    9 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  18. lemma Imo2024P6.Aquaesulian.card_le_two line 183 source

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

    Statement uses: Rat, Imo2024P6.Aquaesulian, LE.le, Cardinal, Cardinal.mk, Set.range, HAdd.hAdd, Neg.neg, OfNat.ofNat, Nat

    Proof uses: Imo2024P6.General.Aquaesulian.card_le_two, Eq.mp, Imo2024P6.General.Aquaesulian, congrArg, propext, Imo2024P6.aquaesulian_iff_general

    11 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  19. def Imo2024P6.fExample An example of a function achieving the maximum number of values of f(r)+f(-r) line 189 source

    Source documentation

    An example of a function achieving the maximum number of values of f(r)+f(-r).

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

    Statement uses: Rat

    Proof uses: HSub.hSub, Int.floor, Int.fract

    8 instances, coercions and auxiliary constants left out.

    def fExample (x : ℚ) : ℚ := ⌊x⌋ - Int.fract x
  20. lemma Imo2024P6.fExample_add line 191 source

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

    Statement uses: Rat, Eq, HAdd.hAdd, Imo2024P6.fExample, Int.floor, HSub.hSub, Int.fract

    Proof uses: Eq.mpr, id, congrArg, Imo2024P6.fExample.eq_1, Eq.symm, Int.floor_add_fract

    26 instances, coercions and auxiliary constants left out.

    Tactic trace: 3 steps

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

  21. lemma Imo2024P6.add_fExample line 196 source

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

    Statement uses: Rat, Eq, HAdd.hAdd, Imo2024P6.fExample, Int.floor, HSub.hSub, Int.fract

    Proof uses: Eq.mpr, id, congrArg, add_comm, Imo2024P6.fExample_add

    24 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  22. lemma Imo2024P6.fExample_int_add line 200 source

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

    Statement uses: Int, Rat, Eq, Imo2024P6.fExample, HAdd.hAdd

    Proof uses: id, Eq.mpr, HSub.hSub, Int.floor, Int.fract, congrFun', congrArg, Int.floor_intCast_add, Int.fract_intCast_add, cast, Eq.symm, rfl

    33 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  23. lemma Imo2024P6.fExample_of_mem_Ico line 204 source

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

    Statement uses: Rat, Membership.mem, Set, Set.Ico, OfNat.ofNat, Eq, Imo2024P6.fExample, Neg.neg

    Proof uses: Eq.mpr, HSub.hSub, Int.floor, Int.fract, id, congrArg, Imo2024P6.fExample.eq_1, Iff.mpr, And, LE.le, LT.lt, Int.fract_eq_self, Int, Int.floor_eq_zero_iff, of_eq_true, Eq.trans, True, congrFun', Int.cast_zero, zero_sub and 1 more

    42 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  24. lemma Imo2024P6.apply_fExample_add_apply_of_fract_le line 208 source

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

    Statement uses: Rat, LE.le, Int.fract, Eq, Imo2024P6.fExample, HAdd.hAdd

    Proof uses: LT.lt, HSub.hSub, OfNat.ofNat, LE.le.trans_lt, sub_le_self, Int.fract_nonneg, Int.fract_lt_one, Eq.mpr, Int.floor, id, congrArg, Imo2024P6.fExample_add, Imo2024P6.add_fExample, add_assoc, Imo2024P6.fExample_int_add, Neg.neg, Imo2024P6.fExample_of_mem_Ico, And.intro, Eq.mp, Eq.symm and 2 more

    47 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

  25. lemma Imo2024P6.aquaesulian_fExample line 217 source

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

    Statement uses: Imo2024P6.Aquaesulian, Imo2024P6.fExample

    Proof uses: Rat, LT.lt, Int.fract, LE.le, Or, Eq, HAdd.hAdd, lt_or_ge, Eq.mpr, id, congrArg, add_comm, Or.inr, Imo2024P6.apply_fExample_add_apply_of_fract_le, LT.lt.le, Or.inl

    15 instances, coercions and auxiliary constants left out.

    Tactic trace: 7 steps

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

  26. lemma Imo2024P6.fract_fExample line 224 source

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

    Statement uses: Rat, Eq, Int.fract, Imo2024P6.fExample, ite, OfNat.ofNat, HSub.hSub

    Proof uses: dite, of_eq_true, Eq.trans, True, congr, congrArg, Int.floor, sub_zero, Int.fract_intCast, ite_eq_left_of_eq_true, congrFun', eq_self, Not, HAdd.hAdd, Neg.neg, sub_eq_add_neg, Int.fract_intCast_add, Int.fract_neg, Ne, Int.fract_fract and 4 more

    49 instances, coercions and auxiliary constants left out.

    Tactic trace: 5 steps

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

  27. lemma Imo2024P6.floor_fExample line 230 source

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

    Statement uses: Rat, Eq, Int.floor, Imo2024P6.fExample, ite, Int.fract, OfNat.ofNat, HSub.hSub

    Proof uses: dite, Eq.mpr, id, congr, congrArg, Int, Eq.trans, sub_zero, Int.floor_intCast, True, ite_congr, congrFun', eq_self, Eq.refl, Not, ite_true, Eq.symm, Eq.mp, propext, sub_eq_zero and 27 more

    89 instances, coercions and auxiliary constants left out.

    Tactic trace: 10 steps

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

  28. lemma Imo2024P6.card_range_fExample line 242 source

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

    Statement uses: Eq, Cardinal, Cardinal.mk, Rat, Set.range, HAdd.hAdd, Imo2024P6.fExample, Neg.neg, OfNat.ofNat, Nat

    Proof uses: Set, Insert.insert, Singleton.singleton, Set.ext, Eq.mpr, Iff, Membership.mem, Exists, Or, id, congr, congrArg, Eq.trans, Iff.intro, Int.floor, Int.fract, Eq.symm, Int.floor_add_fract, dite, of_eq_true and 98 more

    138 instances, coercions and auxiliary constants left out.

    Tactic trace: 30 steps

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

  29. determine Imo2024P6.solution line 268 source

    no axioms what this means

    Statement uses: Nat

    Proof uses: OfNat.ofNat

    1 instances, coercions and auxiliary constants left out.

  30. problem Imo2024P6.imo2024_p6 line 270 source

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

    Statement uses: And, Rat, Imo2024P6.Aquaesulian, LE.le, Cardinal, Cardinal.mk, Set.range, HAdd.hAdd, Neg.neg, Imo2024P6.solution, Nat

    Proof uses: And.intro, Imo2024P6.Aquaesulian.card_le_two, Imo2024P6.fExample, Imo2024P6.aquaesulian_fExample, cast, OfNat.ofNat, Eq.mp, congrArg, Imo2024P6.card_range_fExample

    34 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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