1==== 2Sets 3==== 4 5Basic Sets 6---------- 7 8.. automodule:: sympy.sets.sets 9 10Set 11^^^ 12.. autoclass:: Set 13 :members: 14 15.. autofunction:: imageset 16 17Elementary Sets 18--------------- 19 20Interval 21^^^^^^^^ 22.. autoclass:: Interval 23 :members: 24 25FiniteSet 26^^^^^^^^^ 27.. autoclass:: FiniteSet 28 :members: 29 30Compound Sets 31------------- 32 33.. module:: sympy.sets.sets 34 :noindex: 35 36Union 37^^^^^ 38.. autoclass:: Union 39 :members: 40 41Intersection 42^^^^^^^^^^^^ 43.. autoclass:: Intersection 44 :members: 45 46ProductSet 47^^^^^^^^^^ 48.. autoclass:: ProductSet 49 :members: 50 51Complement 52^^^^^^^^^^ 53.. autoclass:: Complement 54 :members: 55 56SymmetricDifference 57^^^^^^^^^^^^^^^^^^^ 58.. autoclass:: SymmetricDifference 59 :members: 60 61Singleton Sets 62-------------- 63 64EmptySet 65^^^^^^^^ 66.. autoclass:: EmptySet 67 :members: 68 69UniversalSet 70^^^^^^^^^^^^ 71.. autoclass:: UniversalSet 72 :members: 73 74Special Sets 75------------ 76.. automodule:: sympy.sets.fancysets 77 78Naturals 79^^^^^^^^ 80.. autoclass:: Naturals 81 :members: 82 83Naturals0 84^^^^^^^^^ 85.. autoclass:: Naturals0 86 :members: 87 88Integers 89^^^^^^^^ 90.. autoclass:: Integers 91 :members: 92 93 94Reals 95^^^^^ 96.. autoclass:: Reals 97 :members: 98 99Complexes 100^^^^^^^^^ 101.. autoclass:: Complexes 102 :members: 103 104ImageSet 105^^^^^^^^ 106.. autoclass:: ImageSet 107 :members: 108 109Range 110^^^^^ 111.. autoclass:: Range 112 :members: 113 114ComplexRegion 115^^^^^^^^^^^^^ 116.. autoclass:: ComplexRegion 117 :members: 118 119.. autoclass:: CartesianComplexRegion 120 :members: 121 122.. autoclass:: PolarComplexRegion 123 :members: 124 125.. autofunction:: normalize_theta_set 126 127Power sets 128---------- 129 130.. automodule:: sympy.sets.powerset 131 132PowerSet 133^^^^^^^^ 134.. autoclass:: PowerSet 135 :members: 136 137Iteration over sets 138^^^^^^^^^^^^^^^^^^^ 139 140For set unions, `\{a, b\} \cup \{x, y\}` can be treated as 141`\{a, b, x, y\}` for iteration regardless of the distinctiveness of 142the elements, however, for set intersections, assuming that 143`\{a, b\} \cap \{x, y\}` is `\varnothing` or `\{a, b \}` would not 144always be valid, since some of `a`, `b`, `x` or `y` may or may not be 145the elements of the intersection. 146 147Iterating over the elements of a set involving intersection, complement, 148or symmetric difference yields (possibly duplicate) elements of the set 149provided that all elements are known to be the elements of the set. 150If any element cannot be determined to be a member of a set then the 151iteration gives ``TypeError``. 152This happens in the same cases where ``x in y`` would give an error. 153 154There are some reasons to implement like this, even if it breaks the 155consistency with how the python set iterator works. 156We keep in mind that sympy set comprehension like ``FiniteSet(*s)`` from 157a existing sympy sets could be a common usage. 158And this approach would make ``FiniteSet(*s)`` to be consistent with any 159symbolic set processing methods like ``FiniteSet(*simplify(s))``. 160 161Condition Sets 162-------------- 163 164.. automodule:: sympy.sets.conditionset 165 166ConditionSet 167^^^^^^^^^^^^ 168 169.. autoclass:: ConditionSet 170 :members: 171 172Relations on sets 173^^^^^^^^^^^^^^^^^ 174 175.. autoclass:: Contains 176 :members: 177