anchor.diff:            meet_or_join (if flip then U.mk_conj else U.mk_disj) bounds_typs env wl
         in
         let eq_prob, wl =
  -            new_problem wl env bound EQ this_flex None tp.loc
  +          let _, flex_u, _ = destruct_flex_t this_flex in
  +          let bound =
  +            //We get constraints of the form (x:?u{phi} <: ?u)
  +            //This cannot be solved with an equality constraints
  +            //So, turn the bound on the LHS to just ?u
  +            match (SS.compress bound).n with
  +            | Tm_refine (x, phi)
  +              when tp.relation=SUB
  +                && snd (occurs flex_u x.sort) ->
  +              x.sort
  +            | _ ->
  +              bound
  +          in
  +          new_problem wl env bound EQ this_flex None tp.loc
                   (if flip then "joining refinements" else "meeting refinements")
         in
         let _ = if Env.debug env <| Options.Other "RelCheck"
  
positive.code:   let this_flex, this_rigid = if flip then tp.lhs, tp.rhs else tp.rhs, tp.lhs in
    begin
    match (SS.compress this_rigid).n with
    | Tm_arrow _ ->
      let flex = destruct_flex_t this_flex in
      begin
      match quasi_pattern env flex with
      | None -> giveup env "flex-arrow subtyping, not a quasi pattern" (TProb tp)
      | Some (flex_bs, flex_t) ->
        if Env.debug env <| Options.Other "RelCheck"
        then BU.print1 "Trying to solve by imitating arrow:%s\n" (string_of_int tp.pid);
        imitate_arrow (TProb tp) env wl flex flex_bs flex_t tp.relation this_rigid
      end
  
    | _ ->
      if Env.debug env <| Options.Other "RelCheck"
      then BU.print1 "Trying to solve by meeting refinements:%s\n" (string_of_int tp.pid);
  
negative.code:            raise_error (Errors.Fatal_FailToResolveImplicitArgument,
                          BU.format4 "Failed to resolve implicit argument %s of type %s introduced for %s (should check=%s)"
                                      (Print.uvar_to_string ctx_u.ctx_uvar_head)
                                      (N.term_to_string env ctx_u.ctx_uvar_typ)
                                      reason
                                      (BU.string_of_bool should_check)) r
  
  