let rec map f a =
  match a with
    | App(Bvarith(Unsigned), [x]) ->
        let x' = map f x in
          if x == x' then a else
            mk_unsigned x'
    | _ -> 
        f a