3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-08 05:32:48 +00:00

Add mod-factor-propagation lemma to NLA divisions solver

When a monic x*y has a factor x with mod(x, p) = 0 (fixed), propagate
mod(x*y, p) = 0. This enables Z3 to prove divisibility properties like
x mod p = 0 => (x*y) mod p = 0, which previously timed out even for
p = 2. The lemma fires in the NLA divisions check and allows Gröbner
basis and LIA to subsequently derive distributivity of div over addition.

Extends division tuples from (q, x, y) to (q, x, y, r) to track the
mod lpvar. Also registers bounded divisions from the mod internalization
path in theory_lra, not just the idiv path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Arie Gurfinkel 2026-04-05 14:24:33 -04:00
parent 8d7ed66ebf
commit cf00de9c57
9 changed files with 169 additions and 42 deletions

View file

@ -87,6 +87,7 @@ add_executable(test-z3
memory.cpp
model2expr.cpp
model_based_opt.cpp
mod_factor.cpp
model_evaluator.cpp
model_retrieval.cpp
monomial_bounds.cpp