# Operations between sets of integers [closed]

sorry it was impossible to put the code in Latex, he said that there were problems of indentation, I put the image

• Is this anything to do with Mathematica (the programming language)? If so, one should consult the documentation. – Daniel Lichtblau Jul 21 '18 at 15:08

u = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
a = {1, 7, 2, 3, 8, 4};
b = {6, 10, 11, 9, 3, 1};
c = {5, 9, 11, 10, 2, 4};

CircleMinus = Complement;
pr[x_] := u⊖x;

a⊖(b ⋂ c)

(pr[a] ⋃ pr[b]) ⋂ a

((b ⋃ c) ⋂ a)⊖(a ⋂ b ⋂ c)

((b⊖a) ⋂ (c⊖a)) ⋂ pr[b ⋃ c]

{1, 2, 3, 4, 7, 8}

{2, 4, 7, 8}

{1, 2, 3, 4}

{}

• Thank , Thank you very much, I could explain a little how the code works and who is PR [x] – Walter Jul 21 '18 at 7:19
• @Walter CircleMinus = Complement sets ⊖ as a shorthand for Complement. pr is a function I defined with my best guess as to the meaning of your prime in a', b' etc.; sorry if I got it wrong. ⋃ and ⋂ are built-in notation for Union and Intersection. – Mr.Wizard Jul 21 '18 at 7:22
• Thank , Thank you very much – Walter Jul 21 '18 at 21:28