let module S = CicSubstitution in
let module M = CicMetaSubst in
let module HL = HelmLibraryObjects in
+ (* prerr_endline ("matching " ^ CicPp.ppterm term); *)
let cmp = !Utils.compare_terms in
let check = match termty with C.Implicit None -> false | _ -> true in
function
let what' = Subst.apply_subst subst what in
let other' = Subst.apply_subst subst other in
let subst', menv', ug' =
- unif_fun metasenv m context what' other' ugraph
+ unif_fun [] menv context what' other' ugraph
in
(match Subst.merge_subst_if_possible subst subst' with
| None -> ok_all what leftorright tl
;;
let unification_all x y z =
- subsumption_aux_all true x y z
+ prerr_endline "unification_all"; subsumption_aux_all true x y z
;;
let rec demodulation_aux bag ?from ?(typecheck=false)
in
let res =
- demodulation_aux bag ~from:"3" metasenv' context ugraph table 0 left
+ demodulation_aux bag ~from:"from3" metasenv' context ugraph table 0 left
in
if Utils.debug_res then check_res res "demod result";
let newmeta, newtarget =
Equality.mk_equality bag
(0,Equality.Exact (Cic.Implicit None),(eq_ty,left,right,Utils.Eq),menv)
in
-(* match Indexing.subsumption env table goal_equation with*)
- match Indexing.unification env table goal_equation with
+ match Indexing.subsumption env table goal_equation with
+ (* match Indexing.unification env table goal_equation with *)
| Some (subst, equality, swapped ) ->
(*
prerr_endline
else
p
in (goalproof, p, id, subst, cicmenv))
- (Indexing.unification_all env table goal_equation)
+ (Indexing.subsumption_all env table goal_equation)
+ (* (Indexing.unification_all env table goal_equation) *)
| _ -> assert false
;;
let reflproof = Equality.Exact (Equality.refl_proof uri eq_ty left) in
let m = Subst.apply_subst_metasenv s m in
Some (goalproof, reflproof, 0, s,m)
- with _ -> None)
+ with CicUnification.UnificationFailure _ -> None)
| _ -> None
;;
let cleaned_goal = Utils.remove_local_context type_of_goal in
let canonical_menv,other_menv =
List.partition (fun (_,c,_) -> c = context) metasenv in
- prerr_endline ("other menv = " ^ (CicMetaSubst.ppmetasenv [] other_menv));
+ (* prerr_endline ("other menv = " ^ (CicMetaSubst.ppmetasenv [] other_menv)); *)
let metasenv = List.map (fun (i,_,ty)-> (i,[],ty)) canonical_menv in
let goal = [], List.filter (fun (i,_,_)->i<>goalno) metasenv, cleaned_goal in
debug_print (lazy (string_of_int (List.length (fst active))));
match (check_if_goal_is_identity env goal) with
None -> subsumed
| Some id -> id::subsumed in
+ debug_print (lazy "dopo subsumed");
let res =
List.map
(fun
let uri, metasenv, subst, meta_proof, term_to_prove, attrs = proof in
let proof = uri, other_menv@metasenv, subst, meta_proof, term_to_prove, attrs in
(subst, proof,gl)) subsumed_or_id
- in res, !maxmeta
+ in
+ res, !maxmeta
let given_clause
let cleaned_goal = Utils.remove_local_context type_of_goal in
let canonical_menv,other_menv =
List.partition (fun (_,c,_) -> c = context) metasenv in
- prerr_endline ("other menv = " ^ (CicMetaSubst.ppmetasenv [] other_menv));
+ (* prerr_endline ("other menv = " ^ (CicMetaSubst.ppmetasenv [] other_menv)); *)
Utils.set_goal_symbols cleaned_goal; (* DISACTIVATED *)
let canonical_menv = List.map (fun (i,_,ty)-> (i,[],ty)) canonical_menv in
let metasenv' = List.filter (fun (i,_,_)->i<>goalno) canonical_menv in