leanprover-community / leanprover-community/mathlib4

RFC: Standardise naming for instances

Open
#31,370 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

RFC
Dominant language
Lean
Stars
4.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Currently, we have 300+ instances with a manual name like instance instCommGroup : CommGroup _, and 700+ instances with a manual name that does not contain inst.

I think not having a standardised policy for these names can create confusion, so I urge the community to decide on one standard for the future.

Arguments for inst:

  • Kenny (the author) thinks that this is more consistent with the automatically generated names, which reduces the burden on the user when trying to guess the name, as it is inefficient to first try Rat.commRing and then Rat.instCommRing.

Arguments against inst:

  • Andrew Yang thinks that the automatically generated names are intentionally different to discourage people from mentioning them.

There also seem to be people with the opinion that we should not have explicit instance names at all, which is also one possible option.

Zulip: mathlib4 > naming convention: "inst" in instance names

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked instance-name search results and the Zulip discussion on the naming convention. The work is done when the community reaches a documented decision on a standard for explicit instance names and the issue records that decision.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.