let is_one = function
  | App(Arith(Num(q)), []) -> Q.is_one q
  | _ -> false