Add two rewrite rules in mk_mod_core:
1. mod(a + k*y, y) → mod(a, y): removes summands equal to (or integer multiples
of) the symbolic modulus. Valid for all y including y=0 since k*0=0.
2. mod(mod(x, y), y) for symbolic y: rewrites via ite to terminate the
E-matching chain created by the quantifier idempotency rule.
Also add regression tests in src/test/arith_rewriter.cpp covering both new rules.
The arith rewriter now recognizes that x * (x + 1) >= 0 for all
integers, since no integer lies strictly between -1 and 0.
Two changes:
1. is_non_negative: detect products where unpaired factors are
consecutive integer expressions (differ by exactly 1), handling
both +1 and -1 offsets and n-ary additions
2. is_separated: return true for (>= non_negative_mul 0), restricted
to multiplication expressions to avoid disrupting other theories
Also adds regression tests for the new simplification.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>