aboutsummaryrefslogtreecommitdiff
path: root/plugins/funind/invfun.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2019-06-06 06:09:24 +0200
committerEmilio Jesus Gallego Arias2019-06-24 20:55:09 +0200
commit8b903319eae4d645f9385e8280d04d18a4f3a2bc (patch)
tree97f39249d6eef4c4fda252ca74d0a35ade40caef /plugins/funind/invfun.ml
parent70a11c78e790d7f2f4175d1002e08f79d3ed8486 (diff)
[lemmas] [proof] Split proof kinds into per-layer components.
We split `{goal,declaration,assumption}_kind` into their components. This makes sense as each part of this triple is handled by a different layer, namely: - `polymorphic` status: necessary for the lower engine layers; - `locality`: only used in `vernac` top-level constants - `kind`: merely used for cosmetic purposes [could indeed be removed / pushed upwards] We also profit from this refactoring to add some named parameters to the top-level definition API which is quite parameter-hungry. More refactoring is possible and will come in further commits, in particular this is a step towards unifying the definition / lemma save path.
Diffstat (limited to 'plugins/funind/invfun.ml')
-rw-r--r--plugins/funind/invfun.ml18
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/funind/invfun.ml b/plugins/funind/invfun.ml
index e5b0a5d032..1ab64ac1b2 100644
--- a/plugins/funind/invfun.ml
+++ b/plugins/funind/invfun.ml
@@ -803,10 +803,13 @@ let derive_correctness make_scheme (funs: pconstant list) (graphs:inductive list
i*)
let lem_id = mk_correct_id f_id in
let (typ,_) = lemmas_types_infos.(i) in
+ let info = Lemmas.Info.make
+ ~scope:Decl_kinds.(Global ImportDefaultBehavior)
+ ~kind:(Decl_kinds.Proof Decl_kinds.Theorem) () in
let lemma = Lemmas.start_lemma
~name:lem_id
~poly:false
- ~kind:Decl_kinds.(Global ImportDefaultBehavior,Proof Theorem)
+ ~info
!evd
typ in
let lemma = fst @@ Lemmas.by
@@ -866,13 +869,14 @@ let derive_correctness make_scheme (funs: pconstant list) (graphs:inductive list
Ensures by: obvious
i*)
let lem_id = mk_complete_id f_id in
- let lemma = Lemmas.start_lemma ~name:lem_id
- ~poly:false
- ~kind:Decl_kinds.(Global ImportDefaultBehavior,Proof Theorem) sigma
- (fst lemmas_types_infos.(i)) in
+ let info = Lemmas.Info.make
+ ~scope:Decl_kinds.(Global ImportDefaultBehavior)
+ ~kind:Decl_kinds.(Proof Theorem) () in
+ let lemma = Lemmas.start_lemma ~name:lem_id ~poly:false ~info
+ sigma (fst lemmas_types_infos.(i)) in
let lemma = fst (Lemmas.by
- (Proofview.V82.tactic (observe_tac ("prove completeness ("^(Id.to_string f_id)^")")
- (proving_tac i))) lemma) in
+ (Proofview.V82.tactic (observe_tac ("prove completeness ("^(Id.to_string f_id)^")")
+ (proving_tac i))) lemma) in
let () = Lemmas.save_lemma_proved ?proof:None ~lemma ~opaque:Proof_global.Transparent ~idopt:None in
let finfo = find_Function_infos (fst f_as_constant) in
let _,lem_cst_constr = Evd.fresh_global