try
unification metasenv context t1 t2 ugraph
with CicUtil.Meta_not_found _ as exn ->
- Printf.eprintf "t1 = %s\nt2 = %s\nmetasenv = %s\n%!"
+ Printf.eprintf "t1 == %s\nt2 = %s\nmetasenv == %s\n%!"
(CicPp.ppterm t1) (CicPp.ppterm t2) (CicMetaSubst.ppmetasenv [] metasenv);
raise exn
in
type environment = Cic.metasenv * Cic.context * CicUniv.universe_graph;;
+let is_weak_identity (metasenv, context, ugraph) = function
+ | (_, _, (ty, left, right, _), menv, _) ->
+ (left = right ||
+ (meta_convertibility left right))
+ (* the test below is not a good idea since it stops
+ demodulation too early *)
+ (* (fst (CicReduction.are_convertible
+ ~metasenv:(metasenv @ menv) context left right ugraph)))*)
+;;
let is_identity (metasenv, context, ugraph) = function
| (_, _, (ty, left, right, _), menv, _) ->
(left = right ||
- (* (meta_convertibility left right) || *)
- (fst (CicReduction.are_convertible
+ (* (meta_convertibility left right)) *)
+ (fst (CicReduction.are_convertible
~metasenv:(metasenv @ menv) context left right ugraph)))
;;