Skip to content
Discussion options

You must be logged in to vote

Here's a quick ready-to-copy method:

>>> from z3 import *
>>> from functools import *
>>> Cond = partial(reduce, lambda e, p: If(*p, e))
>>> a, b, c, d, e, f = Bools('a b c d e f')
>>> Cond([(e, f), (c, d), (a, b)], False)
If(a, b, If(c, d, If(e, f, False)))

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@gmCAD
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by gmCAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants