Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The proof of Bool.noConfusion seems to be incorrect in Lean #6720

Closed
3 tasks done
ColorlessBoy opened this issue Jan 21, 2025 · 0 comments
Closed
3 tasks done

The proof of Bool.noConfusion seems to be incorrect in Lean #6720

ColorlessBoy opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ColorlessBoy
Copy link

ColorlessBoy commented Jan 21, 2025

Prerequisites

Please put an X between the brackets as you perform the following steps:

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:

@[reducible] protected def Bool.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?

Versions

Lean (version 4.15.0-rc1, arm64-apple-darwin23.6.0, commit ffac974dba79, Release)

Additional Information

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@ColorlessBoy ColorlessBoy added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant