(kernel) application type mismatch in `cbv` with `ite_true`
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Description
In Lean v4.35.0-rc1, this cbv:
example :
(if True then some 2 else none) = some 2 := by
cbv
triggers the following error:
(kernel) application type mismatch
ite_true
argument has type
Option Nat
but function has type
∀ {x : Decidable True} (a b : Option Nat), (if True then a else b) = a
Steps to Reproduce
Here is a live.lean-lang.org link:
https://live.lean-lang.org/#codez=KYDwhgtgDgNsAEAuAUPN8AUBLAZvAKgE4CuCALgBbAB28AzgPYQIBM8wMdC1D1wAlPAC89JqyQiARgE9U8AMaSAbkA
Versions
This fails on lean version v4.35.0-rc1, and has no errors in lean version v4.34.0
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
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 live.lean-lang.org reproduction and compare behavior between Lean v4.35.0-rc1 and v4.34.0. Trace the cbv handling of the ite_true reduction and its kernel application type checking; done means the example elaborates and reduces without the reported mismatch while preserving the older behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100