anchor.diff:  let max x y = if x > y then x else y
   
   // VD: copied over from NBE, should both probably go in FStar.List
  -let map_rev (f : 'a -> 'b) (l : list<'a>) : list<'b> =
  +let map_rev (f: 'a -> 'b) (l: list<'a>): list<'b> =
     let rec aux (l:list<'a>) (acc:list<'b>) =
       match l with
       | [] -> acc
       | x :: xs -> aux xs (f x :: acc)
  -  in  aux l []
  -
  +  in
  +  aux l []
  +
  +let rec map_if_all (f: 'a -> option<'b>) (l: list<'a>): option<list<'b>> =
  +  let rec aux l acc =
  +    match l with
  +    | [] -> acc
  +    | x :: xs ->
  +      (match f x with
  +       | Some r -> aux xs (r :: acc)
  +       | None -> [])
  +  in
  +  let r = aux l [] in
  +  if List.length l = List.length r then
  +    Some r
  +  else None
  +
  +let rec all (f: 'a -> bool) (l: list<'a>): bool =
  +  match l with
  +  | [] -> true
  +  | x :: xs -> if f x then all f xs else false
   
   (* [should_print_fs_typ_app] is set when encountering a [LightOff] pragma and *)
   (* reset at the end of each module. If you are using individual print function you *)
  
positive.code: 
  and p_typ_top' style ps pb e = p_tmArrow style p_tmFormula e
  
  and p_quantifier e = match e.tm with
      | QForall _ -> str "forall"
      | QExists _ -> str "exists"
  
negative.code:           has_attrs = false;
            is_fsdoc = false })
    | Val(lid, t) ->
      group <| str "val" ^^ space ^^ p_lident lid ^^ (sig_as_binders_if_possible t false)
      (* KM : not exactly sure which one of the cases below and above is used for 'assume val ..'*)
    | Assume(id, t) ->
      let decl_keyword =
  