anchor.diff:  and solve_rigid_flex_or_flex_rigid_subtyping
       (rank:rank_t)
       (env:Env.env) (tp:tprob) (wl:worklist) : solution =
  +    let flip = rank = Flex_rigid in
       let meet_or_join op ts env wl =
           let eq_prob t1 t2 wl =
               let p, wl =
  
positive.code:                     UF.rollback tx;
                      None
                in
                match try_eq wl with
                | Some wl -> t1, [], wl
                | None -> fallback()
          in
          let rec aux (out, probs, wl) ts =
              match ts with
  
negative.code:                   | None -> SS.compress t1, SS.compress t2
                in
                let fallback () =
                    match t1, t2 with
                    | {n=Tm_refine(x, phi1)}, {n=Tm_refine(y, phi2)} ->
                      let p, wl = eq_prob x.sort y.sort wl in
                      let x = freshen_bv x in
                      let subst = [DB(0, x)] in
                      let phi1 = SS.subst subst phi1 in
                      let phi2 = SS.subst subst phi2 in
                      (U.refine x (op phi1 phi2), [p], wl)
  
                    | t, {n=Tm_refine(x, phi)}
                    | {n=Tm_refine(x, phi)}, t ->
                      let p, wl = eq_prob x.sort t wl in
                      let x = freshen_bv x in
                      let subst = [DB(0, x)] in
                      let phi = SS.subst subst phi in
                      (U.refine x (op U.t_true phi), [p], wl)
  
                    | _ ->
                      let p, wl = eq_prob t1 t2 wl in
                      (t1, [p], wl)
                in
                let try_eq wl =
                    if U.term_eq t1 t2 then Some wl else
  