3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-30 04:15:51 +00:00

add stubs for arithmetic

This commit is contained in:
Nikolaj Bjorner 2020-10-12 11:24:08 -07:00
parent e683f4be21
commit 4f0c743e2b
8 changed files with 231 additions and 0 deletions

View file

@ -0,0 +1,34 @@
/*++
Copyright (c) 2020 Microsoft Corporation
Module Name:
arith_axioms.cpp
Abstract:
Theory plugin for arithmetic
Author:
Nikolaj Bjorner (nbjorner) 2020-09-08
--*/
#pragma once
#include "sat/smt/euf_solver.h"
#include "sat/smt/arith_solver.h"
namespace arith {
// q = 0 or q * (p div q) = p
void solver::mk_div_axiom(expr* p, expr* q) {
if (a.is_zero(q)) return;
literal eqz = eq_internalize(q, a.mk_real(0));
literal eq = eq_internalize(a.mk_mul(q, a.mk_div(p, q)), p);
add_clause(eqz, eq);
}
}