leanprover-community / leanprover-community/mathlib4
Add global pull lemmas
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 4.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Some lemmas in mathlib could be global pull lemmas, but we would not like them as push lemmas: Function.comp_def is such an example. As a pull lemma, it expands g ∘ f to fun x => g (f x); there is no apparent use for the converse.
This appears when using the to_fun attribute to generate eta-expanded versions of some statements: in a number of places, we do attribute [local push ←] Function.comp_def to make to_fun behave the way we want. All these locations could benefit from this feature.
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 searching mathlib4 for the local push ← uses of Function.comp_def and inspect how the to_fun attribute consumes these lemmas. Trace the attribute mechanism to determine how a global pull lemma should be registered, then verify that the affected eta-expansion cases work without the local attributes.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100