Mathlib v3 is deprecated. Go to Mathlib v4

Commit 2020-05-09 20:30 b7698468

View on Github →

feat(tactic/norm_num): new all-lean norm_num (#2589) This is a first draft of the lean replacement for tactic.norm_num in core. This isn't completely polished yet; the rest of norm_num can now be a little less "global-recursive" since the primitives for e.g. adding and multiplying natural numbers are exposed. I'm also trying out a new approach using functions like match_neg and match_numeral instead of directly pattern matching on exprs, because this generates smaller (and hopefully more efficient) code. (Without this, some of the matches were hitting the equation compiler depth limit.) I'm open to new feature suggestions as well here. nat.succ and coercions seem useful to support in the core part, and additional flexibility using def_replacer is also on the agenda.

Estimated changes

added theorem norm_num.adc_bit0_bit0
added theorem norm_num.adc_bit0_bit1
added theorem norm_num.adc_bit0_one
added theorem norm_num.adc_bit1_bit0
added theorem norm_num.adc_bit1_bit1
added theorem norm_num.adc_bit1_one
added theorem norm_num.adc_one_bit0
added theorem norm_num.adc_one_bit1
added theorem norm_num.adc_one_one
added theorem norm_num.adc_zero
added theorem norm_num.add_bit0_bit0
added theorem norm_num.add_bit0_bit1
added theorem norm_num.add_bit1_bit0
added theorem norm_num.add_bit1_bit1
added theorem norm_num.add_neg_neg
added theorem norm_num.bit0_mul
added theorem norm_num.bit0_succ
deleted theorem norm_num.bit0_zero
added theorem norm_num.bit1_succ
deleted theorem norm_num.bit1_zero
added theorem norm_num.div_eq
added theorem norm_num.dvd_eq_int
added theorem norm_num.dvd_eq_nat
added theorem norm_num.from_nat_pow
added theorem norm_num.int_cast_bit0
added theorem norm_num.int_cast_bit1
added theorem norm_num.int_cast_ne
added theorem norm_num.int_cast_neg
added theorem norm_num.int_cast_one
added theorem norm_num.int_cast_zero
added theorem norm_num.int_div
deleted theorem norm_num.int_div_helper
added theorem norm_num.int_div_neg
added theorem norm_num.int_mod
deleted theorem norm_num.int_mod_helper
added theorem norm_num.int_mod_neg
added theorem norm_num.inv_div
added theorem norm_num.inv_div_one
added theorem norm_num.inv_neg
added theorem norm_num.inv_one
added theorem norm_num.inv_one_div
added theorem norm_num.le_bit0_bit0
added theorem norm_num.le_bit0_bit1
added theorem norm_num.le_bit1_bit0
added theorem norm_num.le_bit1_bit1
added theorem norm_num.le_neg_pos
added theorem norm_num.le_one_bit0
added theorem norm_num.le_one_bit1
added theorem norm_num.lt_bit0_bit0
added theorem norm_num.lt_bit0_bit1
added theorem norm_num.lt_bit1_bit0
added theorem norm_num.lt_bit1_bit1
added theorem norm_num.lt_neg_pos
added theorem norm_num.lt_one_bit0
added theorem norm_num.lt_one_bit1
modified theorem norm_num.min_fac_helper_3
modified theorem norm_num.min_fac_helper_4
added theorem norm_num.mul_bit0'
added theorem norm_num.mul_bit0_bit0
added theorem norm_num.mul_bit1_bit1
added theorem norm_num.mul_neg_neg
added theorem norm_num.mul_neg_pos
added theorem norm_num.mul_pos_neg
added theorem norm_num.nat_cast_bit0
added theorem norm_num.nat_cast_bit1
added theorem norm_num.nat_cast_ne
added theorem norm_num.nat_cast_one
added theorem norm_num.nat_cast_zero
added theorem norm_num.nat_div
deleted theorem norm_num.nat_div_helper
added theorem norm_num.nat_mod
deleted theorem norm_num.nat_mod_helper
added theorem norm_num.nat_succ_eq
added theorem norm_num.ne_zero_neg
added theorem norm_num.nonneg_pos
added theorem norm_num.one_add
added theorem norm_num.one_succ
added theorem norm_num.pow_bit0
deleted theorem norm_num.pow_bit0_helper
added theorem norm_num.pow_bit1
deleted theorem norm_num.pow_bit1_helper
added theorem norm_num.rat_cast_bit0
added theorem norm_num.rat_cast_bit1
added theorem norm_num.rat_cast_div
added theorem norm_num.rat_cast_ne
added theorem norm_num.rat_cast_neg
added theorem norm_num.sle_bit0_bit0
added theorem norm_num.sle_bit0_bit1
added theorem norm_num.sle_bit1_bit0
added theorem norm_num.sle_bit1_bit1
added theorem norm_num.sle_one_bit0
added theorem norm_num.sle_one_bit1
added theorem norm_num.sub_nat_neg
added theorem norm_num.sub_nat_pos
added theorem norm_num.sub_neg
added theorem norm_num.sub_pos
added theorem norm_num.zero_adc
added theorem norm_num.zero_succ