You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the command #print Bool.noConfusion to inspect the proof of Bool.noConfusion:
@[reducible]protecteddefBool.noConfusion.{u} : {P : Sort u} →
{v1 v2 : Bool} → v1 = v2 → Bool.noConfusionType P v1 v2 :=
fun {P} {v1 v2} h12 =>
Eq.ndrec (motive := fun a => v1 = a → Bool.noConfusionType P v1 a)
(fun h11 => Bool.casesOn v1 (fun a => a) fun a => a) h12 h12
Upon checking, I found that the proof is incorrect because:
• There is a type mismatch in the first fun a => a, which is expected to have type Bool.noConfusionType P false v1 : Sort u;
• Similarly, there is a type mismatch in the second fun a => a, which is expected to have type Bool.noConfusionType P true v1 : Sort u.
Why does Lean 4 generate this incorrect proof for Bool.noConfusion?
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The proof of Bool.noConfusion seems to be incorrect in Lean.
Context
The bug was noticed by @ColorlessBoy on zulip.
Steps to Reproduce
I used the command
#print Bool.noConfusion
to inspect the proof of Bool.noConfusion:Upon checking, I found that the proof is incorrect because:
• There is a type mismatch in the first
fun a => a
, which is expected to have typeBool.noConfusionType P false v1 : Sort u
;• Similarly, there is a type mismatch in the second
fun a => a
, which is expected to have typeBool.noConfusionType P true v1 : Sort u
.Why does Lean 4 generate this incorrect proof for Bool.noConfusion?
Versions
Additional Information
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: