diff options
| author | herbelin | 2002-05-15 20:13:06 +0000 |
|---|---|---|
| committer | herbelin | 2002-05-15 20:13:06 +0000 |
| commit | 76ed85857b467d38200a75b3dc7cd02d2d48b063 (patch) | |
| tree | db437c28061e8ccd24471e84cb280c7befacee43 | |
| parent | 063831618cf9d7385fb6ba3f41dea102115f0fbc (diff) | |
Nouvelle syntaxe 'Match Reverse Context' pour garder un filtrage de
gauche à droite des hypothèses dans Intuition
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2696 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | proofs/tacinterp.ml | 8 | ||||
| -rw-r--r-- | tactics/tauto.ml4 | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/proofs/tacinterp.ml b/proofs/tacinterp.ml index e3d2a36702..b9a1f23a78 100644 --- a/proofs/tacinterp.ml +++ b/proofs/tacinterp.ml @@ -761,6 +761,9 @@ and letcut_interp ist ast = function (* Interprets the Match Context expressions *) and match_context_interp ist ast lmr g = + let lr,lmr = match lmr with + | Str(_,dir)::lmr -> (dir="LR",lmr) + | _ -> anomaly "Ill-formed Match Context" in (* let goal = (match goalopt with | None -> @@ -795,8 +798,9 @@ and match_context_interp ist ast lmr g = with No_match | _ -> apply_match_context ist goal tl) | (Pat (mhyps,mgoal,mt))::tl -> - let hyps = make_hyps (pf_hyps goal) - and concl = pf_concl goal in + let hyps = make_hyps (pf_hyps goal) in + let hyps = if lr then List.rev hyps else hyps in + let concl = pf_concl goal in (match mgoal with | Term mg -> (try diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4 index 7f29b4358c..e193b20a97 100644 --- a/tactics/tauto.ml4 +++ b/tactics/tauto.ml4 @@ -55,7 +55,7 @@ let axioms ist = let t_is_unit = tacticIn is_unit and t_is_empty = tacticIn is_empty in <:tactic< - Match Context With + Match Reverse Context With |[|- ?1] -> $t_is_unit;Constructor |[_:?1 |- ?] -> $t_is_empty |[_:?1 |- ?1] -> Assumption>> @@ -68,7 +68,7 @@ let simplif t_reduce ist = <:tactic< $t_not_dep_intros; Repeat - ((Match Context With + ((Match Reverse Context With | [id: (?1 ? ?) |- ?] -> $t_is_conj;Elim id;Do 2 Intro;Clear id;$t_reduce | [id: (?1 ? ?) |- ?] -> $t_is_disj;Elim id;Intro;Clear id;$t_reduce @@ -94,7 +94,7 @@ let rec tauto_intuit t_reduce t_solver ist = $t_reduce; ($t_simplif;$t_axioms Orelse - (Match Context With + (Match Reverse Context With | [id:(?1-> ?2)-> ?3|- ?] -> Cut ?2-> ?3;[Intro;Cut ?1-> ?2;[Intro;Cut ?3;[Intro;Clear id| Intros;Apply id;Assumption]|Clear id]|Intros;Apply id;Try Intro; |
