coq-community / aac-tactics

Coq plugin providing tactics for rewriting universally quantified equations, modulo associative (and possibly commutative) operators [maintainer=@palmskog]
https://coq-community.org/aac-tactics
Other
29 stars 21 forks source link

aac tactics don't handle goal selectors properly #135

Closed MSoegtropIMC closed 4 months ago

MSoegtropIMC commented 4 months ago

AAC tactics apparently don't handle goal selectors properly.

This might be an effect of #36.

Here is an example:

From Coq Require PeanoNat ZArith List Permutation Lia.
From AAC_tactics Require Import AAC.
From AAC_tactics Require Instances.

(** ** Introductory example 

   Here is a first example with relative numbers ([Z]): one can
   rewrite an universally quantified hypothesis modulo the
   associativity and commutativity of [Z.add]. *)

Section introduction.
  Import ZArith.
  Import Instances.Z.

  Variables a b : Z.

  Goal a + b = b + a.
    aac_reflexivity.
  Qed.

  Goal forall c: bool, a + b = b + a.
    intros c.
    destruct c.
    1,2: aac_reflexivity.
  Fail Qed. (* The command has indeed failed with message: Some unresolved existential variables remain *)
  Abort.

  Goal forall c: bool, a + b = b + a.
    intros c.
    destruct c.
    - aac_reflexivity.
    - aac_reflexivity.
  Qed.
End introduction.
palmskog commented 4 months ago

Maybe of interest is #113.

For the record, I'm pretty sure nobody is working on #36 right now.

SkySkimmer commented 4 months ago

This isn't about retype, see https://github.com/coq-community/aac-tactics/pull/136/commits/36aef56d275a11fd673824925f1c69ab805d0cc9

MSoegtropIMC commented 4 months ago

@SkySkimmer : thanks for the fast fix!