Compfiles/Imo2024P6.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
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.
Imported by 1 file
- def
Imo2024P6.Aquaesulianline 36 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
RatProof uses:
Or,Eq,HAdd.hAdd2 instances, coercions and auxiliary constants left out.
- def
Imo2024P6.General.AquaesulianThe condition on functions in the problem (for a generalAddCommGroupand in symmetric form) line 58 sourceSource documentation
The condition on functions in the problem (for a general
AddCommGroupand in symmetric form).no axioms what this means
Statement uses:
AddCommGroupProof uses:
Or,Eq,HAdd.hAdd5 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
- lemma
Imo2024P6.General.Aquaesulian.apply_apply_addline 63 sourceno axioms what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Eq,HAdd.hAddProof uses:
Or11 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.eq_of_apply_eq_inlline 66 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Eq,HAdd.hAddProof uses:
Eq.symm,Eq.mp,congrArg,propext,add_right_inj, Imo2024P6.General.Aquaesulian.apply_apply_add14 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.injectiveline 71 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Function.InjectiveProof uses:
Eq,HAdd.hAdd,Or,Eq.symm, Imo2024P6.General.Aquaesulian.eq_of_apply_eq_inl6 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.apply_zeroline 77 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Eq,OfNat.ofNatProof 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_add23 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.apply_neg_apply_addline 81 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Eq,HAdd.hAdd,Neg.neg,OfNat.ofNatProof uses:
Or, Imo2024P6.General.Aquaesulian.injective,Eq.mp,congrArg,Eq.symm, Imo2024P6.General.Aquaesulian.apply_zero,add_neg_cancel33 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.apply_neg_applyline 88 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Eq,Neg.negProof uses:
Eq.mpr,HAdd.hAdd,OfNat.ofNat,id,congrArg,Eq.symm,propext,add_eq_zero_iff_eq_neg, Imo2024P6.General.Aquaesulian.apply_neg_apply_add20 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.apply_neg_apply_negline 92 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Eq,Neg.negProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg, Imo2024P6.General.Aquaesulian.apply_neg_apply,neg_neg,eq_self11 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.apply_neg_of_apply_eqline 95 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Eq,Neg.negProof uses:
Eq.mpr,id,congrArg,Eq.symm, Imo2024P6.General.Aquaesulian.apply_neg_apply10 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.apply_neg_eq_neg_iffline 99 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Iff,Eq,Neg.negProof 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_eq14 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.pair_lemmaline 103 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Ne,Or,EqProof uses:
False.elim,Eq.trans,Eq.symm,Or.inr,Or.inl,Function.Injective.ne, Imo2024P6.General.Aquaesulian.injective1 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.g_twoline 111 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Ne,Eq,HAdd.hAdd,Neg.neg,OrProof 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,Intand 28 more48 instances, coercions and auxiliary constants left out.
Tactic trace: 27 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.u_eq_zeroline 131 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Ne,Eq,HAdd.hAdd,Neg.neg,OfNat.ofNatProof 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_pfgand 28 more60 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.u_eq_zero_or_v_eq_zeroline 145 sourcestandard axioms: propext what this means
Statement uses:
AddCommGroup, Imo2024P6.General.Aquaesulian,Ne,Eq,HAdd.hAdd,Neg.neg,Or,OfNat.ofNatProof uses: Imo2024P6.General.Aquaesulian.g_two,
Or.inl, Imo2024P6.General.Aquaesulian.u_eq_zero,Or.inr,Ne.symm,Eq.mp,congrArg,add_comm25 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.General.Aquaesulian.card_le_twoline 152 sourcestandard 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,NatProof 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,propextand 34 more74 instances, coercions and auxiliary constants left out.
Tactic trace: 23 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.aquaesulian_iff_generalline 178 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,Iff, Imo2024P6.Aquaesulian, Imo2024P6.General.AquaesulianProof uses:
Eq.mpr,Or,Eq,HAdd.hAdd,id,congrArg,Imo2024P6.Aquaesulian.eq_1,Imo2024P6.General.Aquaesulian.eq_1,forall_congr',add_comm,Iff.rfl9 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.Aquaesulian.card_le_twoline 183 sourcestandard 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,NatProof uses: Imo2024P6.General.Aquaesulian.card_le_two,
Eq.mp, Imo2024P6.General.Aquaesulian,congrArg,propext, Imo2024P6.aquaesulian_iff_general11 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
Imo2024P6.fExampleAn example of a function achieving the maximum number of values off(r)+f(-r)line 189 sourceSource 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:
RatProof uses:
HSub.hSub,Int.floor,Int.fract8 instances, coercions and auxiliary constants left out.
def fExample (x : ℚ) : ℚ := ⌊x⌋ - Int.fract x
- lemma
Imo2024P6.fExample_addline 191 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,Eq,HAdd.hAdd, Imo2024P6.fExample,Int.floor,HSub.hSub,Int.fractProof uses:
Eq.mpr,id,congrArg,Imo2024P6.fExample.eq_1,Eq.symm,Int.floor_add_fract26 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.add_fExampleline 196 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,Eq,HAdd.hAdd, Imo2024P6.fExample,Int.floor,HSub.hSub,Int.fractProof uses:
Eq.mpr,id,congrArg,add_comm, Imo2024P6.fExample_add24 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.fExample_int_addline 200 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Int,Rat,Eq, Imo2024P6.fExample,HAdd.hAddProof uses:
id,Eq.mpr,HSub.hSub,Int.floor,Int.fract,congrFun',congrArg,Int.floor_intCast_add,Int.fract_intCast_add,cast,Eq.symm,rfl33 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.fExample_of_mem_Icoline 204 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,Membership.mem,Set,Set.Ico,OfNat.ofNat,Eq, Imo2024P6.fExample,Neg.negProof 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_suband 1 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.apply_fExample_add_apply_of_fract_leline 208 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,LE.le,Int.fract,Eq, Imo2024P6.fExample,HAdd.hAddProof 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.symmand 2 more47 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.aquaesulian_fExampleline 217 sourcestandard 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.inl15 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.fract_fExampleline 224 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,Eq,Int.fract, Imo2024P6.fExample,ite,OfNat.ofNat,HSub.hSubProof 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_fractand 4 more49 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.floor_fExampleline 230 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Rat,Eq,Int.floor, Imo2024P6.fExample,ite,Int.fract,OfNat.ofNat,HSub.hSubProof 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_zeroand 27 more89 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2024P6.card_range_fExampleline 242 sourcestandard 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,NatProof 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_trueand 98 more138 instances, coercions and auxiliary constants left out.
Tactic trace: 30 steps
Open to load the checked before-and-after goal states.
- determine
Imo2024P6.solutionline 268 sourceno axioms what this means
Statement uses:
NatProof uses:
OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- problem
Imo2024P6.imo2024_p6line 270 sourcestandard 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,NatProof uses:
And.intro, Imo2024P6.Aquaesulian.card_le_two, Imo2024P6.fExample, Imo2024P6.aquaesulian_fExample,cast,OfNat.ofNat,Eq.mp,congrArg, Imo2024P6.card_range_fExample34 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.