Boolean operations on paths