(* bitvector modules, is not in smt-libv2.gen since cvc4 and z3 don't
   have the same name for the function to_int *)

theory bv.BV_Gen
  syntax function to_uint "(bv2nat %1)"
end

theory bv.BV256
  (* mapping of_int to int2bv is disabled because it breaks proofs
     in examples/bitcount, examples/esterel,
     examples/isqrt_von_neumann, examples/rightmostbittrick,
     examples/bitwalker *)

  (* syntax function of_int "((_ int2bv 256) %1)" *)
  syntax function t'int "(bv2nat %1)"
end

theory bv.BV128
  (* syntax function of_int "((_ int2bv 128) %1)" *)
  syntax function t'int "(bv2nat %1)"
end

theory bv.BV64
  (* syntax function of_int "((_ int2bv 64) %1)" *)
  syntax function t'int "(bv2nat %1)"
end

theory bv.BV32
  (* syntax function of_int "((_ int2bv 32) %1)" *)
  syntax function t'int "(bv2nat %1)"
end

theory bv.BV16
  (* syntax function of_int "((_ int2bv 16) %1)" *)
  syntax function t'int "(bv2nat %1)"
end

theory bv.BV8
  (* syntax function of_int "((_ int2bv 8) %1)" *)
  syntax function t'int "(bv2nat %1)"
end
