anchor.diff:               ret (ut, ctrl))))))
   
   let topdown_rewrite (ctrl:term -> ctrl_tac<rewrite_result>)
  -                    (rewriter:tac<unit>) : tac<unit> =
  +                    (rewriter:tac<unit>) : tac<unit> = wrap_err "topdown_rewrite" <|
       bind get (fun ps ->
       let g, gs = match ps.goals with
                   | g::gs -> g, gs
  -                | [] -> failwith "Pointwise: no goals"
  +                | [] -> failwith "no goals"
       in
       let gt = g.goal_ty in
       log ps (fun () ->
  
positive.code:          end)
  
  (* TODO: move to bv *)
  let norm_binder_type (s : list<EMB.norm_step>) (b : binder) : tac<unit> =
      bind (cur_goal ()) (fun goal ->
      let bv, _ = b in
      match split_env bv goal.context with
      | None -> fail "binder_retype: binder is not present in environment"
      | Some (e0, bvs) -> begin
          let steps = [N.Reify; N.UnfoldTac]@(N.tr_norm_steps s) in
          let sort' = normalize steps e0 bv.sort in
  
negative.code:         | Tm_fvar fv, [_; (l, _); (r, _)] when S.fv_eq_lid fv PC.eq2_lid ->
              bind (do_unify g.context l r) (fun b ->
              if not b
              then fail2 "not a trivial equality (%s vs %s)" (tts g.context l) (tts g.context r)
              else solve g U.exp_unit)
          | hd, _ ->
              fail1 "not an equality (%s)" (tts g.context t)
          end
       | None ->
          fail "not an irrelevant goal")
  