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

24 declarations, 0 contain sorry, 0 declared as axioms

International Mathematical Olympiad 1998, Problem 2

In a competition, there are a contestants and b judges, where b ≥ 3 is an odd integer. Each judge rates each contestant as either "pass" or "fail". Suppose k is a number such that, for any two judges, their ratings coincide for at most k contestants.

Prove that k / a ≥ (b - 1) / (2b).

Imports (2)
Imported by 1 file
  1. abbrev Imo1998P2.JudgePair An ordered pair of judges line 40 source

    Source documentation

    An ordered pair of judges.

    no axioms what this means

    Proof uses: Prod

    abbrev JudgePair (J : Type*) :=
    …
  2. abbrev Imo1998P2.JudgePair.judge₁ The first judge from an ordered pair of judges line 44 source

    Source documentation

    The first judge from an ordered pair of judges.

    no axioms what this means

    Statement uses: Imo1998P2.JudgePair

    Proof uses: Prod.fst

    abbrev JudgePair.judge₁ : JudgePair J → J :=
    …

    Mentions: Imo1998P2.JudgePair

  3. abbrev Imo1998P2.JudgePair.judge₂ The second judge from an ordered pair of judges line 48 source

    Source documentation

    The second judge from an ordered pair of judges.

    no axioms what this means

    Statement uses: Imo1998P2.JudgePair

    Proof uses: Prod.snd

    abbrev JudgePair.judge₂ : JudgePair J → J :=
    …

    Mentions: Imo1998P2.JudgePair

  4. abbrev Imo1998P2.JudgePair.Distinct The proposition that the judges in an ordered pair are distinct line 52 source

    Source documentation

    The proposition that the judges in an ordered pair are distinct.

    no axioms what this means

    Statement uses: Imo1998P2.JudgePair

    Proof uses: Ne, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂

    abbrev JudgePair.Distinct (p : JudgePair J) :=
    …

    Mentions: Imo1998P2.JudgePair

  5. abbrev Imo1998P2.JudgePair.Agree The proposition that the judges in an ordered pair agree about a contestant's rating line 56 source

    Source documentation

    The proposition that the judges in an ordered pair agree about a contestant's rating.

    no axioms what this means

    Statement uses: Imo1998P2.JudgePair

    Proof uses: Iff, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂

    abbrev JudgePair.Agree (p : JudgePair J) (c : C) :=
    …

    Mentions: Imo1998P2.JudgePair

  6. def Imo1998P2.agreedContestants The set of contestants on which two judges agree line 60 source

    Source documentation

    The set of contestants on which two judges agree.

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

    Statement uses: Fintype, Imo1998P2.JudgePair, Finset

    Proof uses: Finset.filter, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Finset.univ

    2 instances, coercions and auxiliary constants left out.

    def agreedContestants [Fintype C] (p : JudgePair J) : Finset C :=
    …

    Mentions: Imo1998P2.JudgePair

  7. abbrev Imo1998P2.AgreedTriple A triple consisting of contestant together with an ordered pair of judges line 66 source

    Source documentation

    A triple consisting of contestant together with an ordered pair of judges.

    no axioms what this means

    Proof uses: Prod, Imo1998P2.JudgePair

    abbrev AgreedTriple (C J : Type*) :=
    …
  8. abbrev Imo1998P2.AgreedTriple.contestant The contestant from the triple consisting of a contestant and an ordered pair of judges line 70 source

    Source documentation

    The contestant from the triple consisting of a contestant and an ordered pair of judges.

    no axioms what this means

    Statement uses: Imo1998P2.AgreedTriple

    Proof uses: Prod.fst, Imo1998P2.JudgePair

    abbrev AgreedTriple.contestant : AgreedTriple C J → C :=
    …

    Mentions: Imo1998P2.AgreedTriple

  9. abbrev Imo1998P2.AgreedTriple.judgePair The ordered pair of judges from the triple consisting of a contestant and an ordered pair of judges line 75 source

    Source documentation

    The ordered pair of judges from the triple consisting of a contestant and an ordered pair of judges.

    no axioms what this means

    Statement uses: Imo1998P2.AgreedTriple, Imo1998P2.JudgePair

    Proof uses: Prod.snd

    abbrev AgreedTriple.judgePair : AgreedTriple C J → JudgePair J :=
    …

    Mentions: Imo1998P2.AgreedTriple, Imo1998P2.JudgePair

  10. theorem Imo1998P2.JudgePair.agree_iff_same_rating line 104 source

    no axioms what this means

    Statement uses: Imo1998P2.JudgePair, Iff, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂

    Proof uses: Iff.rfl

  11. def Imo1998P2.A All incidences of agreement line 111 source

    Source documentation

    All incidences of agreement.

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

    Statement uses: Fintype, Finset, Imo1998P2.AgreedTriple

    Proof uses: Finset.filter, And, Imo1998P2.JudgePair.Agree, Imo1998P2.AgreedTriple.judgePair, Imo1998P2.AgreedTriple.contestant, Imo1998P2.JudgePair.Distinct, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Eq, Finset.univ, Imo1998P2.JudgePair

    5 instances, coercions and auxiliary constants left out.

    def A : Finset (AgreedTriple C J) :=
    …

    Mentions: Imo1998P2.AgreedTriple

  12. theorem Imo1998P2.A_maps_to_offDiag_judgePair line 115 source

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

    Statement uses: Fintype, Imo1998P2.AgreedTriple, Membership.mem, Finset, Imo1998P2.A, Imo1998P2.JudgePair, Prod, Finset.offDiag, Finset.univ, Imo1998P2.AgreedTriple.judgePair

    Proof uses: of_eq_true, Eq.trans, Iff, Imo1998P2.AgreedTriple.contestant, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Not, Eq, Prod.fst, Prod.snd, True, And, implies_congr, Finset.filter, congrFun', congrArg, Finset.filter_congr, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.Distinct, Iff.of_eq and 5 more

    15 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  13. theorem Imo1998P2.A_fibre_over_contestant line 118 source

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

    Statement uses: Fintype, Eq, Finset, Imo1998P2.JudgePair, Finset.filter, And, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.Distinct, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Finset.univ, Finset.image, Prod, Prod.snd, Imo1998P2.AgreedTriple, Imo1998P2.AgreedTriple.contestant, Imo1998P2.A

    Proof uses: Finset.ext, of_eq_true, Iff, Membership.mem, Eq.trans, Not, Prod.mk, Imo1998P2.AgreedTriple.judgePair, True, congr, congrArg, congrFun', Finset.filter_congr, Iff.of_eq, true_and, Exists, Finset.filter.congr_simp, Eq.refl, funext, iff_self

    20 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  14. theorem Imo1998P2.A_fibre_over_contestant_card line 124 source

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

    Statement uses: Fintype, Eq, Nat, Finset.card, Imo1998P2.JudgePair, Finset.filter, And, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.Distinct, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Finset.univ, Imo1998P2.AgreedTriple, Imo1998P2.AgreedTriple.contestant, Imo1998P2.A

    Proof uses: Eq.mpr, Finset.image, Prod, Prod.snd, id, congrArg, Finset, Imo1998P2.A_fibre_over_contestant, Finset.card_image_of_injOn, Set.InjOn, Membership.mem, Set, Prod.fst, Prod.mk, of_eq_true, Eq.trans, True, congrFun', congr, Eq.mp and 4 more

    18 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

  15. theorem Imo1998P2.A_fibre_over_judgePair line 132 source

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

    Statement uses: Fintype, Imo1998P2.JudgePair, Imo1998P2.JudgePair.Distinct, Eq, Finset, Imo1998P2.agreedContestants, Finset.image, Imo1998P2.AgreedTriple, Imo1998P2.AgreedTriple.contestant, Finset.filter, Imo1998P2.AgreedTriple.judgePair, Imo1998P2.A

    Proof uses: id, Finset.ext, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Finset.univ, And, Iff.intro, Membership.mem, Eq.mpr, Exists, congrArg, propext, Finset.mem_image, Exists.intro, Prod.mk, of_eq_true, Eq.trans, True, congr and 17 more

    19 instances, coercions and auxiliary constants left out.

    Tactic trace: 10 steps

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

  16. theorem Imo1998P2.A_fibre_over_judgePair_card line 139 source

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

    Statement uses: Fintype, Imo1998P2.JudgePair, Imo1998P2.JudgePair.Distinct, Eq, Nat, Finset.card, Imo1998P2.agreedContestants, Imo1998P2.AgreedTriple, Finset.filter, Imo1998P2.AgreedTriple.judgePair, Imo1998P2.A

    Proof uses: Eq.mpr, Finset.image, Imo1998P2.AgreedTriple.contestant, id, congrArg, Finset, Imo1998P2.A_fibre_over_judgePair, Finset.card_image_of_injOn, Set.InjOn, Membership.mem, Set, Prod.snd, Not, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, And, Prod.mk, of_eq_true, Eq.trans, True and 8 more

    11 instances, coercions and auxiliary constants left out.

    Tactic trace: 4 steps

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

  17. theorem Imo1998P2.A_card_upper_bound line 147 source

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

    Statement uses: Fintype, Nat, Imo1998P2.JudgePair, Imo1998P2.JudgePair.Distinct, LE.le, Finset.card, Imo1998P2.agreedContestants, Imo1998P2.AgreedTriple, Imo1998P2.A, HMul.hMul, HSub.hSub, Fintype.card

    Proof uses: id, Eq.mpr, Finset.univ, Prod, Finset.offDiag, Eq, congrArg, Eq.symm, Finset.offDiag_card, Finset.card_le_mul_card_image_of_maps_to, Imo1998P2.AgreedTriple.judgePair, Imo1998P2.A_maps_to_offDiag_judgePair, Membership.mem, Finset, Eq.mp, Not, Prod.fst, Prod.snd, Eq.trans, And and 7 more

    16 instances, coercions and auxiliary constants left out.

    Tactic trace: 9 steps

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

  18. theorem Imo1998P2.add_sq_add_sq_sub line 159 source

    standard axioms: propext what this means

    Statement uses: Ring, Eq, HAdd.hAdd, HMul.hMul, HSub.hSub, OfNat.ofNat, Nat

    Proof uses: Eq.mpr, Neg.neg, HSMul.hSMul, id, congr, congrArg, Eq.trans, mul_add, add_mul, sub_eq_add_neg, neg_mul, mul_neg, congrFun', Mathlib.Tactic.NoncommRing.nat_lit_mul_eq_nsmul, smul_mul_assoc

    59 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  19. theorem Imo1998P2.norm_bound_of_odd_sum line 162 source

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

    Statement uses: Int, Eq, HAdd.hAdd, HMul.hMul, OfNat.ofNat, LE.le

    Proof uses: Eq.mpr, id, congrArg, Mathlib.Tactic.Ring.of_eq, Nat.rawCast, HPow.hPow, Nat, Mathlib.Tactic.Ring.Common.mul_congr, Mathlib.Tactic.Ring.Common.add_congr, Mathlib.Tactic.Ring.cast_pos, Mathlib.Meta.NormNum.isNat_ofNat, Eq.refl, Mathlib.Tactic.Ring.Common.atom_pf, rfl, Eq.symm, Mathlib.Tactic.Ring.Common.add_mul, Mathlib.Tactic.Ring.Common.mul_add, Mathlib.Tactic.Ring.Common.mul_pf_right, Mathlib.Meta.NormNum.IsNat.to_raw_eq, Mathlib.Meta.NormNum.isNat_mul and 33 more

    88 instances, coercions and auxiliary constants left out.

    Tactic trace: 12 steps

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

  20. theorem Imo1998P2.judge_pairs_card_lower_bound line 175 source

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

    Statement uses: Fintype, Nat, Eq, Fintype.card, HAdd.hAdd, HMul.hMul, OfNat.ofNat, LE.le, Finset.card, Imo1998P2.JudgePair, Finset.filter, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Finset.univ

    Proof uses: Not, of_eq_true, Eq.trans, Iff, Prod, True, congr, congrArg, Finset, Finset.filter_congr, Membership.mem, Iff.of_eq, Prod.fst, Prod.snd, SProd.sprod, eq_self, Eq.mpr, id, Int.le_of_ofNat_le_ofNat, Int and 8 more

    51 instances, coercions and auxiliary constants left out.

    Tactic trace: 12 steps

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

  21. theorem Imo1998P2.distinct_judge_pairs_card_lower_bound line 186 source

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

    Statement uses: Fintype, Nat, Eq, Fintype.card, HAdd.hAdd, HMul.hMul, OfNat.ofNat, LE.le, Finset.card, Imo1998P2.JudgePair, Finset.filter, And, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.Distinct, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, Finset.univ

    Proof uses: Finset, Imo1998P2.judge_pairs_card_lower_bound, SDiff.sdiff, Finset.diag, Finset.ext, Iff.intro, Membership.mem, of_eq_true, Prod, Eq.trans, Prod.fst, Prod.snd, True, congr, congrArg, id, Iff, Eq.mp, Not, congrFun' and 21 more

    35 instances, coercions and auxiliary constants left out.

    Tactic trace: 23 steps

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

  22. theorem Imo1998P2.A_card_lower_bound line 202 source

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

    Statement uses: Fintype, Nat, Eq, Fintype.card, HAdd.hAdd, HMul.hMul, OfNat.ofNat, LE.le, Finset.card, Imo1998P2.AgreedTriple, Imo1998P2.A

    Proof uses: Membership.mem, Finset, Finset.univ, Prod.fst, Imo1998P2.JudgePair, Finset.mem_univ, Finset.mul_card_image_le_card_of_maps_to, Eq.mpr, Finset.filter, And, Imo1998P2.JudgePair.Agree, Imo1998P2.JudgePair.Distinct, Imo1998P2.JudgePair.judge₁, Imo1998P2.JudgePair.judge₂, id, congrArg, Imo1998P2.AgreedTriple.contestant, Eq.symm, Imo1998P2.A_fibre_over_contestant_card, Imo1998P2.distinct_judge_pairs_card_lower_bound

    19 instances, coercions and auxiliary constants left out.

    Tactic trace: 7 steps

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

  23. theorem Imo1998P2.clear_denominators line 212 source

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Iff, LE.le, Rat, HDiv.hDiv, HSub.hSub, HMul.hMul

    Proof uses: Eq.mpr, id, Eq, congrArg, propext, div_le_div_iff₀, of_eq_true, Eq.trans, True, eq_true, eq_of_heq, HEq, Eq.refl, HEq.refl, Eq.symm, LE, Nat.cast_mul, congrFun', Nat.cast_pred, eq_self and 1 more

    86 instances, coercions and auxiliary constants left out.

    Tactic trace: 9 steps

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

  24. problem Imo1998P2.imo1998_p2 line 225 source

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

    Statement uses: Fintype, Nat, Eq, Fintype.card, LT.lt, OfNat.ofNat, Odd, Imo1998P2.JudgePair, Imo1998P2.JudgePair.Distinct, LE.le, Finset.card, Imo1998P2.agreedContestants, Rat, HDiv.hDiv, HSub.hSub, HMul.hMul

    Proof uses: Eq.mpr, id, congrArg, propext, Imo1998P2.clear_denominators, Odd.pos, HAdd.hAdd, le_trans, Imo1998P2.AgreedTriple, Imo1998P2.A, Imo1998P2.A_card_lower_bound, Eq.mp, Imo1998P2.A_card_upper_bound, congr, Eq.trans, congrFun', mul_comm, add_mul, one_mul, add_tsub_cancel_right and 36 more

    95 instances, coercions and auxiliary constants left out.

    Tactic trace: 15 steps

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