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

26 declarations, 0 contain sorry, 0 declared as axioms

USA Mathematical Olympiad 1972, Problem 3

A random number selector can only select one of the nine integers 1, 2, ..., 9, and it makes these selections with equal probability. Determine the probability that after n selections, where n > 1, the product of the n numbers selected will be divisible by 10.

Imports (3)
Imported by 1 file
  1. abbrev Usa1972P3.Digit line 29 source

    no axioms what this means

    Proof uses: Fin, OfNat.ofNat, Nat

    1 instances, coercions and auxiliary constants left out.

  2. abbrev Usa1972P3.DigitSeq line 30 source

    no axioms what this means

    Statement uses: Nat

    Proof uses: Fin, Usa1972P3.Digit

  3. def Usa1972P3.unifDistN line 32 source

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

    Statement uses: Nat, PMF, Usa1972P3.DigitSeq

    Proof uses: PMF.uniformOfFintype, Fin, Usa1972P3.Digit, OfNat.ofNat

    5 instances, coercions and auxiliary constants left out.

  4. def Usa1972P3.to_nat_digit line 35 source

    no axioms what this means

    Statement uses: Usa1972P3.Digit, Nat

    Proof uses: HAdd.hAdd, OfNat.ofNat

    4 instances, coercions and auxiliary constants left out.

  5. def Usa1972P3.is_good_seq line 36 source

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

    Statement uses: Nat, Usa1972P3.DigitSeq

    Proof uses: Dvd.dvd, OfNat.ofNat, Finset.prod, Fin, Finset.univ, Usa1972P3.to_nat_digit

    4 instances, coercions and auxiliary constants left out.

  6. def Usa1972P3.good_seqs line 37 source

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

    Statement uses: Nat, Set, Usa1972P3.DigitSeq

    Proof uses: Set.ofPred, Usa1972P3.is_good_seq

  7. abbrev Usa1972P3.HasEven line 41 source

    no axioms what this means

    Statement uses: Nat, Usa1972P3.DigitSeq

    Proof uses: Exists, Fin, Even, Usa1972P3.to_nat_digit

    1 instances, coercions and auxiliary constants left out.

  8. abbrev Usa1972P3.HasFive line 42 source

    no axioms what this means

    Statement uses: Nat, Usa1972P3.DigitSeq

    Proof uses: Exists, Fin, Eq, Usa1972P3.to_nat_digit, OfNat.ofNat

    1 instances, coercions and auxiliary constants left out.

  9. abbrev Usa1972P3.NoEven line 43 source

    no axioms what this means

    Statement uses: Nat, Usa1972P3.DigitSeq

    Proof uses: Fin, Not, Even, Usa1972P3.to_nat_digit

    1 instances, coercions and auxiliary constants left out.

  10. abbrev Usa1972P3.NoFive line 44 source

    no axioms what this means

    Statement uses: Nat, Usa1972P3.DigitSeq

    Proof uses: Fin, Ne, Usa1972P3.to_nat_digit, OfNat.ofNat

    1 instances, coercions and auxiliary constants left out.

  11. lemma Usa1972P3.card_all_digits line 46 source

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

    Statement uses: Nat, Usa1972P3.Digit, DecidablePred, Eq, Fintype.card, Subtype, Usa1972P3.DigitSeq, Fin, OfNat.ofNat, HPow.hPow

    Proof uses: id, Eq.mp, congrArg, Eq.trans, Finset.prod, Finset.univ, Fintype.card_pi, Finset.card, Finset.prod_const, Fintype.card_fin, Fintype.card_congr, Equiv.subtypePiEquivPi

    22 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  12. lemma Usa1972P3.digit_dvd_five_iff line 53 source

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

    Statement uses: Usa1972P3.Digit, Iff, Dvd.dvd, Nat, OfNat.ofNat, Usa1972P3.to_nat_digit, Eq

    Proof uses: List, List.Mem, Fin, List.finRange, HEq, Membership.mem, Finset, Fintype.elems, Fintype.complete, List.cons, List.Mem.head, Fin.mk, Nat.le_of_lt, Nat.le_refl, List.nil, of_eq_true, Eq.trans, True, False, congr and 25 more

    22 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  13. lemma Usa1972P3.card_digits_noFive line 56 source

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

    Statement uses: Eq, Nat, Fintype.card, Subtype, Usa1972P3.Digit, Ne, Usa1972P3.to_nat_digit, OfNat.ofNat

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    10 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  14. lemma Usa1972P3.card_digits_noEven line 59 source

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

    Statement uses: Eq, Nat, Fintype.card, Subtype, Usa1972P3.Digit, Not, Even, Usa1972P3.to_nat_digit, OfNat.ofNat

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    13 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  15. lemma Usa1972P3.card_digits_noFive_noEven line 62 source

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

    Statement uses: Eq, Nat, Fintype.card, Subtype, Usa1972P3.Digit, And, Ne, Usa1972P3.to_nat_digit, OfNat.ofNat, Not, Even

    Proof uses: of_decide_eq_true, id, Bool, Decidable.decide, Bool.true, Eq.refl

    16 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  16. lemma Usa1972P3.ten_dvd_iff_two_and_five line 65 source

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

    Statement uses: Nat, Iff, Dvd.dvd, OfNat.ofNat, And

    Proof uses: lcm_dvd_iff

    5 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  17. lemma Usa1972P3.two_dvd_prod_iff_hasEven line 68 source

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

    Statement uses: Nat, Usa1972P3.DigitSeq, Iff, Dvd.dvd, OfNat.ofNat, Finset.prod, Fin, Finset.univ, Usa1972P3.to_nat_digit, Usa1972P3.HasEven

    Proof uses: Eq.mpr, Exists, And, Membership.mem, Finset, id, Eq, congrArg, propext, Prime.dvd_finsetProd_iff, Nat.Prime.prime, Nat.prime_two, of_eq_true, Eq.trans, True, congr, funext, congrFun', true_and, Even and 1 more

    31 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  18. lemma Usa1972P3.five_dvd_prod_iff_hasFive line 73 source

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

    Statement uses: Nat, Usa1972P3.DigitSeq, Iff, Dvd.dvd, OfNat.ofNat, Finset.prod, Fin, Finset.univ, Usa1972P3.to_nat_digit, Usa1972P3.HasFive

    Proof uses: Eq.mpr, Exists, And, Membership.mem, Finset, id, Eq, congrArg, propext, Prime.dvd_finsetProd_iff, Nat.Prime.prime, Nat.prime_five, of_eq_true, Eq.trans, True, congrFun', funext, congr, true_and, iff_self

    18 instances, coercions and auxiliary constants left out.

    Tactic trace: 2 steps

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

  19. lemma Usa1972P3.is_good_seq_iff_hasEven_hasFive line 78 source

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

    Statement uses: Nat, Usa1972P3.DigitSeq, Iff, Usa1972P3.is_good_seq, And, Usa1972P3.HasEven, Usa1972P3.HasFive

    Proof uses: Eq.mpr, Dvd.dvd, OfNat.ofNat, Finset.prod, Fin, Finset.univ, Usa1972P3.to_nat_digit, id, Eq, congrArg, Usa1972P3.is_good_seq.eq_1, propext, Usa1972P3.ten_dvd_iff_two_and_five, Usa1972P3.two_dvd_prod_iff_hasEven, Usa1972P3.five_dvd_prod_iff_hasFive, Iff.rfl

    4 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  20. lemma Usa1972P3.card_all_noFive line 83 source

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

    Statement uses: Nat, Eq, Fintype.card, Subtype, Usa1972P3.DigitSeq, Usa1972P3.NoFive, Fin, Ne, Usa1972P3.to_nat_digit, OfNat.ofNat, Usa1972P3.Digit, HPow.hPow

    Proof uses: id, Eq.mp, congrArg, congrFun', Usa1972P3.card_digits_noFive, Usa1972P3.card_all_digits

    24 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  21. lemma Usa1972P3.card_all_noEven line 88 source

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

    Statement uses: Nat, Eq, Fintype.card, Subtype, Usa1972P3.DigitSeq, Usa1972P3.NoEven, Fin, Not, Even, Usa1972P3.to_nat_digit, Usa1972P3.Digit, OfNat.ofNat, HPow.hPow

    Proof uses: id, Eq.mp, congrArg, congrFun', Usa1972P3.card_digits_noEven, Usa1972P3.card_all_digits

    26 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  22. lemma Usa1972P3.card_all_noFive_noEven line 93 source

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

    Statement uses: Nat, Eq, Fintype.card, Subtype, Usa1972P3.DigitSeq, And, Usa1972P3.NoFive, Usa1972P3.NoEven, Fin, Ne, Usa1972P3.to_nat_digit, OfNat.ofNat, Not, Even, Usa1972P3.Digit, HPow.hPow

    Proof uses: id, Eq.mp, congr, congrArg, Fintype.card_congr', funext, congrFun', Usa1972P3.card_digits_noFive_noEven, Usa1972P3.card_all_digits

    31 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  23. lemma Usa1972P3.card_good_balance Inclusion-exclusion on the bad events line 100 source

    Source comment

    Inclusion-exclusion on the bad events.

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

    Statement uses: Nat, Eq, HAdd.hAdd, Set.ncard, Usa1972P3.DigitSeq, Set.ofPred, Usa1972P3.is_good_seq, HPow.hPow, OfNat.ofNat

    Proof uses: Set, Usa1972P3.NoFive, Usa1972P3.NoEven, Compl.compl, Union.union, Set.ext, Eq.mpr, Iff, Membership.mem, And, Exists, Fin, Even, Usa1972P3.to_nat_digit, id, congr, congrArg, congrFun', funext, Usa1972P3.HasEven and 37 more

    48 instances, coercions and auxiliary constants left out.

    Tactic trace: 27 steps

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

    lemma card_good_balance (n : ℕ) :
        {s : DigitSeq n | is_good_seq s}.ncard + 8 ^ n + 5 ^ n = 9 ^ n + 4 ^ n := by
    …

    Mentions: Usa1972P3.DigitSeq, Usa1972P3.is_good_seq

  24. lemma Usa1972P3.ennreal_eq_sub_sub_of_add_add_eq line 130 source

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

    Statement uses: ENNReal, Ne, Top.top, Eq, HAdd.hAdd, HSub.hSub

    Proof uses: ENNReal.eq_sub_of_add_eq

    10 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

  25. determine Usa1972P3.solution line 136 source

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

    Statement uses: Nat, ENNReal

    Proof uses: HSub.hSub, HAdd.hAdd, OfNat.ofNat, HPow.hPow, HDiv.hDiv

    23 instances, coercions and auxiliary constants left out.

  26. problem Usa1972P3.usa1972_p3 line 139 source

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

    Statement uses: Nat, LT.lt, OfNat.ofNat, Eq, ENNReal, MeasureTheory.OuterMeasure, Usa1972P3.DigitSeq, Set, PMF.toOuterMeasure, Usa1972P3.unifDistN, Usa1972P3.good_seqs, Usa1972P3.solution

    Proof uses: HAdd.hAdd, Set.ncard, Set.ofPred, Usa1972P3.is_good_seq, HPow.hPow, Usa1972P3.card_good_balance, Eq.mpr, PMF.uniformOfFintype, Fin, Usa1972P3.Digit, id, congrArg, PMF, Usa1972P3.unifDistN.eq_1, PMF.uniformOfFinset, Finset.univ, Finset.univ_nonempty, PMF.uniformOfFintype.eq_1, HDiv.hDiv, Finset.card and 54 more

    85 instances, coercions and auxiliary constants left out.

    Tactic trace: 16 steps

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