sometimes whd is not enough, we need normalize ...
let classify c t =
try
- let vs, h = PEH.split_with_whd (c, t) in
+ let vs, h = PEH.split_with_normalize (c, t) in
let rc = classify_conclusion vs in
let map (b, h) (c, v) =
let _, argsno = PEH.split_with_whd (c, v) in
in
aux false [] 0 c t
+let split_with_normalize (c, t) =
+ let add s v c = Some (s, Cic.Decl v) :: c in
+ let rec aux a n c = function
+ | Cic.Prod (s, v, t) -> aux ((c, v) :: a) (succ n) (add s v c) t
+ | v -> (c, v) :: a, n
+ in
+ aux [] 0 c (CicReduction.normalize c t)
(* menv sorting *)
module OT =
t and t_i is the premise of t accessed by Rel i in t_0.
Performes a whd on the conclusion before giving up.
Each t_i is returned with a context c_i in wich it is typed
+ split_with_normalize (c, t) normalizes t before operating the split
+ whd is useless here
*)
val split_with_whd: Cic.context * Cic.term ->
(Cic.context * Cic.term) list * int
+val split_with_normalize: Cic.context * Cic.term ->
+ (Cic.context * Cic.term) list * int