Compfiles/Usa1972P3.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
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
- abbrev
Usa1972P3.Digitline 29 sourceno axioms what this means
Proof uses:
Fin,OfNat.ofNat,Nat1 instances, coercions and auxiliary constants left out.
- abbrev
Usa1972P3.DigitSeqline 30 sourceno axioms what this means
Statement uses:
NatProof uses:
Fin, Usa1972P3.Digit - def
Usa1972P3.unifDistNline 32 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,PMF, Usa1972P3.DigitSeqProof uses:
PMF.uniformOfFintype,Fin, Usa1972P3.Digit,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
- def
Usa1972P3.to_nat_digitline 35 sourceno axioms what this means
Statement uses: Usa1972P3.Digit,
NatProof uses:
HAdd.hAdd,OfNat.ofNat4 instances, coercions and auxiliary constants left out.
- def
Usa1972P3.is_good_seqline 36 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa1972P3.DigitSeqProof uses:
Dvd.dvd,OfNat.ofNat,Finset.prod,Fin,Finset.univ, Usa1972P3.to_nat_digit4 instances, coercions and auxiliary constants left out.
- def
Usa1972P3.good_seqsline 37 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Set, Usa1972P3.DigitSeqProof uses:
Set.ofPred, Usa1972P3.is_good_seq - abbrev
Usa1972P3.HasEvenline 41 sourceno axioms what this means
Statement uses:
Nat, Usa1972P3.DigitSeqProof uses:
Exists,Fin,Even, Usa1972P3.to_nat_digit1 instances, coercions and auxiliary constants left out.
- abbrev
Usa1972P3.HasFiveline 42 sourceno axioms what this means
Statement uses:
Nat, Usa1972P3.DigitSeqProof uses:
Exists,Fin,Eq, Usa1972P3.to_nat_digit,OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- abbrev
Usa1972P3.NoEvenline 43 sourceno axioms what this means
Statement uses:
Nat, Usa1972P3.DigitSeqProof uses:
Fin,Not,Even, Usa1972P3.to_nat_digit1 instances, coercions and auxiliary constants left out.
- abbrev
Usa1972P3.NoFiveline 44 sourceno axioms what this means
Statement uses:
Nat, Usa1972P3.DigitSeqProof uses:
Fin,Ne, Usa1972P3.to_nat_digit,OfNat.ofNat1 instances, coercions and auxiliary constants left out.
- lemma
Usa1972P3.card_all_digitsline 46 sourcestandard 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.hPowProof 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.subtypePiEquivPi22 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.digit_dvd_five_iffline 53 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Usa1972P3.Digit,
Iff,Dvd.dvd,Nat,OfNat.ofNat, Usa1972P3.to_nat_digit,EqProof 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,congrand 25 more22 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.card_digits_noFiveline 56 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Nat,Fintype.card,Subtype, Usa1972P3.Digit,Ne, Usa1972P3.to_nat_digit,OfNat.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl10 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.card_digits_noEvenline 59 sourcestandard 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.ofNatProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl13 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.card_digits_noFive_noEvenline 62 sourcestandard 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,EvenProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.ten_dvd_iff_two_and_fiveline 65 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Iff,Dvd.dvd,OfNat.ofNat,AndProof uses:
lcm_dvd_iff5 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.two_dvd_prod_iff_hasEvenline 68 sourcestandard 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.HasEvenProof 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,Evenand 1 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.five_dvd_prod_iff_hasFiveline 73 sourcestandard 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.HasFiveProof 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_self18 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.is_good_seq_iff_hasEven_hasFiveline 78 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Usa1972P3.DigitSeq,Iff, Usa1972P3.is_good_seq,And, Usa1972P3.HasEven, Usa1972P3.HasFiveProof 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.rfl4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.card_all_noFiveline 83 sourcestandard 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.hPowProof uses:
id,Eq.mp,congrArg,congrFun', Usa1972P3.card_digits_noFive, Usa1972P3.card_all_digits24 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.card_all_noEvenline 88 sourcestandard 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.hPowProof uses:
id,Eq.mp,congrArg,congrFun', Usa1972P3.card_digits_noEven, Usa1972P3.card_all_digits26 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.card_all_noFive_noEvenline 93 sourcestandard 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.hPowProof uses:
id,Eq.mp,congr,congrArg,Fintype.card_congr',funext,congrFun', Usa1972P3.card_digits_noFive_noEven, Usa1972P3.card_all_digits31 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1972P3.card_good_balanceInclusion-exclusion on the bad events line 100 sourceSource 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.ofNatProof 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 more48 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
- lemma
Usa1972P3.ennreal_eq_sub_sub_of_add_add_eqline 130 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
ENNReal,Ne,Top.top,Eq,HAdd.hAdd,HSub.hSubProof uses:
ENNReal.eq_sub_of_add_eq10 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
- determine
Usa1972P3.solutionline 136 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ENNRealProof uses:
HSub.hSub,HAdd.hAdd,OfNat.ofNat,HPow.hPow,HDiv.hDiv23 instances, coercions and auxiliary constants left out.
- problem
Usa1972P3.usa1972_p3line 139 sourcestandard 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.solutionProof 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.cardand 54 more85 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.