@@ -576,8 +576,10 @@ convEq ctxt holes topx topy = ceq [] topx topy where
576576 | x `elem` holes || y `elem` holes = return True
577577 | x == y || (x, y) `elem` ps || (y,x) `elem` ps = return True
578578 | otherwise = sameDefs ps x y
579− ceq ps x (Bind n (Lam t) (App y (V 0))) = ceq ps x y
580− ceq ps (Bind n (Lam t) (App x (V 0))) y = ceq ps x y
579+ ceq ps x (Bind n (Lam t) (App y (V 0)))
580+ = ceq ps x (substV (P Bound n t) y)
581+ ceq ps (Bind n (Lam t) (App x (V 0))) y
582+ = ceq ps (substV (P Bound n t) x) y
581583 ceq ps x (Bind n (Lam t) (App y (P Bound n' _)))
582584 | n == n' = ceq ps x y
583585 ceq ps (Bind n (Lam t) (App x (P Bound n' _))) y