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

International Mathematical Olympiad 2001, Problem 3

Twenty-one girls and twenty-one boys took part in a mathematical competition. It turned out that each contestant solved at most six problems, and for each pair of a girl and a boy, there was at most one problem solved by both the girl and the boy. Show that there was a problem solved by at least three girls and at least three boys.

Imports (6)
Imported by 1 file
  1. def Imo2001P3.Easy A problem is easy for a cohort (boys or girls) if at least three of its members solved it line 40 source

    Source documentation

    A problem is easy for a cohort (boys or girls) if at least three of its members solved it.

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

    Statement uses: Fintype, Finset, Nat

    Proof uses: LE.le, OfNat.ofNat, Finset.card, Finset.filter, Membership.mem, Finset.univ

    6 instances, coercions and auxiliary constants left out.

    def Easy {α : Type} [Fintype α] (F : α → Finset ℕ) (p : ℕ) : Prop := 3 ≤ #{i | p ∈ F i}
    …
  2. lemma Imo2001P3.card_not_easy_le_five Every contestant solved at most five problems that were not easy for the other cohort line 59 source

    Source documentation

    Every contestant solved at most five problems that were not easy for the other cohort.

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

    Statement uses: Fintype, Finset, Nat, Eq, OfNat.ofNat, Fintype.card, LE.le, Finset.card, Not, Disjoint, Finset.filter, Imo2001P3.Easy, Classical.propDecidable

    Proof uses: Decidable.byContradiction, le_antisymm, Finset.card_filter_le, LE.le.trans, Eq.mp, LT.lt, Trans.trans, Finset.sum, Membership.mem, Finset.univ, Finset.biUnion, Eq.mpr, id, congrArg, Finset.filter_true_of_mem, Eq.rec, Eq.refl, Finset.ext, of_eq_true, Iff and 27 more

    49 instances, coercions and auxiliary constants left out.

    Tactic trace: 13 steps

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

    lemma card_not_easy_le_five {α β : Type} [Fintype α]
        {β_solved : β → Finset ℕ} {α_solved : α → Finset ℕ}
        (hcard : 21 = Fintype.card α)
        {i : β} (hG : #(β_solved i) ≤ 6) (hB : ∀ j, ¬Disjoint (β_solved i) (α_solved j)) :
        #{p ∈ β_solved i | ¬Easy α_solved p} ≤ 5 := by
    …

    Mentions: Imo2001P3.Easy

  3. lemma Imo2001P3.card_not_easy_le_210 There are at most 210 girl-boy pairs who solved some problem in common that was not easy for a fixed cohort line 79 source

    Source documentation

    There are at most 210 girl-boy pairs who solved some problem in common that was not easy for a fixed cohort.

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

    Statement uses: Fintype, Eq, Nat, OfNat.ofNat, Fintype.card, Finset, LE.le, Finset.card, Not, Disjoint, Prod, Finset.filter, Exists, And, Imo2001P3.Easy, Membership.mem, Inter.inter, Prod.fst, Prod.snd, Classical.propDecidable and 1 more

    Proof uses: Trans.trans, Finset.sum, HMul.hMul, Finset.biUnion, Eq.mpr, ite, id, congr, congrArg, Finset.card_filter, Finset.sum_congr, Eq.refl, of_eq_true, SProd.sprod, Eq.trans, Prod.mk, True, congrFun', Finset.sum_product, eq_self and 25 more

    51 instances, coercions and auxiliary constants left out.

    Tactic trace: 12 steps

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

    lemma card_not_easy_le_210 {α β : Type} [Fintype α] [Fintype β]
        (hcard_α : 21 = Fintype.card α)
        (hcard_β : 21 = Fintype.card β)
        {α_solved : α → Finset ℕ} {β_solved : β → Finset ℕ}
        (hA : ∀ i, #(β_solved i) ≤ 6) (hB : ∀ i j, ¬Disjoint (β_solved i) (α_solved j)) :
        #{ij : β × α | ∃ p, ¬Easy α_solved p ∧ p ∈ β_solved ij.1 ∩ α_solved ij.2} ≤ 210 :=
    …

    Mentions: Imo2001P3.Easy

  4. problem Imo2001P3.imo2001_p3 line 105 source

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

    Statement uses: Fintype, DecidableEq, Finset, Nat, Eq, OfNat.ofNat, Fintype.card, LE.le, Finset.card, Not, Disjoint, Exists, And, Imo2001P3.Easy

    Proof uses: Eq.mpr, id, congrArg, propext, disjoint_comm, Prod, Finset.filter, Membership.mem, Inter.inter, Prod.fst, Prod.snd, Classical.propDecidable, Finset.univ, Imo2001P3.card_not_easy_le_210, LT.lt, Union.union, Finset.map, Function.Embedding.mk, Prod.swap, Prod.swap_injective and 40 more

    44 instances, coercions and auxiliary constants left out.

    Tactic trace: 12 steps

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