diff options
| author | Jasper Hugunin | 2018-01-06 16:37:06 +0900 |
|---|---|---|
| committer | Jasper Hugunin | 2018-01-17 14:54:14 +0900 |
| commit | 58d209fe36e37b6c0ee4acd702dac333388b1b88 (patch) | |
| tree | 856dcf2dc6b5e9ca2eb083c7640c07ae04308be8 /engine/termops.mli | |
| parent | 8ea2a8307a8d96f8275ebbd9bd4cbd1f6b0a00c6 (diff) | |
Use let-in aware prod_applist_assum in dtauto and firstorder.
Fixes #6490.
`prod_applist_assum` is copied from `kernel/term.ml` to `engine/termops.ml`,
and adjusted to work with econstr.
This change uncovered a bug in `Hipattern.match_with_nodep_ind`, where
`has_nodep_prod_after` counts both products and let-ins, but was only
being passed `mib.mind_nparams`, which does not count let-ins.
Replaced with (Context.Rel.length mib.mind_params_ctxt).
Diffstat (limited to 'engine/termops.mli')
| -rw-r--r-- | engine/termops.mli | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engine/termops.mli b/engine/termops.mli index c1600abe80..1f4c85054d 100644 --- a/engine/termops.mli +++ b/engine/termops.mli @@ -159,8 +159,15 @@ val eta_reduce_head : Evd.evar_map -> constr -> constr (** Flattens application lists *) val collapse_appl : Evd.evar_map -> constr -> constr +(** [prod_applist] [forall (x1:B1;...;xn:Bn), B] [a1...an] @return [B[a1...an]] *) val prod_applist : Evd.evar_map -> constr -> constr list -> constr +(** In [prod_applist_assum n c args], [c] is supposed to have the + form [∀Γ.c] with [Γ] of length [m] and possibly with let-ins; it + returns [c] with the assumptions of [Γ] instantiated by [args] and + the local definitions of [Γ] expanded. *) +val prod_applist_assum : Evd.evar_map -> int -> constr -> constr list -> constr + (** Remove recursively the casts around a term i.e. [strip_outer_cast (Cast (Cast ... (Cast c, t) ... ))] is [c]. *) val strip_outer_cast : Evd.evar_map -> constr -> constr |
