- | Success (Some proof, env) ->
- Printf.printf "OK, found a proof!:\n%s\n%.9f\n"
- (PP.pp proof (names_of_context context))
- (finish -. start);
-(* Printf.printf ("forward_simpl_details:\n build_all: %.9f\n" ^^ *)
-(* " demodulate: %.9f\n subsumption: %.9f\n") *)
-(* fs_time_info.build_all fs_time_info.demodulate *)
-(* fs_time_info.subsumption; *)
+ | Success (Some goal, env) ->
+ Printf.printf "OK, found a proof!\n";
+ let proof = Inference.build_proof_term goal in
+ (* REMEMBER: we have to instantiate meta_proof, we should use
+ apply the "apply" tactic to proof and status
+ *)
+ let names = names_of_context context in
+ print_endline (PP.pp proof names);
+(* print_endline (PP.ppterm proof); *)
+
+ print_endline (string_of_float (finish -. start));
+ let newmetasenv =
+ List.fold_left
+ (fun m (_, _, _, menv, _) -> m @ menv) metasenv equalities
+ in
+ let _ =
+ try
+ let ty, ug =
+ CicTypeChecker.type_of_aux' newmetasenv context proof ugraph
+ in
+ Printf.printf
+ "\nGOAL was: %s\nPROOF has type: %s\nconvertible?: %s\n\n"
+ (CicPp.pp type_of_goal names) (CicPp.pp ty names)
+ (string_of_bool
+ (fst (CicReduction.are_convertible context type_of_goal ty ug)));
+ with e ->
+ Printf.printf "MAXMETA USED: %d\n" !maxmeta;
+ in
+ ()
+