aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
authorGravatar barras <barras@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-07-16 14:17:53 +0000
committerGravatar barras <barras@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-07-16 14:17:53 +0000
commit0dd691120e9480fdd9550462508b60609edc8427 (patch)
tree1145ddea79ee675e05af217408959d0297ac9301 /plugins
parent7bc1e9c50f2e29cca54334a88df847f6f7d4e9c3 (diff)
fixed bug #2316 (ring_simplify)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13284 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins')
-rw-r--r--plugins/setoid_ring/Ring_tac.v13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/setoid_ring/Ring_tac.v b/plugins/setoid_ring/Ring_tac.v
index e3eb418ad..d33e9a82a 100644
--- a/plugins/setoid_ring/Ring_tac.v
+++ b/plugins/setoid_ring/Ring_tac.v
@@ -124,11 +124,11 @@ Ltac ApplyLemmaThenAndCont lemma expr tac CONT_tac :=
- [SYN_tac term fv] reifies [term] given the list of atomic expressions
- [LEMMA_tac fv kont] computes the correctness lemma and passes it to
continuation kont
- - [MAIN_tac H] process H which is the conclusion of the correctness
- lemma instantiated with each reified term
+ - [MAIN_tac H] process H which is the conclusion of the correctness lemma
+ instantiated with each reified term
- [fv] is the initial value of atomic expressions (to be completed by
the reification of the terms
- - [terms] the list (a constr of type list) of terms to reify ans process.
+ - [terms] the list (a constr of type list) of terms to reify and process.
*)
Ltac ReflexiveRewriteTactic
FV_tac SYN_tac LEMMA_tac MAIN_tac fv terms :=
@@ -137,7 +137,12 @@ Ltac ReflexiveRewriteTactic
let RW_tac lemma :=
let fcons term CONT_tac :=
let expr := SYN_tac term fv in
- (ApplyLemmaThenAndCont lemma expr MAIN_tac CONT_tac) in
+ let main H :=
+ match type of H with
+ | (?req _ ?rhs) => change (req term rhs) in H
+ end;
+ MAIN_tac H in
+ (ApplyLemmaThenAndCont lemma expr main CONT_tac) in
(* rewrite steps *)
lazy_list_fold_right fcons ltac:(fun _=>idtac) terms in
LEMMA_tac fv RW_tac.