diff options
| author | barras | 2002-05-14 14:10:23 +0000 |
|---|---|---|
| committer | barras | 2002-05-14 14:10:23 +0000 |
| commit | 590512e3f003f0bdc26d585e996dc065936c7d4a (patch) | |
| tree | e69d7e858a123b42e97e3fb38fdd90ffbb9ff189 /tactics | |
| parent | 2799dbf2fe45d83f2a2828442735db0f0fb3d1d5 (diff) | |
ajout des theoremes eqT_rec_r et eqT_rect_r pour Rewrite
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2680 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics')
| -rw-r--r-- | tactics/equality.ml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tactics/equality.ml b/tactics/equality.ml index 044126a7e3..c3eb158465 100644 --- a/tactics/equality.ml +++ b/tactics/equality.ml @@ -137,12 +137,15 @@ let general_rewrite_in lft2rgt id (c,l) gl = let hdcncls = string_of_inductive hdcncl in let suffix = Indrec.elimination_suffix (elimination_sort_of_hyp id gl) in + let hdcncls = string_of_inductive hdcncl in + let suffix = + Indrec.elimination_suffix (elimination_sort_of_hyp id gl) in + let rwr_thm = + if lft2rgt then hdcncls^suffix else hdcncls^suffix^"_r" in let elim = - if lft2rgt then - pf_global gl (id_of_string (hdcncls^suffix)) - else - pf_global gl (id_of_string (hdcncls^suffix^"_r")) - in + try pf_global gl (id_of_string rwr_thm) + with Not_found -> + error ("Cannot find rewrite principle "^rwr_thm) in general_elim_in id (c,l) (elim,[]) gl let conditional_rewrite_in lft2rgt id tac (c,bl) = |
