Skip to content

refactor: Use Nat.cast in place of Int.ofNat#63

Merged
digama0 merged 1 commit intomainfrom
nat_cast
Dec 13, 2022
Merged

refactor: Use Nat.cast in place of Int.ofNat#63
digama0 merged 1 commit intomainfrom
nat_cast

Conversation

@digama0
Copy link
Copy Markdown
Member

@digama0 digama0 commented Dec 13, 2022

This introduces the Nat.cast function (without any lemmas, purely as notation), and changes the simp normal form of Int.ofNat to Nat.cast (with an appropriate NatCast Int instance). We need to test that this works on mathlib4 before merging this.

@digama0 digama0 merged commit bf3acbb into main Dec 13, 2022
@digama0 digama0 deleted the nat_cast branch December 13, 2022 11:58
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Dec 13, 2022
This verifies that leanprover-community/batteries#63 will work in mathlib4.

Before merging this:
* [x] check that leanprover-community/batteries#63 has been merged
* [x] change `lakefile.lean` to point back to "main" for the std4 dependency
* [ ] we may want to golf the proofs where I have added `simp only [Int.ofNat_eq_coe]`, to combine these into the adjacent rw/simp.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant