mathlib4 icon indicating copy to clipboard operation
mathlib4 copied to clipboard

chore: Rename `nat_cast`/`int_cast`/`rat_cast` to `natCast`/`intCast`/`ratCast`

Open YaelDillies opened this issue 3 months ago • 2 comments

Now that I am defining NNRat.cast, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast/intCast/ratCast over nat_cast/int_cast/rat_cast, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.


Open in Gitpod

YaelDillies avatar Mar 18 '24 16:03 YaelDillies

Let's solicit a few more votes on https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/naming.20conventions.3A.20natCast.20vs.20nat_cast/near/346323810 first.

eric-wieser avatar Mar 18 '24 23:03 eric-wieser

Seems like there's a majority in favour

YaelDillies avatar Mar 19 '24 09:03 YaelDillies

Please make a PR to update the naming guide to explicitly record this clarification to the naming convention; if we're going to make this sweeping a change, we should make sure it's documented as the preferred naming convention.

eric-wieser avatar Apr 06 '24 21:04 eric-wieser

https://github.com/leanprover-community/leanprover-community.github.io/pull/459

YaelDillies avatar Apr 07 '24 14:04 YaelDillies

bors d+

semorrison avatar Apr 17 '24 07:04 semorrison

:v: YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

mathlib-bors[bot] avatar Apr 17 '24 07:04 mathlib-bors[bot]

bors merge

YaelDillies avatar Apr 17 '24 11:04 YaelDillies

Pull request successfully merged into master.

Build succeeded:

mathlib-bors[bot] avatar Apr 17 '24 12:04 mathlib-bors[bot]