anchor.diff:                  dismiss
               end
           | hd, _ ->
  -            fail (BU.format1 "trefl: not an equality (%s)" (Print.term_to_string t))
  +            fail1 "trefl: not an equality (%s)" (Print.term_to_string t)
           end
        | None ->
           fail "not an irrelevant goal")
  
positive.code:                     | _ -> failwith "apply_lemma: impossible: not a lemma"
      in
      match Rel.try_teq false goal.context (U.mk_squash post) goal.goal_ty with
      | None -> fail (BU.format2 "apply_lemma: does not unify with goal: %s vs %s"
                                   (Print.term_to_string (U.mk_squash post))
                                   (Print.term_to_string goal.goal_ty))
      | Some g ->
          let g = Rel.solve_deferred_constraints goal.context g |> Rel.resolve_implicits in
          let solution = S.mk_Tm_app tm uvs None goal.context.range in
  
negative.code:     | None -> fail "Cannot revert_hd; empty context"
      | Some (y, env') ->
          if not (S.bv_eq x y)
          then fail2 "Cannot revert_hd %s; head variable mismatch ... egot %s"
                                (Print.bv_to_string x)
                                (Print.bv_to_string y)
          else revert)
  
  let rec revert_all_hd (xs:list<name>) : tac<unit> =
  