forked from leanprover-community/mathlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(data/fin): add some lemmas about coercions (leanprover-community…
…#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.
- Loading branch information
1 parent
ac2a3af
commit fa8172e
Showing
4 changed files
with
70 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters