How could we extend something like `known_facts` to handle relations like these?

What is the underlying structure here and how can we generalize it?  `Q.zero(Mul(*args)) iff any(Q.zero(arg))`?  Presumably this will come up in other predicate-operator-predicate triples.