We'll need to generalize this at some point for more complicated predicates.