let sourcetype = T.type_of_aux' metasenv context s in
Hashtbl.add ids_to_inner_sorts (source_id_of_id fresh_id'')
(string_of_sort sourcetype) ;
+ let n' =
+ match n with
+ C.Anonymous -> n
+ | C.Name n' ->
+ if D.does_not_occur 1 t then
+ C.Anonymous
+ else
+ C.Name n'
+ in
C.AProd
- (fresh_id'', n, aux' context idrefs s,
+ (fresh_id'', n', aux' context idrefs s,
aux' ((Some (n, C.Decl s))::context) (fresh_id''::idrefs) t)
| C.Lambda (n,s,t) ->
Hashtbl.add ids_to_inner_sorts fresh_id'' innersort ;
val double_type_of :
Cic.metasenv -> Cic.context -> Cic.term -> Cic.term option -> types CicHash.t
+
+(** Auxiliary functions **)
+
+(* does_not_occur n te *)
+(* returns [true] if [Rel n] does not occur in [te] *)
+val does_not_occur : int -> Cic.term -> bool