pattern boolean operations