220 likes | 457 Views
Intro to Set Theory. A set A is a collection of elements . If x is an element of A, we write x A; if not: x A. Say: “x is a member of A”, or “x is in A”, or “x belongs to A” We use lowercase letters for elements, and capitals for sets.
E N D
A set A is a collection of elements. If x is an element of A, we write xA; if not: xA. Say: “x is a member of A”, or “x is in A”, or “x belongs to A” We use lowercase letters for elements, and capitals for sets. Notation: use set braces “{“,”}” around the elements. For example: A = {0,1,2,3,4} Hence 2 A = {0,1,2,3,4} and 6 A = {0,1,2,3,4} Another way to write it: A = {x | x is an integer between 0 and 4}. Sets and Their Elements
The set A = {a, b, c, d} has 4 elements. The set A = {2, 4, 6, 8, …, 40} has 20 elements. The ellipsis, “ … ”, is used to mean we fill in the missing elements in the obvious manner or pattern, as there are too many to actually list out on paper. The set of natural numbers: N = {0,1,2,…} The set of integers: Z = {…,–2,–1,0,1,2,…} The set of positive integers: Z+ = {1,2,3,…} Some Sets
A set A is a subset of B, if and only if all elementsof A are also elements of B: Notation: AB or BA. If A is not a subset of B, we write AB or BA. If AB and B contains an element that is not in A,then we say “A is a proper subset of B”: AB or BA. For all sets: AA. (Proper) Subsets
The sets A and B are equal (A=B) if and only if each element of A is an element of B and vice versa. The empty set, denoted by or { }, is the set without elements. The universal set, denoted by Ω, is the set of all elements currently under consideration. The size or cardinality of a finite set A, denoted with |A|, is the number of (distinct) elements.Example: ||=0 |{2,4,8,16}| = 4 Special Sets, Cardinality
The elements of a set do not have an ordering,hence {a,b,c} = {b,c,a} The elements of a set do not have multitudes,hence {a,a,a} = {a,a} = {a} The size of A is thus the number of different elements How to Think of Sets
The intersection of two sets A and B, is the set ABof elements x such that both xA and xB.Notation: AB = { x | xA and xB} The union of two sets A and B, is the set ABof elements x such that xA or xB.Notation: AB = { x | xA or xB} Sets A and B are (mutually) disjoint if AB= Intersection, Union
The complement of a set A,denoted with Ā(or A' or Ac), are the elements that are not elements of A. Therefore, A Ā = Complements
Venn diagrams are used to depict the unions, subsets, complements, intersections etc. of sets: AB _ A A B _ B Venn Diagrams C
A – B The set difference “A minus B” is the set of elements that are in A, with those that are in B subtracted out. Another way of putting it is, it is the set of elements that are in A, and not in B. _ Therefore, A – B = A B Set Difference
Logical operators include: conjunction (and), disjunction (or), negation (not), and conditional (implies, if-then). The Common Logical Operators Conjunction (and): The conjunction of propositions p and q is the compound proposition “p and q”. We denote it with p ^ q. This means p and q together. It is true if p and q are both true and false otherwise. For instance the compound proposition “2+2=4 (p) and Sunday is the first day of the week (q)” is true, but “3+3=7 (p) and the freezing point of water is 32 degrees (q)” is false. Propositional Logic, Logical Operators
Disjunction (or): of propositions p and q is the compound proposition “p or q”. We denote it with p v q . It is true if p is true or q is true or both. For instance the compound proposition “2+2=4 (p) or Sunday is the first day of the week (q)” is true, and “3+3=7 (p) or the freezing point of water is 32 degrees (q)” is also true. Logical Operators
Negation (not): The negation of a proposition p is “not p”. We denote it with ~p (or ¬p). It is true if p is false and vice versa. Sometimes there are several ways of expressing a negation in English. For instance if p is the proposition “2<5”, then reasonable statements of ~p are “it is not the case that 2<5” and “2 is not less than 5”. Logical Operators
An implication is a compound proposition of the form “if p then q” or “p implies q”. We denote it with p q. In English this phrase carries several meanings. Sometimes it means that p causes q as in “if you eat too much you will gain weight.” Sometimes it means that p guarantees q and vice versa as in “if you write a book report, I will give you five points extra credit” (tacitly assuring you that if you do not write it, I certainly will not give you extra credit). Sometimes it takes a very weak sense, simply asserting that the truth of p guarantees the truth of q as in “if you resign the chess game, you will lose” (but of course if you play on in a bad position, you will probably lose anyway — continued play does not guarantee winning). Logical Operators
Logic and set theory go very well together. The previous definitions can be re-written as follows:xA if and only if (xA)AB if and only if (xA xB) is Truex (AB) if and only if (xA xB)x (AB) if and only if (xA xB)x A–B if and only if (xA xB)x Ā if and only if (xA) Sets and Logic