aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tactics/tauto.ml415
1 files changed, 14 insertions, 1 deletions
diff --git a/tactics/tauto.ml4 b/tactics/tauto.ml4
index 3f5b0a4a3d..0e14c471ad 100644
--- a/tactics/tauto.ml4
+++ b/tactics/tauto.ml4
@@ -245,12 +245,25 @@ let intuition_gen tac =
let simplif_gen = interp (tacticIn simplif)
-let tauto g =
+let tauto_intuitionistic g =
try intuition_gen <:tactic<fail>> g
with
Refiner.FailError _ | UserError _ ->
errorlabstrm "tauto" (str "tauto failed.")
+let coq_nnpp_path =
+ let dir = List.map id_of_string ["Classical_Prop";"Logic";"Coq"] in
+ Libnames.make_path (make_dirpath dir) (id_of_string "NNPP")
+
+let tauto_classical g =
+ try
+ let nnpp = constr_of_global (Nametab.absolute_reference coq_nnpp_path) in
+ tclTHEN (apply nnpp) tauto_intuitionistic g
+ with Not_found ->
+ tclIDTAC g
+
+let tauto = tclORELSE tauto_intuitionistic tauto_classical
+
let default_intuition_tac = <:tactic< auto with * >>
TACTIC EXTEND tauto