Online, I have read contradicting opinions on whether intersect should take precedence over union (by analogy to logical and and or), or whether all set operators should have equal precedence.

Which way makes more sense and why?

And where does difference fit in? (I'd say it should be equal precedence to intersect because A - B = A intersect B'.)

  • $\begingroup$ What do you mean with "precedence" here? $\endgroup$
    – Rasmus
    Oct 11, 2010 at 13:33
  • $\begingroup$ Yeah the connection with arithmetic operators is the second best guide. Usually you can just figure it out by looking at which bracketing make sense though. $\endgroup$
    – anon
    Oct 11, 2010 at 13:34
  • 2
    $\begingroup$ @Rasmus: Operator precedence determines whether A union B intersect C is (A union B) intersect C or A union (B intersect C). $\endgroup$ Oct 11, 2010 at 17:01
  • 1
    $\begingroup$ I was half way through the first chapter of Stoll's Set Theory and Logic, when I realized he had not introduced a rule of precedence for intersection over union. Before that, I would not have hesitated to say that intersection binds more closely than union. To my knowledge there is a complete isomorphism between the logical operators $\wedge$, $\vee$ and the set operators $\cap$, $\cup$. It would therefore stand to reason that the same evaluation rules should apply to both realms. But that's an anthropological rather than a logical matter. Perhaps we should, here and now, declare it so. $\endgroup$ Dec 29, 2017 at 16:47

2 Answers 2


There is no sensible way of preferring one of intersection and union more than the other, since complement switches them. I don't think you should assume an order at all and you should always use parentheses.


Since there are contradicting opinions, I recommend assuming that whoever is reading your work assumes a different precedence order than you do, and using lots of parentheses.

  • $\begingroup$ Good rule of thumb, so ++. But I was looking for arguments for why the precedence should be one way or the other if you got to choose. $\endgroup$ Oct 11, 2010 at 23:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .