Commit 2024-05-16 08:10 2bff2343

View on Github →

chore: Move basic Int lemmas earlier (#12821) A bunch of lemmas about Int can be moved to Data.Int.Defs at little cost. This PR moves them and deletes the now empty Data.Int.Div and Data.Int.Dvd.Basic. The story is that those lemmas used to rely on lemmas proved for algebraic order structures, hence required the algebraic order instances on Int to be available. In Lean 4, those preliminary lemmas have been special-cased to Nat and Int, so there is no need for the general instances anymore (at least in basic files).

Estimated changes

deleted theorem Int.ediv_dvd_ediv
deleted theorem Int.ediv_dvd_of_dvd
deleted theorem Int.le_add_one_iff
deleted theorem Int.le_sub_one_iff
deleted theorem Int.lt_of_toNat_lt
deleted theorem Int.lt_succ_self
deleted theorem Int.lt_toNat
deleted theorem Int.natAbs_eq_of_dvd_dvd
deleted theorem Int.natCast_nonpos_iff
deleted theorem Int.neg_emod_two
deleted theorem Int.pred_self_lt
deleted theorem Int.sub_one_lt_iff
deleted theorem Int.toNat_eq_zero
deleted theorem Int.toNat_le
deleted theorem Int.toNat_le_toNat
deleted theorem Int.toNat_lt_toNat
deleted theorem Int.toNat_pred_coe_of_pos
deleted theorem Int.toNat_sub_of_le
deleted theorem Int.coe_nat_pow
deleted theorem Int.natCast_pos
deleted theorem Int.natCast_succ_pos
deleted theorem Int.natMod_lt
deleted theorem Int.toNat_lt'
added theorem Int.cast_id
added theorem Int.coe_nat_pow
added theorem Int.dvd_natCast
added theorem Int.ediv_dvd_ediv
added theorem Int.ediv_dvd_of_dvd
added theorem Int.le_add_one_iff
added theorem Int.le_sub_one_iff
added theorem Int.lt_of_toNat_lt
added theorem Int.lt_succ_self
added theorem Int.lt_toNat
added theorem Int.natAbs_ediv
modified theorem Int.natAbs_ofNat'
added theorem Int.natCast_dvd
modified theorem Int.natCast_eq_zero
modified theorem Int.natCast_inj
added theorem Int.natCast_nonpos_iff
added theorem Int.natCast_pos
added theorem Int.natCast_succ_pos
added theorem Int.natMod_lt
added theorem Int.neg_emod_two
modified theorem Int.ofNat_eq_natCast
added theorem Int.pred_self_lt
modified theorem Int.sign_natCast_of_ne_zero
added theorem Int.sub_one_lt_iff
added theorem Int.toNat_eq_zero
added theorem Int.toNat_le
added theorem Int.toNat_le_toNat
added theorem Int.toNat_lt'
added theorem Int.toNat_lt_toNat
added theorem Int.toNat_sub_of_le