aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/inv.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-11-12 01:28:45 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-02-14 17:28:47 +0100
commit45562afa065aadc207dca4e904e309d835cb66ef (patch)
tree2d7420427a49f17c2fb0d66ec8f38fe1df63abdb /tactics/inv.ml
parent0489e8b56d7e10f7111c0171960e25d32201b963 (diff)
Tacticals API using EConstr.
Diffstat (limited to 'tactics/inv.ml')
-rw-r--r--tactics/inv.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/tactics/inv.ml b/tactics/inv.ml
index 2f5186f81..60f1c3542 100644
--- a/tactics/inv.ml
+++ b/tactics/inv.ml
@@ -443,7 +443,8 @@ let raw_inversion inv_kind id status names =
let msg = str "The type of " ++ pr_id id ++ str " is not inductive." in
CErrors.user_err msg
in
- let IndType (indf,realargs) = find_rectype env sigma (EConstr.of_constr t) in
+ let t = EConstr.of_constr t in
+ let IndType (indf,realargs) = find_rectype env sigma t in
let evdref = ref sigma in
let (elim_predicate, args) =
make_inv_predicate env evdref indf realargs id status concl in
@@ -463,13 +464,14 @@ let raw_inversion inv_kind id status names =
in
let neqns = List.length realargs in
let as_mode = names != None in
+ let elim_predicate = EConstr.of_constr elim_predicate in
let tac =
(tclTHENS
(assert_before Anonymous cut_concl)
[case_tac names
(introCaseAssumsThen false (* ApplyOn not supported by inversion *)
(rewrite_equations_tac as_mode inv_kind id neqns))
- (Some elim_predicate) ind (c, t);
+ (Some elim_predicate) ind (EConstr.of_constr c,t);
onLastHypId (fun id -> tclTHEN (refined id) reflexivity)])
in
Sigma.Unsafe.of_pair (tac, sigma)