Skip to content

Importing all_ssreflect prevents rewrite ... in from compiling #21329

@mcoulont

Description

@mcoulont

Description of the problem

The present issue is opened following a question in Stack Exchange where Tragicus kind of advised me to report here.

The following lemma compiles in Rocq v9.0.0 with rocq-mathcomp-ssreflect v2.4.0:

Lemma xpredT_not_equal_xpred0 {A : Type} (a : A)
(H : @eq (forall _ : A, bool) (fun _ : A => true) (fun _ : A => false))
(H1 : not ( @eq bool ((fun _ : A => true) a) ((fun _ : A => false) a))) :
  False.
Proof.
  rewrite H in H1. apply H1. reflexivity.
Qed.

unless it's preceded with

From mathcomp Require Import all_ssreflect.

Error:

The LHS of H
 xpredT
does not match any subterm of the goal

Why does rewrite -> H in H1 compile and not rewrite H in H1 in the proof?

Small Rocq / Coq file to reproduce the bug

From mathcomp Require Import all_ssreflect.

Lemma xpredT_not_equal_xpred0 {A : Type} (a : A)
(H : @eq (forall _ : A, bool) (fun _ : A => true) (fun _ : A => false))
(H1 : not ( @eq bool ((fun _ : A => true) a) ((fun _ : A => false) a))) :
  False.
Proof.
  rewrite H in H1. apply H1. reflexivity.
Qed.

Version of Rocq / Coq where this bug occurs

9.0.0

Interface of Rocq / Coq where this bug occurs

compilation

Last version of Rocq / Coq where the bug did not occur

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugAn error, flaw, fault or unintended behaviour.needs: triageThe validity of this issue needs to be checked, or the issue itself updated.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions