# Simplifying between set theory and logical connectives

I'm trying to find out how to switch between set notation and logic, but am having difficulty. For instance, I know that the following two expressions are equivalent

x ∈ (A ⋂ B) ⋃ (A ⋂ C)

(x ∈ A ∧ x ∈ B) ∨ (x ∈ A ∧ x ∈ C)


I had to manually type this out. Ideally, I'd like to know how to simplify or expand one into the other using Mathematica operations. Mathematica doesn't even seem to recognize that this is a valid way of writing logic notation, and gives me an error.

Part of the problem is I am unable to use the ∈ operator on sets or objects. I tried defining a list with a set of real numbers {1, 2, 3}, but that didn't help me use elements with sets. I will have more complicated set formulas to simplify, and I'd like to know how to do them. I'm a little new to Mathematica.

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Dec 13 '15 at 1:23
• As you have seen, Mathematica is not going to handle set operations using "abstract" sets. So the second way of formulating the set inclusions is the way to proceed. From there one can bring some logic methods to bear if so desired, for example: In[45]:= BooleanConvert[(Element[x, a] && Element[x, b]) || (Element[x, a] && Element[x, c]), "CNF"] Out[45]= x \[Element] a && (x \[Element] b || x \[Element] c) – Daniel Lichtblau Dec 13 '15 at 22:06
• @daniel I can't comment (not enough reputation points). That was helpful for a first step, but how to switch between sets and logical connectives? The booleanconvert got me past the errors, but how does one convert to between the two types? – tom Dec 14 '15 at 2:46
• I'm not really sure that one can go between these. Pretty sure the set operations are simply not going to handle abstract sets as opposed to concrete sets (represented e.g. as List[...]). Maybe there is a way but if so I am not familiar with it. – Daniel Lichtblau Dec 14 '15 at 4:42