+let in_universe univ ty =
+ let candidates = get_candidates univ ty in
+ List.fold_left
+ (fun res cand ->
+ match res with
+ | Some found -> Some found
+ | None ->
+ let candty,_ =
+ CicTypeChecker.type_of_aux' [] [] cand CicUniv.oblivion_ugraph in
+ let same ,_ =
+ CicReduction.are_convertible [] candty ty CicUniv.oblivion_ugraph in
+ if same then Some cand else None
+ ) None candidates
+;;
+