aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorGravatar jforest <jforest@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-06-13 20:23:56 +0000
committerGravatar jforest <jforest@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-06-13 20:23:56 +0000
commitaecde917477c63b02c0da3a0fdbfad9f5ca906b3 (patch)
tree666c0ade641ae17cf7225054fb281b6780c41d74 /contrib
parenta86210328ffa5aed69546e4c64ce02520bf2bf13 (diff)
ajout d'un argument with_clean a Indfun.functional_induction permettant de choisir ou non de faire du menage dans les hypotheses engendrees. La tactique au niveau utilisateur fait toujours le menage.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8954 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib')
-rw-r--r--contrib/funind/indfun.ml14
-rw-r--r--contrib/funind/indfun_main.ml42
2 files changed, 10 insertions, 6 deletions
diff --git a/contrib/funind/indfun.ml b/contrib/funind/indfun.ml
index 29b4e148b..d109b3746 100644
--- a/contrib/funind/indfun.ml
+++ b/contrib/funind/indfun.ml
@@ -594,7 +594,7 @@ let choose_dest_or_ind scheme_info =
else Tactics.new_destruct
-let functional_induction c princl pat =
+let functional_induction with_clean c princl pat =
let f,args = decompose_app c in
fun g ->
let princ,bindings =
@@ -652,10 +652,14 @@ let functional_induction c princl pat =
with Rawterm.rDelta = false;
}
in
- Tacticals.tclTHEN
- (Tacticals.tclMAP (fun id -> Tacticals.tclTRY (Equality.subst [id])) idl )
- (Hiddentac.h_reduce flag Tacticals.allClauses)
- g
+ if with_clean
+ then
+ Tacticals.tclTHEN
+ (Tacticals.tclMAP (fun id -> Tacticals.tclTRY (Equality.subst [id])) idl )
+ (Hiddentac.h_reduce flag Tacticals.allClauses)
+ g
+ else Tacticals.tclIDTAC g
+
in
Tacticals.tclTHEN
(choose_dest_or_ind
diff --git a/contrib/funind/indfun_main.ml4 b/contrib/funind/indfun_main.ml4
index 8b5e7d2ea..5ba05a8e9 100644
--- a/contrib/funind/indfun_main.ml4
+++ b/contrib/funind/indfun_main.ml4
@@ -97,7 +97,7 @@ TACTIC EXTEND newfunind
| [c] -> c
| c::cl -> applist(c,cl)
in
- functional_induction c princl pat ]
+ functional_induction true c princl pat ]
END