let log1 s c t =
let sc, st = s ^ " in the context", "the term" in
L.log O.specs level (L.ct_items1 sc c st t)
let log1 s c t =
let sc, st = s ^ " in the context", "the term" in
L.log O.specs level (L.ct_items1 sc c st t)
-let log2 s c u t =
- let sc, su, st = s ^ " in the context", "the term", "and the term" in
- L.log O.specs level (L.ct_items2 sc c su u st t)
+let log2 s cu u ct t =
+ let s1, s2, s3 = s ^ " in the context", "the term", "and in the context" in
+ L.log O.specs level (L.ct_items2 s1 cu s2 u s3 ct s2 t)
begin match m.s with
| [] -> f m (Bind_ (l, id, w, t))
| v :: tl ->
begin match m.s with
| [] -> f m (Bind_ (l, id, w, t))
| v :: tl ->
- let f mc = whd f c {m with c = mc; s = tl} t in
- B.push f m.c l id (B.Abbr (B.Cast (w, v)))
+ let nl = B.new_location () in
+ let f mc = S.subst (whd f c {m with c = mc; s = tl}) nl l t in
+ B.push "!" f m.c nl id (B.Abbr (B.Cast (w, v)))
end
| B.Bind (l, id, b, t) ->
end
| B.Bind (l, id, b, t) ->
match r1, r2 with
| Sort_ h1, Sort_ h2 ->
if h1 = h2 then f a else f false
| LRef_ (i1, _), LRef_ (i2, _) ->
match r1, r2 with
| Sort_ h1, Sort_ h2 ->
if h1 = h2 then f a else f false
| LRef_ (i1, _), LRef_ (i2, _) ->
| GRef_ (a1, _, B.Abst _), GRef_ (a2, _, B.Abst _) ->
| GRef_ (a1, _, B.Abst _), GRef_ (a2, _, B.Abst _) ->
| GRef_ (a1, _, B.Abbr v1), GRef_ (a2, _, B.Abbr v2) ->
if a1 = a2 then
| GRef_ (a1, _, B.Abbr v1), GRef_ (a2, _, B.Abbr v2) ->
if a1 = a2 then
- let f a = if a then f a else are_convertible f true c m1 v1 m2 v2 in
- are_convertible_stacks f a c m1 m2
+ let f a =
+ if a then f a else are_convertible f ~si true c m1 v1 m2 v2
+ in
+ are_convertible_stacks f ~si a c m1 m2
| GRef_ (_, _, B.Abbr v1), _ ->
whd (aux_rev m2 r2) c m1 v1
| Bind_ (l1, id1, w1, t1), Bind_ (l2, id2, w2, t2) ->
| GRef_ (_, _, B.Abbr v1), _ ->
whd (aux_rev m2 r2) c m1 v1
| Bind_ (l1, id1, w1, t1), Bind_ (l2, id2, w2, t2) ->
- | Sort_ _, Bind_ (l2, id2, w2, t2) when !nsi ->
+ | Sort_ _, Bind_ (l2, id2, w2, t2) when si ->
| _ -> f false
and aux_rev m2 r2 m1 r1 = aux m1 r1 m2 r2 in
let g m1 r1 = whd (aux m1 r1) c m2 t2 in
if a = false then f false else whd g c m1 t1
| _ -> f false
and aux_rev m2 r2 m1 r1 = aux m1 r1 m2 r2 in
let g m1 r1 = whd (aux m1 r1) c m2 t2 in
if a = false then f false else whd g c m1 t1
- L.box level; log2 "Now converting" c u t;
- are_convertible f true c empty_machine u empty_machine t
+ L.box level; log2 "Now converting" c u c t;
+ are_convertible f ~si true c empty_machine u empty_machine t