I am guessing that Coq aac_tactics
(8.5p1) should be able to deal with assoc. and commutativity. But I can't figure out how to use it prove simple equalities such as
2 + y + 5 = 7 + y
For example:
Require Import AAC_tactics.AAC.
Require Import AAC_tactics.Instances.
Goal forall y: nat, 2 + y + 5 = 7 + y.
intros ?.
aac_reflexivity.
generates an error:
Error: Tactic failure: Not an equality modulo A/AC.
Changing the last tactic to aac_normalise
doesn't solve it either.
How can such goals be proven using AAC?
The documentation is pretty scarce, so I can only guess that your example requires some explicit rewritings (essentially, you need to show
5 + 2 = 7
).Notice that the next example works because it doesn't need the fact that
5 + 2 = 7
:So, if I'd do the original example like this: