module PEH = ProofEngineHelpers
module E = CicEnvironment
module UM = UriManager
+module D = Deannotate
(* fresh name generator *****************************************************)
let join (s, i) =
C.Name (if i < 0 then s else s ^ string_of_int i)
-let mk_fresh_name context name =
+let mk_fresh_name context (name, k) =
let rec aux i = function
| [] -> name, i
| Some (C.Name s, _) :: entries ->
if m = name && j >= i then aux (succ j) entries else aux i entries
| _ :: entries -> aux i entries
in
- join (aux (-1) context)
+ join (aux k context)
let mk_fresh_name context = function
| C.Anonymous -> C.Anonymous
- | C.Name s -> mk_fresh_name context s
+ | C.Name s -> mk_fresh_name context (split s)
(* helper functions *********************************************************)
| C.MutConstruct _ -> false
| _ -> true
+let is_atomic t = not (is_not_atomic t)
+
let get_ind_type uri tyno =
match E.get_obj Un.empty_ugraph uri with
| C.InductiveDefinition (tys, _, lpsno, _), _ -> lpsno, List.nth tys tyno
| _ -> assert false
in
ps, disp
+
+let cic = D.deannotate_term