anchor.diff:               let f = mkFreeV fsym in
                let app = mk_ApplyE f vars in  
                let pre_opt, res_t = Tc.Util.pure_or_ghost_pre_and_post env.tcenv res in
  -             let res_pred, decls' = encode_typ_pred' None res_t env' app in
  +             let res_pred, decls' = encode_typ_pred None res_t env' app in
                let guards, guard_decls = match pre_opt with 
                   | None -> mk_and_l guards, decls
                   | Some pre -> 
  
positive.code:                   let formals, rest = Util.first_N (List.length args_e) formals in
                    let subst = Util.formals_for_actuals formals args_e in
                    let ty = mk_Typ_fun(rest, c) (Some ktype) e0.pos |> Util.subst_typ subst in
                    let has_type, decls'' = encode_typ_pred' None ty env app_tm in
                    let cvars = Term.free_variables has_type in
                    let e_typing = Term.Assume(Term.mkForall([has_type], cvars, has_type), None) in
                    app_tm, decls@decls'@decls''@[e_typing]
  
negative.code:                 let tok_typing, decls2 = 
                      let env = {env with encode_non_total_function_typ=encode_non_total_function_typ} in
                      if not(head_normal env tt) 
                      then encode_typ_pred None tt env vtok_tm 
                      else encode_typ_pred None t_norm env vtok_tm in //NS:Unfortunately, this is duplicated work --- we effectively encode the function type twice
                  let tok_typing = Term.Assume(tok_typing, Some "function token typing") in
                  let tok_decl, env = match formals with 
                          | [] -> decls2@[tok_typing], push_free_var env lid vname (Some <| mkFreeV(vname, Term_sort))
  