Mathlib v3 is deprecated. Go to Mathlib v4

Commit 2020-04-28 15:02 f6c93723

View on Github →

feat(data/fin): add some lemmas about coercions (#2522) Two of these lemmas allow norm_cast to work with inequalities involving fin values converted to ℕ. The rest are for simplifying expressions where coercions are used to convert from ℕ to fin, in cases where an inequality means those coercions do not in fact change the value. There are very few lemmas relating to coercions from ℕ to fin in mathlib at present; the lemma of_nat_eq_coe (and val_add on which it depends, and a few similarly trivial lemmas alongside val_add) is moved from data.zmod.basic to fin.basic for use in proving the other lemmas, while the nat lemma add_mod is moved to data.nat.basic for use in the proof of of_nat_eq_coe, and mul_mod is moved alongside it as suggested in review. These lemmas were found useful in formalising solutions to an olympiad problem, see https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Some.20olympiad.20formalisations, and seem more generally relevant than to just that particular problem.

Estimated changes

added theorem fin.coe_coe_eq_self
added theorem fin.coe_coe_of_lt
added theorem fin.coe_fin_le
added theorem fin.coe_fin_lt
added theorem fin.coe_val_eq_self
added theorem fin.coe_val_of_lt
added theorem fin.of_nat_eq_coe
added theorem fin.one_val
added theorem fin.val_add
added theorem fin.val_mul
added theorem fin.zero_val
deleted theorem fin.of_nat_eq_coe
deleted theorem fin.one_val
deleted theorem fin.val_add
deleted theorem fin.val_mul
deleted theorem fin.zero_val