企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## A.6 Sets Informally, a ***set*** is a collection of objects. We denote sets by capital letters such as *S*, and, if we enumerate all the objects in a set, we enclose them in braces. For example, ![](https://box.kancloud.cn/8dab4e3fc152d66a00c8e70c3c4cf78e_116x22.jpg) is the set containing the first four positive integers. The order in which we list the objects is irrelevant. This means that ![](https://box.kancloud.cn/f6ffa238657dd51785a646aee3b2527f_264x22.jpg) are the same set—namely, the set of the first four positive integers. Another example of a set is ![](https://box.kancloud.cn/7d5ee4541e1e69dbae62aea16a1378d9_360x23.jpg) This is the set of the names of the days in the week. When a set is infinite, we can represent the set using a description of the objects in the set. For example, if we want to represent the set of positive integers that are integral multiples of 3, we can write ![](https://box.kancloud.cn/fefb43a2aad14aaaab52d64b0e96ecb2_400x21.jpg) Alternatively, we can show some items and a general item, as follows: ![](https://box.kancloud.cn/60dd35410c06197126cfb0a399b2e128_176x22.jpg) The objects in a set are called ***elements*** or ***members*** of the set. If *x* is an element of the set *S*, we write *x* ∊ *S*. If *x* is not an element of *S*, we write *x* ∉ *S*. For example, ![](https://box.kancloud.cn/57ce0ccc9040bea0d78cadb5c155fe0f_400x20.jpg) We say that the sets *S* and *T* are equal if they have the same elements, and we write *S* = *T*. If they are not equal, we write *S* ≠ *T*. For example, ![](https://box.kancloud.cn/8962f9d3f315daa1474d677fd34e49c7_400x17.jpg) If *S* and *T* are two sets such that every element in *S* is also in *T*, we say that *S* is a ***subset*** of *T*, and we write *S* ⊆ *T*. For example, ![](https://box.kancloud.cn/56bcc90a7eb967ebe82afc09a143df25_400x17.jpg) Every set is a subset of itself. That is, for any set *S*, *S* ⊆ *S*. If *S* is a subset of *T* that is not equal to *T*, we say that *S* is a ***proper subset*** of *T*, and we write *S* ⊂ *T*. For example, ![](https://box.kancloud.cn/ce85f30044c5371d6c5c7411438d6446_400x16.jpg) For two sets *S* and *T*, the ***intersection*** of *S* and *T* is defined as the set of all elements that are in both *S* and *T*. We write *S* ∩ *T*. For example, ![](https://box.kancloud.cn/7eb969ec770c11d6809630d65c60452a_400x16.jpg) For two sets *S* and *T*, the ***union*** of *S* and *T* is defined as the set of all elements that are in either *S* or *T*. We write *S* ∪ *T*. For example, ![](https://box.kancloud.cn/b46903d27c6af86d5681a9267d032e8e_400x15.jpg) For two sets *S* and *T*, the ***difference*** between *S* and *T* is defined as the set of all elements that are in *S* but not in *T*. We write *S* − *T*. For example, ![](https://box.kancloud.cn/ba1ffdb3f444936bcbf049b63eaad507_400x38.jpg) The ***empty set*** is defined as the set containing no elements. We denote the empty set by Ø. ![](https://box.kancloud.cn/5c74ff4b641f0b5c2e2c098cd2415d7b_400x17.jpg) The ***universal set*** *U* is defined as the set consisting of all elements under consideration. This means that if *S* is any set we are considering, then *S* ⊆ *U*. For example, if we are considering sets of positive integers, then ![](https://box.kancloud.cn/cc6dff808d94a64b92b3ea3dc4573225_189x23.jpg)