logical operations on parts of pairs