From 32e18eb2ec0d44e4265f44d2f3f51daa7d67e9c0 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sat, 18 Jun 2011 20:35:32 +0000 Subject: Relaxed the constraint introduced in r14190 that froze the existing evars when rewriting. Use it for autorewrite and subst. Accept evars instantiation in multi_rewrite so that rewrite alone remains compatible (it is used in contribs, e.g. Godel, in places where it does not seem absurd to allow it), but there are no good reason for it. Comments welcome. + addition of some tests for rewriting (one being related to commit 14217) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14222 85f007b7-540e-0410-9357-904b9bb8a0f7 --- plugins/funind/functional_principles_proofs.ml | 2 +- plugins/funind/recdef.ml | 8 ++++---- plugins/ring/ring.ml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/funind/functional_principles_proofs.ml b/plugins/funind/functional_principles_proofs.ml index bba3f95fd5..1d1e4a2a68 100644 --- a/plugins/funind/functional_principles_proofs.ml +++ b/plugins/funind/functional_principles_proofs.ml @@ -1416,7 +1416,7 @@ let rec rewrite_eqs_in_eqs eqs = (fun id gl -> observe_tac (Format.sprintf "rewrite %s in %s " (string_of_id eq) (string_of_id id)) - (tclTRY (Equality.general_rewrite_in true Termops.all_occurrences (* dep proofs also: *) true id (mkVar eq) false)) + (tclTRY (Equality.general_rewrite_in true Termops.all_occurrences true (* dep proofs also: *) true id (mkVar eq) false)) gl ) eqs diff --git a/plugins/funind/recdef.ml b/plugins/funind/recdef.ml index 5b689625bc..9b1ccde2c1 100644 --- a/plugins/funind/recdef.ml +++ b/plugins/funind/recdef.ml @@ -373,7 +373,7 @@ let rec mk_intros_and_continue thin_intros (extra_eqn:bool) h_intros thin_intros; tclMAP - (fun eq -> tclTRY (Equality.general_rewrite_in true Termops.all_occurrences (* deps proofs also: *) true teq eq false)) + (fun eq -> tclTRY (Equality.general_rewrite_in true Termops.all_occurrences true (* deps proofs also: *) true teq eq false)) (List.rev eqs); (fun g1 -> let ty_teq = pf_type_of g1 (mkVar teq) in @@ -534,7 +534,7 @@ let rec list_cond_rewrite k def pmax cond_eqs le_proofs = in tclTHENS (general_rewrite_bindings false Termops.all_occurrences - (* dep proofs also: *) true + (* dep proofs also: *) true true (mkVar eq, ExplicitBindings[dummy_loc, NamedHyp k_id, mkVar k; dummy_loc, NamedHyp def_id, mkVar def]) false) @@ -1211,7 +1211,7 @@ let rec introduce_all_values_eq cont_tac functional termine Nameops.out_name def_na in observe_tac "rewrite heq" (general_rewrite_bindings false Termops.all_occurrences - (* dep proofs also: *) true (mkVar heq2, + true (* dep proofs also: *) true (mkVar heq2, ExplicitBindings[dummy_loc,NamedHyp def_id, f]) false) gls) [tclTHENLIST @@ -1266,7 +1266,7 @@ let rec introduce_all_values_eq cont_tac functional termine f_S(mkVar pmax'); dummy_loc, NamedHyp def_id, f]) in - observe_tac "general_rewrite_bindings" ( (general_rewrite_bindings false Termops.all_occurrences (* dep proofs also: *) true + observe_tac "general_rewrite_bindings" ( (general_rewrite_bindings false Termops.all_occurrences true (* dep proofs also: *) true c_b false)) g ) diff --git a/plugins/ring/ring.ml b/plugins/ring/ring.ml index 7588e6a2fa..89309e3232 100644 --- a/plugins/ring/ring.ml +++ b/plugins/ring/ring.ml @@ -820,9 +820,9 @@ let raw_polynom th op lc gl = (tclTHENS (tclORELSE (Equality.general_rewrite true - Termops.all_occurrences false c'i_eq_c''i) + Termops.all_occurrences true false c'i_eq_c''i) (Equality.general_rewrite false - Termops.all_occurrences false c'i_eq_c''i)) + Termops.all_occurrences true false c'i_eq_c''i)) [tac])) else (tclORELSE -- cgit v1.2.3