Congruence lemmas are not used for partially applied functions
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
The two examples below fail, but work if you replace Nat → Nat by Nat.
opaque partiallyApplied (p : Prop) [Decidable p] : Nat → Nat
example : partiallyApplied (True ∧ True) = partiallyApplied True := by
simp
example : partiallyApplied (True ∧ True) = partiallyApplied True := by
congr
decide
As reported on Zulip: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/mkCongrSimp.3F.20error.20for.20Set/near/338881269
This is causing issues in mathlib because Set α is defined as α → Prop, so a lot of terms are actually partially-applied functions, like for example Set.image f s.
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
Reproduce the two failing examples from the issue, including the partiallyApplied definition, and compare them with the working Nat case. Start by tracing the congruence and mkCongrSimp behavior implicated by the report; done means both examples succeed without replacing Nat → Nat and the behavior also covers partially applied terms such as Set.image f s.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100