So I want to determine the following:

`and(..., x, not(x)) -> and(..., 0)`

So in this case, given two constants, see if `x`

and `not(x)`

exist, and if they do, drop them and add a zero in the rewrite.

A simple manner of approaching this is getting their constant values `value1`

, `value2`

and see if `value1 & value2 == 0`

. However, this does require comparing all constants. So my question: Is there a better way to do this? Are there any guarantees about `x`

and `not(x)`

being next each other or something else that I’m missing?

Documentation and examples very welcome. Thanks!