Is it legal to use the cardinality of a universal quantifier in relational calculus?

66 Views Asked by At

For example, if I wanted to make a set of all $x$'s that satisfied some predicate function $f(x, y)$ with exactly 2 different values of $y$, is this a legal statement:

$\{x |\ |(\forall y)(f(x, y))|=2 \}$