Skip to Content.
Sympa Menu

coq-club - [Coq-Club] appcontext question

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] appcontext question


Chronological Thread 
  • From: Dmitry Grebeniuk <gdsfh1 AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] appcontext question
  • Date: Mon, 11 Mar 2013 19:17:34 +0200

Hello.

Documentation says about "match goal with ... appcontext":

"
The behavior of appcontext is the same as the one of context,
except that a matching subterm could be a partial part of a
longer application.
"

I don't understand is it a bug or not (so I'm writing here and
I'm not filing a bug), but in my case "appcontext" doesn't
work as I expect it to work:


Require Import Arith.
Goal (plus 1 (id 2)) = 3.
match goal with
| |- appcontext [ _ (id _) ] => idtac "found"
end.
(* Error: No matching clauses for match goal *)

"context [ _ _ (id _) ]" matches the goal, and I thought
that "appcontext" could be used exactly in these
situations, since "plus 1 (id 2)" can be seen as partial
application: "(plus 1) (id 2)", so it could be matched
by "[ _ (id _) ]".
It seems that I don't understand "appcontext", right?



Archive powered by MHonArc 2.6.18.

Top of Page