This sounds like an occurrence of: can the database enforce constraints across rows?
(I assume that the
X sign in the formula means "such that")
As a general rule, the answer is no, because when a row is being modified by a transaction, the state of the other rows is always uncertain due to possible modifications by not-yet-committed concurrent transactions.
An application may handle this correctly by implementing an adequate locking strategy preventing concurrent writes, or checking the constraint at the serializable isolation level, but that does not prevent a random session to just issue an UPDATE in the table without these safety measures, that would potentially result in quietly violating the constraint.
There are few kinds of table-level constraints that the SQL engine knows how to enforce, like unique constraints and exclusion constraints, but your formula doesn't look like an expression that could be used by such constraints.