-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathset_theory.theory.txt
150 lines (128 loc) · 3.27 KB
/
set_theory.theory.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
┏━━━━━━━━━━━━━━━━┓
┃ SET_THEORY ┃
┗━━━━━━━━━━━━━━━━┛
Collection:
- bunch of elements
Class:
- collection which can be defined
Universe:
- noted U
- class containing all possible sets for a specific object of study
Family:
- function using classes|sets as domain|codomain
Set:
- notation: {[VAL,...]}
- unordered, i.e. position is insignificant
- duplicates are ignored
Tuple:
- also named vector
- notation: ([VAL,...])
- ordered
- can contain duplicates
- n-tuple:
- tuple with n elements
Cardinality:
- also named size
- notation:
- |A|
- #A
- A̿
- n(A)
- card(A)
- number of elements in set
Empty set:
- notation: {} or ∅
- set with cardinality 0
Mapping:
- notation: {MAP:f(VAR,...)}
- VAR can be used in MAP
- set with:
- all elements where f(VAR,...) is true
- elements mapped with MAP
Enumeration:
- notation: {x, ..., y}
- ... are all elements from x to y
Intervals:
- set of all elements between a minimum and a maximum value
- closed:
- noted [a,b]
- {x: a <= x <= b}
- open:
- noted (a,b) or ]a,b[
- {x: a < x < b}
- semi-open:
- noted (a,b], [a,b)
- mix of above
- proper: when neither:
- degenerate: when a = b
- empty: when max < min
- [left|right-]unbounded:
- when a or b = Inf
- inverse: bounded|finite
Set membership:
- notation:
- VAL,...∈ SET
- VAL,...∉ SET (inverse)
- means VAL are all [not] members of SET
Subset|superset:
- operations
- A ⊂ B: proper subset (not equal)
- A ⊃ B: proper superset (not equal)
- A ⊆ B: subset or equal
- A ⊇ B: superset or equal
- formulas:
- A ⊂ B => A ⊆ B
- A ⊂ B <=> B ⊃ A
- A ⊆ B <=> B ⊇ A
- A ⊂ B <=> A ⊉ B
- B ⊃ A <=> B ⊈ A
Complement:
- notations:
- ~A
- A^c (superscript c)
- means {x:x∉ A}
Basic combinations:
- types:
- intersection:
- noted A ∩ B or A & B
- {x: (x∈ A) && (x∈ B)}
- union:
- noted A ∪ B or A | B
- {x: (x∈ A) || (x∈ B)}
- commutative
- associative
- distributivity:
- (A & C) | (B & C) = (A | B) & C
- (A | C) & (B | C) = (A & B) | C
- visualized with Venn diagrams:
- each set is a circle
- their area represents their elements
- colors show result of operations
Advanced combinations
- difference:
- also named relative complement
- noted A \ B or A - B
- same as A & ~B
- symmetric difference:
- noted A ⊕ B or A xor B
- same as (A | B) \ (A & B)
Mutual exclusiveless
- also named disjoints
- when A & B = ∅
Cartesian product:
- noted A * B * ...
- {(a,b,...): a∈ A, b∈ B,...}
- formulas:
- |A * B| = |A| * |B|
Power set:
- noted P(A) or 2^A (superscript)
- set with all possible subsets of a set
- formulas:
- |P(A)| = 2 ** |A|
Kleene star:
- also named Kleene operator|closure
- noted A*
- tuple of any size (including 0) where each element∈ A
Kleene plus:
- noted A⁺
- tuple of any size (excluding 0) where each element∈ A