When the new AST and Function interfaces were written, it was a conscious choice not to introduce the concept of a Predicate into the external API. There was several reasons, but the main being that a "predicate" is just an expression that happens to have a boolean type. There was a `LegacyPredicate` helper exposed, but only because the legacy commands still have a separate `Predicate` concept, and it was desired not to refactor that away at the time (lest it become too big a piece of work).

It seems unfortunate to expose it more now: perhaps we should try going the other way, and remove the distinction between Expression and Predicate in the command layer? That would allow other beneficial side effects, like having any Expression usable in a boolean context, through runtime coercion.