Compfiles/Imo2022P5.lean
14 declarations, 0 contain sorry, 0 declared as axioms
International Mathematical Olympiad 2022, Problem 5
Determine all possible triples of positive integers a,b,p that satisfy
aᵖ = b! + p
where p is prime.
Imports (2)
Imported by 1 file
- lemma
Imo2022P5.mylemma_1line 36 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,HAdd.hAdd,HMul.hMul,HPow.hPowProof uses:
Nat.le_induction,Eq.mpr,id,Eq,congr,congrArg,Eq.trans,Nat.rawCast,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Tactic.Ring.Common.mul_congr,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_left,Mathlib.Meta.NormNum.IsNat.to_raw_eqand 37 more53 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_3line 51 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,Eq,HPow.hPow,HAdd.hAdd,Nat.factorial,LE.le,Dvd.dvdProof uses:
Nat.dvd_factorial,Nat.Prime.pos,Iff.mpr,Nat.dvd_add_self_right,Eq.mpr,id,congrArg,Nat.Prime.dvd_of_dvd_pow16 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_42line 65 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,LT.lt,HAdd.hAdd,HMul.hMulProof uses:
add_lt_add_left,Eq.mpr,id,Eq,congrArg,Eq.symm,two_mul,mul_le_mul_left,lt_of_le_of_lt'50 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_43line 76 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Finset.prod,Finset.Ico,HSub.hSub,HMul.hMul,OfNat.ofNat,HAdd.hAdd,Finset.rangeProof uses:
Eq.mpr,id,congrArg,Finset.prod_Ico_eq_prod_range,rfl21 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_44line 84 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Eq,Finset.prod,Finset.range,HSub.hSub,HAdd.hAddProof uses:
Nat.le_induction,Mathlib.Meta.NormNum.isNat_eq_true,Eq.rec,Finset.cons,Finset.notMem_range_self,Mathlib.Meta.NormNum.IsNat,HMul.hMul,Mathlib.Meta.NormNum.isNat_mul,Eq.refl,Mathlib.Meta.NormNum.isNat_add,Mathlib.Meta.NormNum.IsNat.raw_refl,Mathlib.Meta.NormNum.isNat_ofNat,Finset.empty,Mathlib.Meta.NormNum.Finset.prod_empty,Eq.symm,congr_fun,EmptyCollection.emptyCollection,Finset,congr_arg,Mathlib.Meta.Finset.range_zero'and 46 more73 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_41line 104 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,LT.lt,HMul.hMul,OfNat.ofNat,HAdd.hAdd,Nat.factorial,HPow.hPowProof uses:
LE.le,HSub.hSub,Nat.factorial_le,Nat.le_pred_of_lt,Nat.sub,Nat.Prime.two_le,Eq,Nat.sub_add_cancel,Nat.one_le_of_lt,Finset.prod,Finset.range,Finset.Ico,Eq.symm,Finset.prod_range_mul_prod_Ico,Finset.prod_range_succ,Eq.mpr,id,congrArg, Imo2022P5.mylemma_43, Imo2022P5.mylemma_44 and 38 more64 instances, coercions and auxiliary constants left out.
Tactic trace: 60 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_4line 178 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,And,LT.lt,OfNat.ofNat,Nat.Prime,Eq,HPow.hPow,HAdd.hAdd,Nat.factorial,LE.le,Dvd.dvd,HMul.hMulProof uses:
Nat.le_of_dvd,And.left,Or,lt_or_eq_of_le,False.elim,False,Nat.pos_of_mul_pos_left,Nat.lt_of_lt_of_eq,Nat.zero_lt_of_lt,dite,dvd_pow_self,Eq.mpr,id,congrArg,mul_pow,dvd_mul_of_dvd_right,Nat.dvd_factorial,HSub.hSub,Nat.dvd_sub,Iff.mpand 10 more56 instances, coercions and auxiliary constants left out.
Tactic trace: 39 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_53line 220 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,Int.ModEq,HPow.hPow,Int,HAdd.hAdd,HMul.hMul,Neg.neg,HSub.hSubProof uses:
Eq,of_eq_true,Eq.trans,True,congrArg,add_sub_cancel_right,eq_self,Eq.mpr,id,Eq.symm,Int.ModEq.refl,Finset.sum,Finset.Ico,Nat.choose,sub_eq_add_neg,Finset.range,add_pow,one_le_two,Finset.sum_range_add_sum_Ico,congrFun'and 69 more102 instances, coercions and auxiliary constants left out.
Tactic trace: 26 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_52line 259 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,LE.le,OfNat.ofNat,Dvd.dvd,HPow.hPow,HAdd.hAdd,HSub.hSub,FalseProof uses:
Int.ModEq,Int,HMul.hMul,Nat.choose,Neg.neg,Int.ModEq.sub_right,Eq.mpr,id,Eq,congr,congrFun',congrArg,Eq.trans,Nat.cast_add,Nat.cast_one,Nat.choose_one_right, Imo2022P5.mylemma_53,Odd,Nat.Prime.odd_of_ne_two,Not.introand 90 more140 instances, coercions and auxiliary constants left out.
Tactic trace: 65 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_51line 328 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,LT.lt,HAdd.hAdd,Nat.factorial,HPow.hPowProof uses:
Nat.le_induction,Nat.lt_of_sub_eq_succ,rfl,HSub.hSub,Eq,HMul.hMul,Eq.mpr,id,congrArg,add_mul,one_mul,Nat.factorial_succ,add_comm,mul_comm,Eq.refl,pow_add,pow_one,Nat.mul_lt_mul_of_pos_right,Nat.pow_lt_pow_left,lt_add_one57 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_5line 346 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,LE.le,Eq,HPow.hPow,HAdd.hAdd,Nat.factorial,OfNat.ofNat,FalseProof uses:
dite,LT.lt, Imo2022P5.mylemma_51,False.elim,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.Common.add_congr,Int.rawCast,inferInstance,Ring,Int.negOfNat,HMul.hMul,Nat.rawCast,Mathlib.Tactic.Ring.Common.neg_congr,Mathlib.Tactic.Ring.cast_posand 112 more124 instances, coercions and auxiliary constants left out.
Tactic trace: 51 steps
Open to load the checked before-and-after goal states.
- lemma
Imo2022P5.mylemma_6line 401 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,Dvd.dvd,LE.le,HMul.hMul,OfNat.ofNat,HPow.hPow,HSub.hSub,Nat.factorialProof uses:
pow_dvd_pow_of_dvd,Nat.Prime.two_le,Nat.pow_dvd_of_le_of_pow_dvd,Nat.factorial_dvd_factorial,HAdd.hAdd,Nat.factorial_mul_factorial_dvd_factorial_add,Nat.dvd_factorial,dvd_trans,Eq.mp,congrArg,Eq.symm,two_mul,pow_two,Nat.dvd_sub40 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
- determine
Imo2022P5.solution_setline 422 sourceno axioms what this means
Statement uses:
Set,Prod,NatProof uses:
Insert.insert,Prod.mk,OfNat.ofNat,Singleton.singleton3 instances, coercions and auxiliary constants left out.
- problem
Imo2022P5.imo2022_p5line 424 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,Nat.Prime,Iff,Membership.mem,Prod,Set, Imo2022P5.solution_set,Prod.mk,Eq,HPow.hPow,HAdd.hAdd,Nat.factorialProof uses:
Iff.intro,And,Or,Eq.mp,congr,congrArg,Eq.trans,Prod.mk.injEq,Insert.insert,Singleton.singleton,of_eq_true,True,eq_self,Eq.mpr,id,HSub.hSub,Nat.Simproc.eq_add_le,of_decide_eq_true,LE.le,Eq.refland 120 more116 instances, coercions and auxiliary constants left out.
Tactic trace: 100 steps
Open to load the checked before-and-after goal states.