false
;;
-
let meta_convertibility t1 t2 =
if t1 = t2 then
true
false
;;
+let meta_convertibility_subst t1 t2 menv =
+ if t1 = t2 then
+ Some([])
+ else
+ try
+ let (l,_) = meta_convertibility_aux ([],[]) t1 t2 in
+ let subst =
+ List.map
+ (fun (x,y) ->
+ try
+ let (_,c,t) = CicUtil.lookup_meta x menv in
+ let irl =
+ CicMkImplicit.identity_relocation_list_for_metavariable c in
+ (x,(c,Cic.Meta(y,irl),t))
+ with CicUtil.Meta_not_found _ ->
+ try
+ let (_,c,t) = CicUtil.lookup_meta y menv in
+ let irl =
+ CicMkImplicit.identity_relocation_list_for_metavariable c in
+ (y,(c,Cic.Meta(x,irl),t))
+ with CicUtil.Meta_not_found _ -> assert false) l in
+ Some subst
+ with NotMetaConvertible ->
+ None
+;;
+
exception TermIsNotAnEquality;;
let term_is_equality term =
(** meta convertibility between two equations *)
val meta_convertibility_eq: equality -> equality -> bool
+val meta_convertibility_subst:
+ Cic.term -> Cic.term -> Cic.metasenv -> Cic.substitution option
val is_weak_identity: equality -> bool
val is_identity: Utils.environment -> equality -> bool