1

I recently am trying out z3-solver to simplify expressions and have some questions about it.

According to my understanding, function simplify() and two other tactics including ctx-simplify and ctx-solver-simplify can be used to simplify an expression (https://microsoft.github.io/z3guide/programming/Example%20Programs/Formula%20Simplification/) For example, given e = Or(x >= 3, x >= 5) where x is Int.

  • simplify(e) returns Or(x >= 3, x >= 5)
  • Tactic('ctx-simplify').apply(e) returns Or(x >= 3, x >= 5)
  • Tactic('ctx-solver-simplify').apply(e) returns Or(x >= 3, x >= 5)

Since my expected result is x >= 3, I have the following questions:

  1. Are there any better built-in functions ?
  2. If there is no better built-in function, how to achieve the result: x >= 3 ?

Thanks in advance !

Hugevn
  • 156
  • 6
  • 2
    Does [this](https://stackoverflow.com/a/65045586/1911064) related post answer your question? – Axel Kemper Apr 21 '23 at 14:24
  • Yes, my problem is related to the one you suggested. Thanks for your answer ! – Hugevn Apr 25 '23 at 08:57
  • Does this answer your question? [Z3 Boolean Expression Simplification](https://stackoverflow.com/questions/65022373/z3-boolean-expression-simplification) – alias May 01 '23 at 15:52

0 Answers0