leanprover-community / leanprover-community/mathlib4

Unify APIs and naming for `codRestrict`

Open
#6,679 0 comments 0 reactions 0 assignees View on GitHub

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:

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.