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

congruence fails to specialize #14651

Closed
mrhaandi opened this issue Jul 14, 2021 · 0 comments · Fixed by #14650
Closed

congruence fails to specialize #14651

mrhaandi opened this issue Jul 14, 2021 · 0 comments · Fixed by #14650
Labels
kind: bug An error, flaw, fault or unintended behaviour. part: congruence The congruence tactic. part: ltac Issues and PRs related to the Ltac tactic language.
Milestone

Comments

@mrhaandi
Copy link
Contributor

Description of the problem

As per documentation of congruence the following goal is solved using hypothesis specialization.

Axiom p : (nat -> nat) -> nat.
Definition ap {X Y : Type} (f : X -> Y) (x : X) := f x.

Goal (forall f, p f = ap f 0) -> forall f, p f = ap f 0.
Proof. congruence. Qed.

However, unfolding ap results in a very similar goal which fails:

Goal (forall f, p f = f 0) -> forall f, p f = f 0.
Proof. Fail congruence. Admitted.

This is because the former pattern p ?f = ap ?f 0 can be used by congruence whereas the p ?f = ?f 0 cannot.
Specifically, the variable ?f cannot appear as the head of an application in ?f 0.
See zulip discussion.

Coq Version

8.13.2

@Alizter Alizter added kind: bug An error, flaw, fault or unintended behaviour. part: ltac Issues and PRs related to the Ltac tactic language. part: congruence The congruence tactic. labels Jul 14, 2021
@coqbot-app coqbot-app bot added this to the 8.15+rc1 milestone Jul 25, 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: congruence The congruence tactic. part: ltac Issues and PRs related to the Ltac tactic language.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants