anchor.diff:                          | Tm_type _
                           | Tm_arrow _ -> []
                           | _ -> [S.bv_to_name b]) in
  -          let as_lex_list dec =
  -                let head, _ = U.head_and_args dec in
  -                match head.n with (* The decreases clause is always an expression of type lex_t; promote if it isn't *)
  -                    | Tm_fvar fv when S.fv_eq_lid fv Const.lid_Mktuple2 -> dec
  -                    | _ -> mk_lex_tuple [dec] in
             let cflags = U.comp_flags c in
             match cflags |> List.tryFind (function DECREASES _ -> true | _ -> false) with
  -                | Some (DECREASES dec) -> as_lex_list dec
  -                | _ ->
  -                    let xs = bs |> filter_types_and_functions in
  -                    mk_lex_tuple xs
  -      in
  +                | Some (DECREASES l) -> l
  +                | _ -> bs |> filter_types_and_functions in
  +
  +      let precedes_t = TcUtil.fvar_const env Const.precedes_lid in
  +      let rec mk_precedes_lex l l_prev =
  +        match l, l_prev with
  +        | [x], [x_prev] -> mk_Tm_app precedes_t [as_arg x; as_arg x_prev] r
  +        | x::tl, x_prev::tl_prev ->
  +          mk_disj (mk_Tm_app precedes_t [as_arg x; as_arg x_prev] r)
  +                  (mk_conj (mk_untyped_eq3 x x_prev)
  +                           (mk_precedes_lex tl tl_prev)) in
   
         let previous_dec = decreases_clause actuals expected_c in
   
  
positive.code:     | letrecs ->
        let r = Env.get_range env in
        let env = {env with letrecs=[]} in
        let precedes = TcUtil.fvar_const env Const.precedes_lid in
  
        let decreases_clause bs c =
            if debug env Options.Low
  
negative.code:       let _, args = U.head_and_args tc in
        let res, args = List.hd args, List.tl args in
        let flags, guards = c.flags |> List.map (function
          | DECREASES l ->
              let env, _ = Env.clear_expected_typ env in
              let l, g = l |> List.fold_left (fun (l, g) e ->
                let e, _, g_e = tc_tot_or_gtot_term env e in
                l@[e], Env.conj_guard g g_e) ([], Env.trivial_guard) in
              DECREASES l, g
          | f -> f, Env.trivial_guard) |> List.unzip in
        let u = env.universe_of env (fst res) in
        let c = mk_Comp ({c with
  