# Reduce a set expression in Mahematica [closed]

For example:

Given $A\subset B$ reduce $\left [ (B\triangle C )\bigcap (A-B)\bigcap (A \triangle B) \right ]\bigcup B$

$A \triangle B$ denotes the symmetric difference of the two sets.

### Edit

Possible results

A, B, C, U, $\phi$

• What Mathematica operator are you expressing with Δ? – m_goldberg Feb 16 '17 at 4:49
• You should also give the result you expect to get from reducing your example expression under the given condition. – m_goldberg Feb 16 '17 at 4:53
• Symmetric difference – lilo Feb 16 '17 at 4:54
• You should express your problem in Mathematica terms, not general set-theoretical terms. Please express your example expression in Mathematica syntax, – m_goldberg Feb 16 '17 at 5:10
• [(b Xor c) && Complement[a, b] && (a Xor b)] v b // Simplify -> Assuming a C b <---error – lilo Feb 16 '17 at 5:14

Set theory operations can be expressed through Boolean operations. Your expression is equivalent to

(Xor[b, c] && (a && ! b) && Xor[a, b]) || b


Think of a as standing for the statement $x \in A$, etc. Then e.g. $x \in (A - B)$ is equivalent to $x \in A \wedge x \notin B$. Thus for $A - B$ we write a && !b. Similarly, the symmetric difference is equivalent to Xor.

The expression above can be simplified to

Simplify[(Xor[b, c] && (a && ! b) && Xor[a, b]) || b]
(* (a && c) || b *)


We still need to use the fact that $A \subset B$. Think of this as $x \in A \Rightarrow x \in B$. Thus

Simplify[Implies[a, b] && %]
(* b *)


The result is b, i.e. $B$.

• I understood everything except the && % of the last line, you would be so kind To explain to me what is similar, thank you for your time $\left ( A-B \right )^{c}-\left ( B-C \right )^{c}\Rightarrow (A-B-C)^{^{c}}$ the last – lilo Feb 16 '17 at 20:18
• Select % and press F1, or see here: mathematica.stackexchange.com/a/25616/12 – Szabolcs Feb 16 '17 at 20:32
• ok,I already understood, how could simplify that with complements and with implies – lilo Feb 17 '17 at 0:02