diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2018-02-25 06:24:29 +0100 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2018-03-23 21:58:43 +0100 |
commit | 4e44bd8331bf4d15c2e8e817f551a62d62288bcf (patch) | |
tree | dabf7345b5639f31d9c029c3036c60df16c84858 | |
parent | e128900aee63c972d7977fd47e3fd21649b63409 (diff) |
Deprecate undocumented "intros until 0" in favor of "intros *".
- The case 0 makes the code of intros until (and in particular of
Detyping.lookup_quantified_hypothesis_as_displayed more complicated).
- The introduction pattern "*" is compositional while "until 0" is not.
-rw-r--r-- | plugins/micromega/Tauto.v | 4 | ||||
-rw-r--r-- | tactics/tactics.ml | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/micromega/Tauto.v b/plugins/micromega/Tauto.v index 31f55ae9c..458844e1b 100644 --- a/plugins/micromega/Tauto.v +++ b/plugins/micromega/Tauto.v @@ -211,7 +211,7 @@ Set Implicit Arguments. (* BC *) simpl. case_eq (deduce t t) ; auto. - intros until 0. + intros *. case_eq (unsat t0) ; auto. unfold eval_clause. rewrite make_conj_cons. @@ -263,7 +263,7 @@ Set Implicit Arguments. Proof. induction cl. simpl. tauto. - intros until 0. + intros *. simpl. assert (HH := add_term_correct env a cl'). case_eq (add_term a cl'). diff --git a/tactics/tactics.ml b/tactics/tactics.ml index df3cca144..834d73bdd 100644 --- a/tactics/tactics.ml +++ b/tactics/tactics.ml @@ -1102,7 +1102,13 @@ let msg_quantified_hypothesis = function pr_nth n ++ str " non dependent hypothesis" +let warn_deprecated_intros_until_0 = + CWarnings.create ~name:"deprecated-intros-until-0" ~category:"tactics" + (fun () -> + strbrk"\"intros until 0\" is deprecated, use \"intros *\"; instead of \"induction 0\" and \"destruct 0\" use explicitly a name.\"") + let depth_of_quantified_hypothesis red h gl = + if h = AnonHyp 0 then warn_deprecated_intros_until_0 (); match lookup_hypothesis_as_renamed_gen red h gl with | Some depth -> depth | None -> |