aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-08-05 21:57:15 +0200
committerPierre-Marie Pédrot2015-08-05 21:57:15 +0200
commit2bb05717bde540332aa814a59da3745f2097dedf (patch)
tree86f5753cb84e300e13e9bda8fb8c3835bd66b41a /tactics
parente76ab0ec81040cbe99f616e8457bdc26cc6dceb6 (diff)
parentdda6d8f639c912597d5bf9e4f1d8c2c118b8dc48 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'tactics')
-rw-r--r--tactics/tactics.ml20
1 files changed, 19 insertions, 1 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 402a9e88a1..6d81a48705 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -109,6 +109,24 @@ let _ =
optread = (fun () -> !clear_hyp_by_default) ;
optwrite = (fun b -> clear_hyp_by_default := b) }
+(* Compatibility option useful in developments using apply intensively
+ in ltac code *)
+
+let universal_lemma_under_conjunctions = ref false
+
+let accept_universal_lemma_under_conjunctions () =
+ !universal_lemma_under_conjunctions
+
+let _ =
+ declare_bool_option
+ { optsync = true;
+ optdepr = false;
+ optname = "trivial unification in tactics applying under conjunctions";
+ optkey = ["Universal";"Lemma";"Under";"Conjunction"];
+ optread = (fun () -> !universal_lemma_under_conjunctions) ;
+ optwrite = (fun b -> universal_lemma_under_conjunctions := b) }
+
+
(*********************************************)
(* Tactics *)
(*********************************************)
@@ -1332,7 +1350,7 @@ let make_projection env sigma params cstr sign elim i n c u =
(* to avoid surprising unifications, excludes flexible
projection types or lambda which will be instantiated by Meta/Evar *)
&& not (isEvar (fst (whd_betaiota_stack sigma t)))
- && not (isRel t && destRel t > n-i)
+ && (accept_universal_lemma_under_conjunctions () || not (isRel t))
then
let t = lift (i+1-n) t in
let abselim = beta_applist (elim,params@[t;branch]) in