WARNING: This package is experimental! Use it only to find bugs.
This package extends SymbolicUtils expression simplification with a theorem prover.
It is a wrapper around a wrapper to The Z3 Theorem Prover.
Usage:
using SymbolicUtils, SymbolicSAT
- Construct a
Constraints([cs...])
wherecs
are boolean expressions - Pass it as the second argument to
simplify
julia> using SymbolicUtils, SymbolicSAT
julia> @syms a::Real b::Real
(a, b)
julia> constraints = Constraints([a^2 + b^2 < 4])
Constraints:
((a ^ 2) + (b ^ 2)) < 4
julia> simplify((a < 2) & (b < 2), Constraints([a^2 + b^2 < 4]))
true
Thanks to the author of Z3.jl for the Julia bindings and answering my questions!