aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-09-07 17:43:39 +0200
committerPierre-Marie Pédrot2016-09-07 17:43:39 +0200
commita18fb93587ccbe32a2edfad38d2e9095f6c8e901 (patch)
tree4df4d74a05885a75e58de2873bc1895e42ebc2be
parent1f4a8889f4bc4c2201080004db6371950b4ea36d (diff)
parent53b2acb9befe13c0383b923d09a0d5a6c416449e (diff)
Merge branch 'v8.5' into v8.6
-rw-r--r--plugins/decl_mode/decl_proof_instr.ml2
-rw-r--r--stm/lemmas.ml6
-rw-r--r--test-suite/bugs/closed/5065.v6
3 files changed, 12 insertions, 2 deletions
diff --git a/plugins/decl_mode/decl_proof_instr.ml b/plugins/decl_mode/decl_proof_instr.ml
index 97c9d5f4a2..d30fcf6033 100644
--- a/plugins/decl_mode/decl_proof_instr.ml
+++ b/plugins/decl_mode/decl_proof_instr.ml
@@ -60,7 +60,7 @@ let _ =
declare_bool_option
{ optsync = true;
optdepr = false;
- optname = "strict mode";
+ optname = "strict proofs";
optkey = ["Strict";"Proofs"];
optread = get_strictness;
optwrite = set_strictness }
diff --git a/stm/lemmas.ml b/stm/lemmas.ml
index b676f4f511..50f2b82c3b 100644
--- a/stm/lemmas.ml
+++ b/stm/lemmas.ml
@@ -252,10 +252,14 @@ let save_remaining_recthms (locality,p,kind) norm ctx body opaq i ((id,pl),(t_i,
| Some body ->
let body = norm body in
let k = Kindops.logical_kind_of_goal_kind kind in
- let body_i = match kind_of_term body with
+ let rec body_i t = match kind_of_term t with
| Fix ((nv,0),decls) -> mkFix ((nv,i),decls)
| CoFix (0,decls) -> mkCoFix (i,decls)
+ | LetIn(na,t1,ty,t2) -> mkLetIn (na,t1,ty, body_i t2)
+ | Lambda(na,ty,t) -> mkLambda(na,ty,body_i t)
+ | App (t, args) -> mkApp (body_i t, args)
| _ -> anomaly Pp.(str "Not a proof by induction: " ++ Printer.pr_constr body) in
+ let body_i = body_i body in
match locality with
| Discharge ->
let const = definition_entry ~types:t_i ~opaque:opaq ~poly:p
diff --git a/test-suite/bugs/closed/5065.v b/test-suite/bugs/closed/5065.v
new file mode 100644
index 0000000000..6bd677ba6f
--- /dev/null
+++ b/test-suite/bugs/closed/5065.v
@@ -0,0 +1,6 @@
+Inductive foo := C1 : bar -> foo with bar := C2 : foo -> bar.
+
+Lemma L1 : foo -> True with L2 : bar -> True.
+intros; clear L1 L2; abstract (exact I).
+intros; exact I.
+Qed. \ No newline at end of file