aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-10-23 12:45:23 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-10-23 12:45:23 +0000
commite50635edb2504712ae9b88951e155549adfc5d04 (patch)
treeb7b091ac9b6c4f8e133f5f71c30f409983f6ffd7 /contrib
parent34e7c74d7a776714364ad240a492fa480d48c409 (diff)
Omega échouait à effacer les hypothèses à contenu arithmétique lorsque ces hypothèses étaient dépendantes dans d'autres hypothèses
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3178 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib')
-rw-r--r--contrib/omega/coq_omega.ml22
1 files changed, 10 insertions, 12 deletions
diff --git a/contrib/omega/coq_omega.ml b/contrib/omega/coq_omega.ml
index f867d203b..f26d0dc2a 100644
--- a/contrib/omega/coq_omega.ml
+++ b/contrib/omega/coq_omega.ml
@@ -1335,6 +1335,10 @@ let destructure_omega gl tac_def (id,c) =
| _ -> tac_def
with e when catchable_exception e -> tac_def
+let reintroduce id =
+ (* [id] cannot be cleared if dependent: protect it by a try *)
+ tclTHEN (tclTRY (clear [id])) (intro_using id)
+
let coq_omega gl =
clear_tables ();
let tactic_normalisation, system =
@@ -1462,8 +1466,7 @@ let nat_inject gl =
[mkApp (Lazy.force coq_inj_le, [| t1;t2;mkVar i |]) ]);
(explore [P_APP 1; P_TYPE] t1);
(explore [P_APP 2; P_TYPE] t2);
- (clear [i]);
- (intros_using [i]);
+ (reintroduce i);
(loop lit)
]
| Kapp("lt",[t1;t2]) ->
@@ -1472,8 +1475,7 @@ let nat_inject gl =
[mkApp (Lazy.force coq_inj_lt, [| t1;t2;mkVar i |]) ]);
(explore [P_APP 1; P_TYPE] t1);
(explore [P_APP 2; P_TYPE] t2);
- (clear [i]);
- (intros_using [i]);
+ (reintroduce i);
(loop lit)
]
| Kapp("ge",[t1;t2]) ->
@@ -1482,8 +1484,7 @@ let nat_inject gl =
[mkApp (Lazy.force coq_inj_ge, [| t1;t2;mkVar i |]) ]);
(explore [P_APP 1; P_TYPE] t1);
(explore [P_APP 2; P_TYPE] t2);
- (clear [i]);
- (intros_using [i]);
+ (reintroduce i);
(loop lit)
]
| Kapp("gt",[t1;t2]) ->
@@ -1492,8 +1493,7 @@ let nat_inject gl =
[mkApp (Lazy.force coq_inj_gt, [| t1;t2;mkVar i |]) ]);
(explore [P_APP 1; P_TYPE] t1);
(explore [P_APP 2; P_TYPE] t2);
- (clear [i]);
- (intros_using [i]);
+ (reintroduce i);
(loop lit)
]
| Kapp("neq",[t1;t2]) ->
@@ -1502,8 +1502,7 @@ let nat_inject gl =
[mkApp (Lazy.force coq_inj_neq, [| t1;t2;mkVar i |]) ]);
(explore [P_APP 1; P_TYPE] t1);
(explore [P_APP 2; P_TYPE] t2);
- (clear [i]);
- (intros_using [i]);
+ (reintroduce i);
(loop lit)
]
| Kapp("eq",[typ;t1;t2]) ->
@@ -1513,8 +1512,7 @@ let nat_inject gl =
[mkApp (Lazy.force coq_inj_eq, [| t1;t2;mkVar i |]) ]);
(explore [P_APP 2; P_TYPE] t1);
(explore [P_APP 3; P_TYPE] t2);
- (clear [i]);
- (intros_using [i]);
+ (reintroduce i);
(loop lit)
]
else loop lit