leanprover-community / leanprover-community/mathlib4
Unify APIs and naming for `codRestrict`
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 4.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
The main thing that needs to be fixed is to take a global decision as to whether these should use FunLike and/or SetLike. Here are some examples in current mathlib:
- no
SetLike, noFunLike: AlgHom.codRestrict, LinearMap.codRestrict SetLikebut noFunLike: RingHom.codRestrict, MulHom.codRestrictFunLikebut noSetLike: NonUnitalStarAlgHom.codRestrict, NonUnitalAlgHom.codRestrictFunLikeandSetLike: ???
There are also naming issue, e.g AlgHom.coe_codRestrict vs LinearMap.codRestrict_apply
We should probably use this occasion to make sure that the subtype APIs are coherent too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the listed codRestrict APIs in Mathlib/Algebra/Algebra/Subalgebra/Basic, Mathlib/LinearAlgebra/Basic, Mathlib/RingTheory/Subsemiring/Basic, Mathlib/GroupTheory/Subsemigroup/Operations, and the nonunital subalgebra modules. Review the corresponding subtype APIs and existing names such as coe_codRestrict and codRestrict_apply; done means the project has an agreed, coherent convention applied across these APIs.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100