Implement `And` and `Or` constraints (#2977) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>