anchor.diff:      | [] -> fail "No more goals (1)"
       | hd::tl -> ret hd)
   
  -let add_irrelevant_goal (env:env) (phi:typ) opts : tac<unit> =
  +let mk_irrelevant_goal (env:env) (phi:typ) opts : tac<goal> =
       let typ = U.mk_squash phi in
       bind (new_uvar env typ) (fun u ->
       let goal = { context = env; witness = u; goal_ty = typ; opts = opts } in
  +    ret goal)
  +
  +let add_irrelevant_goal env phi opts : tac<unit> =
  +    bind (mk_irrelevant_goal env phi opts) (fun goal ->
       add_goals [goal])
  +
  +let push_irrelevant_goal env phi opts : tac<unit> =
  +    bind (mk_irrelevant_goal env phi opts) (fun goal ->
  +    push_goals [goal])
  +
  +let istrivial (e:env) (t:term) : bool =
  +    let steps = [N.Reify; N.UnfoldUntil Delta_constant; N.Primops; N.Simplify; N.UnfoldTac] in
  +    let t = normalize steps e t in
  +    is_true t
  +
  +let trivial : tac<unit> =
  +    bind cur_goal (fun goal ->
  +    if istrivial goal.context goal.goal_ty
  +    then (solve goal U.exp_unit; dismiss)
  +    else fail1 "Not a trivial goal: %s" (Print.term_to_string goal.goal_ty)
  +    )
  +
  +let add_goal_from_guard (e:env) (g : guard_t) opts : tac<unit> =
  +    match (Rel.simplify_guard e g).guard_f with
  +    | TcComm.Trivial -> ret ()
  +    | TcComm.NonTrivial f ->
  +        push_irrelevant_goal e f opts
   
   let smt : tac<unit> =
       bind cur_goal (fun g ->
  
positive.code: module Print = FStar.Syntax.Print
  module TcUtil = FStar.TypeChecker.Util
  module TcTerm = FStar.TypeChecker.TcTerm
  module N = FStar.TypeChecker.Normalize
  module RD = FStar.Reflection.Data
  module UF = FStar.Syntax.Unionfind
  
negative.code:              | x::xs -> if f x xs then x::(filter' f xs) else filter' f xs
          in
          let sub_goals = filter' (fun g goals -> not (checkone g.witness goals)) sub_goals in
          bind (add_goal_from_guard goal.context guard goal.opts) (fun _ ->
          bind (add_goal_from_guard goal.context g   goal.opts) (fun _ ->
          bind (add_irrelevant_goal goal.context pre goal.opts) (fun _ ->
          // Try to discharge the precondition, which is often trivial
          bind (trytac trivial) (fun _ ->
          add_goals sub_goals))))))))
  
  let destruct_eq' (typ : typ) : option<(term * term)> =
      match U.destruct_typ_as_formula typ with
  