let rec fo_unif_subst subst context metasenv t1 t2 =
let module C = Cic in
- let module R = CicReduction in
+ let module R = CicMetaSubst in
let module S = CicSubstitution in
match (t1, t2) with
(C.Meta (n,ln), C.Meta (m,lm)) when n=m ->
(* First possibility: restriction *)
(* Second possibility: unification *)
(* Third possibility: convertibility *)
- R.are_convertible context t1' t2'
+ R.are_convertible subst context t1' t2'
) true ln lm
in
if ok then
| (C.MutConstruct _, _) | (_, C.MutConstruct _)
| (C.Fix _, _) | (_, C.Fix _)
| (C.CoFix _, _) | (_, C.CoFix _) ->
- if R.are_convertible context t1 t2 then
+ if R.are_convertible subst context t1 t2 then
subst, metasenv
else
raise (UnificationFailure (sprintf
"Can't unify %s with %s because they are not convertible"
(CicPp.ppterm t1) (CicPp.ppterm t2)))
| (_,_) ->
- if R.are_convertible context t1 t2 then
+ if R.are_convertible subst context t1 t2 then
subst, metasenv
else
raise (UnificationFailure (sprintf