In my very basic learning of set theory I have seen eg set A {1,2,3,4,5} and set B {2,3,5} for example and then I can work out A union B and A intersect B etc.

But in these cases there have been no duplicated integers. Is it possible to have duplicates in a single set? Or is that simply not allowed?

Could you for example have set A {1,1,1,1,2} and set B {1,2,2,2,2} ?

In which case what is the union and intersect?