leanprover-community / leanprover-community/mathlib4
extended binders don't automatically delaborate.
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 4.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
import Mathlib
variable (α β : Type) [AddCommMonoid β] (s : Set α) (f : α → β) in
#check ∑ᶠ a ∈ s, f a -- ∑ᶠ (a : α) (_ : a ∈ s), f a : β
The ∑ᶠ notation is currently defined using notation3 but when using it for summing over a set rather than a type, delaboration prints the sum as over the type then the set. See for example https://github.com/leanprover-community/mathlib4/pull/22048 , a PR writing an analogous delaborator for Finset.sum over a set.
Note that Mathlib/Util/Delaborators.lean currently contains some ad hoc delaborators, but it would be nice to work out a general system whereby notation3 is able to delaborate extended binders.
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 with the reproduction in the issue and read Mathlib/Util/Delaborators.lean, then compare the analogous Finset.sum delaborator in pull request 22048. The work is done when extended binders such as sums over sets delaborate naturally through a general notation3 system rather than ad hoc cases.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100