import "cvc5.drv"
import "smt-libv2-gnatprove.gen"
import "smt-libv2-floats-gnatprove.gen"
import "smt-libv2-floats-int_via_real.gen"

steps "resource::resourceUnitsUsed = \\([0-9]+.?[0-9]*\\)" 1

theory int.EuclideanDivision
  syntax function div "(div %1 %2)"
  syntax function mod "(mod %1 %2)"

  remove allprops
end

theory int.ComputerDivision
  prelude "(define-fun __cdiv ((x Int) (y Int)) Int (ite (>= x 0) (div x y) (- (div (- x) y))))"
  prelude "(define-fun __cmod ((x Int) (y Int)) Int (ite (>= x 0) (mod x y) (- (mod (- x) y))))"

  syntax function div "(__cdiv %1 %2)"
  syntax function mod "(__cmod %1 %2)"

  remove allprops
end

theory real.Real
  remove prop add_div
  remove prop sub_div
  remove prop neg_div
  remove prop assoc_mul_div
  remove prop assoc_div_mul
  remove prop assoc_div_div
  remove prop CompatOrderMult
end