`whnf` generates raw Nat literal, `omega` doesn't understand it
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Description
omega is not able to discharge 6 < 10 when 6 : Nat is represented by a raw literal.
Such a raw literal can be produced with whnf as follows:
example : [1,2,3].sum < 10 := by
conv in List.sum _ => whnf
-- simp only
omega
Steps to Reproduce
Check the program above
Expected behavior: omega succeeds
Actual behavior: omega fails
Including the simp only rewrites the raw Nat literal to ofNat; then omega succeeds.
Versions
Lean 4.20.0-rc5
Target: x86_64-unknown-linux-gnu
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 provided reproducer, focusing on the interaction between whnf and omega and the raw Nat literal produced by whnf. Confirm that adding simp only makes omega succeed; done means omega can discharge 6 < 10 directly after whnf without that workaround.
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
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100