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

Ssreflect have construct failing with Incorrect number of goals #15019

Open
jouvelot opened this issue Oct 13, 2021 · 1 comment
Open

Ssreflect have construct failing with Incorrect number of goals #15019

jouvelot opened this issue Oct 13, 2021 · 1 comment
Labels
kind: bug An error, flaw, fault or unintended behaviour. part: ssreflect The SSReflect proof language.

Comments

@jouvelot
Copy link
Contributor

jouvelot commented Oct 13, 2021

The Ssreflect have construct fails in a somewhat unexpected way. The error message is

Error: Tactic failure: Incorrect number of goals (expected 1 tactic).

Note that adding a dummy argument to foo (i.e., have foo n:) makes it succeed.

From Coq Require Import ssreflect.

Lemma Peirce (A B : Prop) : ((A -> B) -> A) -> A.
Proof. 
have foo: A -> B.

Coq 8.13.0 (also fails in jsCoq)

@ejgallego
Copy link
Member

ejgallego commented Oct 13, 2021

I was able to reproduce this back to Coq 8.5 [thanks jsCoq :)] so indeed, not a new problem.

Note that this only happens when the goal in have is a subterm of the main goal. See even weirder behavior:

have foo n : A -> B.              (* works *)
have foo : A -> B := _ .          (* 100% bizarre *)

@Alizter Alizter added kind: bug An error, flaw, fault or unintended behaviour. part: ssreflect The SSReflect proof language. labels Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug An error, flaw, fault or unintended behaviour. part: ssreflect The SSReflect proof language.
Projects
None yet
Development

No branches or pull requests

3 participants