- (* debug_print (lazy "PRUNED!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); *)
- [] (* the empty list means no choices, i.e. failure *)
- | No _
- | NotYetInspected ->
- debug_print (lazy ("CURRENT GOAL = " ^ CicPp.ppterm ty));
- debug_print (lazy ("CURRENT PROOF = " ^ CicPp.ppterm p));
- debug_print (lazy ("CURRENT HYP = " ^ CicPp.ppcontext ey));
- let sign, new_sign =
- if is_meta_closed then
- None, Some (MetadataConstraints.signature_of ty)
- else sign,sign in (* maybe the union ? *)
- let local_choices =
- new_search_theorems
- search_theorems_in_context dbd
- proof goal (depth-1) new_sign in
- let global_choices =
- new_search_theorems
- (fun status ->
- List.map snd
- (new_experimental_hint
- ~dbd ~facts:facts ?signature:sign ~universe status))
- dbd proof goal (depth-1) new_sign in
- let all_choices =
- local_choices@global_choices in
- let sorted_choices =
- List.stable_sort
- (fun (_, (_, goals1, _)) (_, (_, goals2, _)) ->
- Pervasives.compare
- (List.length goals1) (List.length goals2))
- all_choices in
- (match (auto_new dbd width already_seen_goals universe sorted_choices)
- with
- [] ->
- (* no proof has been found; we update the
- hastable *)
- (* if is_meta_closed then *)
- Hashtbl.add inspected_goals ty (No depth);
- []
- | (subst,(proof,[],sign))::tl1 ->
- (* a proof for goal has been found:
- in order to get the proof we apply subst to
- Meta[goal] *)
- if is_meta_closed then
- begin
- let irl =
- CicMkImplicit.identity_relocation_list_for_metavariable ey in
- let meta_proof =
- subst (Cic.Meta(goal,irl)) in
- Hashtbl.add inspected_goals
- ty (Yes (meta_proof,depth));
+ (* debug_print (lazy "PRUNED!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); *)
+ [] (* the empty list means no choices, i.e. failure *)
+ | No _
+ | NotYetInspected ->
+ debug_print (lazy ("CURRENT GOAL = " ^ CicPp.ppterm ty));
+ debug_print (lazy ("CURRENT PROOF = " ^ CicPp.ppterm p));
+ debug_print (lazy ("CURRENT HYP = " ^ CicPp.ppcontext ey));
+ let sign, new_sign =
+ if is_meta_closed then
+ None, Some (MetadataConstraints.signature_of ty)
+ else sign,sign in (* maybe the union ? *)
+ let local_choices =
+ new_search_theorems
+ search_theorems_in_context dbd
+ proof goal (depth-1) new_sign in
+ let global_choices =
+ new_search_theorems
+ (fun status ->
+ List.map snd
+ (new_experimental_hint
+ ~dbd ~facts:facts ?signature:sign ~universe status))
+ dbd proof goal (depth-1) new_sign in
+ let all_choices =
+ local_choices@global_choices in
+ let sorted_choices =
+ List.stable_sort
+ (fun (_, (_, goals1, _)) (_, (_, goals2, _)) ->
+ Pervasives.compare
+ (List.length goals1) (List.length goals2))
+ all_choices in
+ (match (auto_new dbd width already_seen_goals universe sorted_choices)
+ with
+ [] ->
+ (* no proof has been found; we update the
+ hastable *)
+ (* if is_meta_closed then *)
+ Hashtbl.add inspected_goals ty (No depth);
+ []
+ | (subst,(proof,[],sign))::tl1 ->
+ (* a proof for goal has been found:
+ in order to get the proof we apply subst to
+ Meta[goal] *)
+ if is_meta_closed then
+ begin
+ let irl =
+ CicMkImplicit.identity_relocation_list_for_metavariable ey in
+ let meta_proof =
+ subst (Cic.Meta(goal,irl)) in
+ Hashtbl.add inspected_goals
+ ty (Yes (meta_proof,depth));