check fails. This is a major speed up, for instance for
cic:/Coq/ZArith/Zsqrt/sqrtrempos.con
=
let module C = Cic in
let module U = UriManager in
- match CicReduction.whd ~subst context t with
+ let t = CicReduction.whd ~delta:false ~subst context t in
+ let res =
+ match t with
C.Rel m when m > n && m <= nn -> false
| C.Rel m ->
(match List.nth context (m-1) with
List.fold_right
(fun t i -> i && guarded_by_destructors rec_uri rec_uri_len ~logger ~metasenv ~subst context n nn kl x safes t)
tl true
+ in
+ if res then res
+ else
+ let t' = CicReduction.whd ~subst context t in
+ if t = t' then
+ false
+ else
+ guarded_by_destructors rec_uri rec_uri_len ~logger ~metasenv ~subst context n nn kl x safes t'
(* the boolean h means already protected *)
(* args is the list of arguments the type of the constructor that may be *)