aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-12-12 19:36:15 +0100
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-12-27 11:52:57 +0100
commit05fc0542f6c7a15b9187a2a91beb0aa7a42bb2fa (patch)
tree97eccce3247c2d6d79d9b3cde4bc86410bd1d02c /tactics
parent2a25e1a56460556f8b8dcef2a70cd0d2b9422383 (diff)
Remove the local polymorphic flag hack.
Some code in typeclasses was even breaking the invariant that use_polymorphic_flag should not be called twice, but that code was morally dead it seems, so we remove it.
Diffstat (limited to 'tactics')
-rw-r--r--tactics/leminv.ml7
-rw-r--r--tactics/leminv.mli2
2 files changed, 4 insertions, 5 deletions
diff --git a/tactics/leminv.ml b/tactics/leminv.ml
index 01065868d..197b3030d 100644
--- a/tactics/leminv.ml
+++ b/tactics/leminv.ml
@@ -234,10 +234,9 @@ let inversion_scheme env sigma t sort dep_option inv_op =
let p = Evarutil.nf_evars_universes sigma invProof in
p, sigma
-let add_inversion_lemma name env sigma t sort dep inv_op =
+let add_inversion_lemma ~poly name env sigma t sort dep inv_op =
let invProof, sigma = inversion_scheme env sigma t sort dep inv_op in
let univs =
- let poly = Flags.use_polymorphic_flag () in
Evd.const_univ_entry ~poly sigma
in
let entry = definition_entry ~univs invProof in
@@ -247,13 +246,13 @@ let add_inversion_lemma name env sigma t sort dep inv_op =
(* inv_op = Inv (derives de complete inv. lemma)
* inv_op = InvNoThining (derives de semi inversion lemma) *)
-let add_inversion_lemma_exn na com comsort bool tac =
+let add_inversion_lemma_exn ~poly na com comsort bool tac =
let env = Global.env () in
let sigma = Evd.from_env env in
let sigma, c = Constrintern.interp_type_evars env sigma com in
let sigma, sort = Evd.fresh_sort_in_family ~rigid:univ_rigid env sigma comsort in
try
- add_inversion_lemma na env sigma c sort bool tac
+ add_inversion_lemma ~poly na env sigma c sort bool tac
with
| UserError (Some "Case analysis",s) -> (* Reference to Indrec *)
user_err ~hdr:"Inv needs Nodep Prop Set" s
diff --git a/tactics/leminv.mli b/tactics/leminv.mli
index 8745ad397..f221b1fd9 100644
--- a/tactics/leminv.mli
+++ b/tactics/leminv.mli
@@ -14,6 +14,6 @@ open Misctypes
val lemInv_clause :
quantified_hypothesis -> constr -> Id.t list -> unit Proofview.tactic
-val add_inversion_lemma_exn :
+val add_inversion_lemma_exn : poly:bool ->
Id.t -> constr_expr -> Sorts.family -> bool -> (Id.t -> unit Proofview.tactic) ->
unit