-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
P-mediumWe may work on this issue if we find the timeWe may work on this issue if we find the timebugSomething isn't workingSomething isn't working
Description
Prerequisites
Please put an X between the brackets as you perform the following steps:
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The following file has a kernel issue. Any comment with RB indicates that doing so will remove the bug, so it's pretty unstable. I was not able to reduce it further.
-- RB == removes bug
-- Removing IndentW RB
structure IW : Type 1 where
I : Type
mutual
def aux (iw: IW) (e : Nat) (sm : List iw.I)
: Nat :=
e
-- I: Type instead of iw: IW RB
def aval (iw: IW) (n : Nat) (e : Nat) : Nat :=
match n with
| 0 => e
| n' + 1 =>
let e1 :=
let input_map: List iw.I := [] --lifting RB
let new_e := aux iw e input_map -- removing args RB
avalCore iw n' new_e -- inlining RB
avalCore iw n' e
-- Inlining RB
def avalCore (iw: IW) (n' : Nat) (e : Nat) : Nat :=
aval iw n' e
end
Output
(kernel) application type mismatch
aux (wfParam iw) (wfParam e) n'
argument has type
Nat
but function has type
List (IW.I (wfParam iw)) → Nat
Context
I minimize a lambda calculus rewriting and stumbled on this today.
Steps to Reproduce
- Copy the code above
- Paste it on https://live.lean-lang.org/#project=lean-nightly
- Expand the info and observe the error message
Expected behavior: The file shouldn't fail
Actual behavior: The file fails
Versions
4.23.0-rc2
live.lean-lang.org and Windows
Additional Information
No configuration necessary
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
MikaelMayer and shigoel
Metadata
Metadata
Labels
P-mediumWe may work on this issue if we find the timeWe may work on this issue if we find the timebugSomething isn't workingSomething isn't working