anchor.diff:       let env = Env.push_binders scrutinee_env (pat_bvs |> List.map S.mk_binder) in
        if branch_has_layered_effect
        then
  -       let c = TcUtil.weaken_precondition env c (NonTrivial branch_guard) in
  +       //branch_guard is a boolean, so b2t it
  +       let c = TcUtil.weaken_precondition env c (NonTrivial (U.b2t branch_guard)) in
          c, Env.trivial_guard  //use branch guard for weakening
        else
          match eqs, when_condition with
  
positive.code:                         | None -> []  // We don't use the discriminator if we are typechecking it
                          | _ ->
                              let disc = S.fvar discriminator (Delta_equational_at_level 1) None in
                              let disc = mk_Tm_app disc [as_arg scrutinee_tm] scrutinee_tm.pos in
                              [U.mk_eq2 U_zero U.t_bool disc U.exp_true_bool]
                  else []
              in
  
  
negative.code:          let branch_guard =
              match when_condition with
              | None -> branch_guard
              | Some w -> U.mk_and branch_guard w in
  
            branch_guard
    in
  
    if Env.debug env <| Options.Extreme then
    BU.print1 "tc_eqn: branch guard : %s\n" (Print.term_to_string branch_guard);
  
    (* 6 (a). Build equality conditions between the pattern and the scrutinee                                    *)
    (*   (b). Weaken the VCs of the branch and when clause with the equalities from 6 (a) and the when condition *)
    (*        For layered effects, we weaken with the branch guard instead                                       *)
  