let eq,ty,l,r = open_eq ty in
contextualize eq ty l r t
;;
-
+
+let add_subst subst =
+ function
+ | Exact t -> Exact (Subst.apply_subst subst t)
+ | Step (s,(rule, id1, (pos,id2), pred)) ->
+ Step (Subst.concat subst s,(rule, id1, (pos,id2), pred))
+;;
+
let build_proof_step ?(sym=false) lift subst p1 p2 pos l r pred =
let p1 = Subst.apply_subst_lift lift subst p1 in
let p2 = Subst.apply_subst_lift lift subst p2 in
cic, p))
lets (letsno-1,initial)
in
- canonical (contextualize_rewrites proof (CicSubstitution.lift letsno ty)),
- se
+ (proof,se)
+ (* canonical (contextualize_rewrites proof (CicSubstitution.lift letsno ty)),
+ se *)
;;
let refl_proof ty term =
let fix_metas newmeta eq =
let w, p, (ty, left, right, o), menv,_ = open_equality eq in
let to_be_relocated =
+(* List.map (fun i ,_,_ -> i) menv *)
HExtlib.list_uniq
(List.sort Pervasives.compare
(Utils.metas_of_term left @ Utils.metas_of_term right))
let unification_aux b metasenv1 metasenv2 context t1 t2 ugraph =
let metasenv =
- HExtlib.list_uniq (List.sort Pervasives.compare (metasenv1 @ metasenv2))
- (*metasenv1 @ metasenv2*)
+ HExtlib.list_uniq (List.sort Pervasives.compare (metasenv1 @ metasenv2))
+ (* metasenv1 @ metasenv2 *)
in
let subst, menv, ug =
if not (is_simple_term t1) || not (is_simple_term t2) then (
(fun acc goal ->
match simplify_goal env goal ~passive active with
| _, g -> if find g acc then acc else g::acc)
- [] active_goals
+ active_goals active_goals
in
if List.length active_goals <> List.length simplified then
prerr_endline "SEMPLIFICANDO HO SCARTATO...";
~newmetasenv:metasenv ~oldmetasenv:proof_menv)
in
let goal_proof, side_effects_t =
- let initial = newproof in
+ let initial = Equality.add_subst subsumption_subst newproof in
Equality.build_goal_proof goalproof initial type_of_goal side_effects
in
(*prerr_endline (CicPp.pp goal_proof names);*)
- let goal_proof = Subst.apply_subst subsumption_subst goal_proof in
+ (* ?? *)
+ let goal_proof = (* Subst.apply_subst subsumption_subst *) goal_proof in
let side_effects_t =
List.map (Subst.apply_subst subsumption_subst) side_effects_t
in