diff options
Diffstat (limited to 'tactics')
-rw-r--r-- | tactics/equality.ml | 11 | ||||
-rw-r--r-- | tactics/tactics.ml | 9 | ||||
-rw-r--r-- | tactics/tauto.ml4 | 4 |
3 files changed, 17 insertions, 7 deletions
diff --git a/tactics/equality.ml b/tactics/equality.ml index 6adfa3aaf..200b6deb7 100644 --- a/tactics/equality.ml +++ b/tactics/equality.ml @@ -46,7 +46,10 @@ open Evd (* Options *) -let discr_do_intro = ref true +let discriminate_introduction = ref true + +let discr_do_intro () = + !discriminate_introduction && Flags.version_strictly_greater Flags.V8_2 open Goptions let _ = @@ -54,8 +57,8 @@ let _ = { optsync = true; optname = "automatic introduction of hypotheses by discriminate"; optkey = ["Discriminate";"Introduction"]; - optread = (fun () -> !discr_do_intro); - optwrite = (:=) discr_do_intro } + optread = (fun () -> !discriminate_introduction); + optwrite = (:=) discriminate_introduction } (* Rewriting tactics *) @@ -683,7 +686,7 @@ let discrEverywhere with_evars = (* tclORELSE *) - (if !discr_do_intro then + (if discr_do_intro () then (tclTHEN (tclREPEAT introf) (Tacticals.tryAllHyps diff --git a/tactics/tactics.ml b/tactics/tactics.ml index 2a4fc6a0f..f4262d731 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -80,6 +80,11 @@ let dloc = dummy_loc (* Option for 8.2 compatibility *) open Goptions let dependent_propositions_elimination = ref true + +let use_dependent_propositions_elimination () = + !dependent_propositions_elimination + && Flags.version_strictly_greater Flags.V8_2 + let _ = declare_bool_option { optsync = true; @@ -2581,8 +2586,8 @@ let guess_elim isrec hyp0 gl = if isrec then lookup_eliminator mind s else let case = - if !dependent_propositions_elimination && - dependent_no_evar (mkVar hyp0) (pf_concl gl) + if use_dependent_propositions_elimination () && + dependent_no_evar (mkVar hyp0) (pf_concl gl) then make_case_dep else make_case_gen in pf_apply case gl mind s in diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4 index 6fea98377..60baa017c 100644 --- a/tactics/tauto.ml4 +++ b/tactics/tauto.ml4 @@ -49,6 +49,8 @@ let strict_unit = false (* Whether inner iff are unfolded *) let iff_unfolding = ref false +let unfold_iff () = !iff_unfolding || Flags.version_less_or_equal Flags.V8_2 + open Goptions let _ = declare_bool_option @@ -256,7 +258,7 @@ let rec tauto_intuit t_reduce solver ist = ) >> let reduction_not _ist = - if !iff_unfolding then + if unfold_iff () then <:tactic< unfold Coq.Init.Logic.not, Coq.Init.Logic.iff in * >> else <:tactic< unfold Coq.Init.Logic.not in * >> |