From aecde917477c63b02c0da3a0fdbfad9f5ca906b3 Mon Sep 17 00:00:00 2001 From: jforest Date: Tue, 13 Jun 2006 20:23:56 +0000 Subject: 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 --- contrib/funind/indfun.ml | 14 +++++++++----- contrib/funind/indfun_main.ml4 | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'contrib') 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 -- cgit v1.2.3