Set Theory Set Theory Relations Relations Functions Functions
Total Page:16
File Type:pdf, Size:1020Kb
Outline Outline Set Theory Set Theory Relations Relations Functions Functions 1 Set Theory Basic Concepts Mathematical Logic Operations on Sets Practical Class: Set Theory Operation Properties 2 Relations Chiara Ghidini Properties FBK-IRST, Trento, Italy Equivalence Relation 2014/2015 3 Functions Properties Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Basic Concepts Basic Concepts Set Theory Set Theory Operations on Sets Operations on Sets Relations Relations Operation Properties Operation Properties Functions Functions Sets: Basic Concepts Describing Sets The concept of set is considered a primitive concept in math In set theory there are several description methods: A set is a collection of elements whose description must be Listing: the set is described listing all its elements unambiguous and unique: it must be possible to decide Example: A = fa; e; i; o; ug. whether an element belongs to the set or not. Abstraction: the set is described through a property of its Examples: elements the students in this classroom Example: A = fx j x is a vowel of the Latin alphabet g. the points in a straight line Eulero-Venn Diagrams: graphical representation that supports the cards in a playing pack the formal description are all sets, while students that hates math amusing books are not sets. Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Basic Concepts Basic Concepts Set Theory Set Theory Operations on Sets Operations on Sets Relations Relations Operation Properties Operation Properties Functions Functions Sets: Basic Concepts (2) Power set Empty Set: ;, is the set containing no elements; We define the power set of a set A, denoted with P(A), as the set containing all the subsets of A. Membership: a 2 A, element a belongs to the set A; Non membership: a 2= A, element a doesn't belong to the set Example: if A = fa; b; cg, then A; P(A) = f;; fag; fbg; fcg; fa; bg; fa; cg; fb; cg; fa; b; cg; g Equality: A = B, iff the sets A and B contain the same If A has n elements, then its power set P(A) contains 2n elements; elements. inequality: A 6= B, iff it is not the case that A = B; Exercise: prove it!!! Subset: A ⊆ B, iff all elements in A belong to B too; Proper subset: A ⊂ B, iff A ⊆ B and A 6= B. Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Basic Concepts Basic Concepts Set Theory Set Theory Operations on Sets Operations on Sets Relations Relations Operation Properties Operation Properties Functions Functions Operations on Sets Operations on Sets (2) Union: given two sets A and B we define the union of A and Difference: given two sets A and B we define the difference of B as the set containing the elements belonging to A or to B A and B as the set containing all the elements which are or to both of them, and we denote it with A [ B. members of A, but not members of B, and denote it with Example: if A = fa; b; cg, B = fa; d; eg then A − B. A [ B = fa; b; c; d; eg Example: if A = fa; b; cg, B = fa; d; eg then A − B = fb; cg Intersection: given two sets A and B we define the intersection of A and B as the set containing the elements Complement: given a universal set U and a set A, where that belongs both to A and B, and we denote it with A \ B. A ⊆ U, we define the complement of A in U ,denoted with A Example: if A = fa; b; cg, B = fa; d; eg then (or CU A), as the set containing all the elements in U not A \ B = fag belonging to A. Example: if U is the set of natural numbers and A is the set of even numbers (0 included), then the complement of A in U is the set of odd numbers. Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Basic Concepts Basic Concepts Set Theory Set Theory Operations on Sets Operations on Sets Relations Relations Operation Properties Operation Properties Functions Functions Sets: Examples Sets: Exercises Examples: Exercises: Given A = fa; e; i; o; fugg and B = fi; o; ug, consider the Given A = ft; zg and B = fv; z; tg consider the following following statements: statements: 1 B 2 A NO! 1 A 2 B 2 A ⊂ B 2 (B − fi; og) 2 A OK 3 z 2 A \ B 3 fag [ fig ⊂ A OK 4 v ⊂ B 5 fvg ⊂ B 4 fug ⊂ A NO! 6 v 2 A − B 5 ffugg ⊂ A OK Given A = fa; b; c; dg and B = fc; d; f g 6 B − A = ; NO! B − A = fug find a set X s.t. A [ B = B [ X ; is this set unique? there exists a set Y s.t. A [ Y = B ? 7 i 2 A \ B OK 8 fi; og = A \ B OK Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Basic Concepts Basic Concepts Set Theory Set Theory Operations on Sets Operations on Sets Relations Relations Operation Properties Operation Properties Functions Functions Sets: Exercises (2) Sets: Operation Properties Exercises: A \ A = A, Given A = f0; 2; 4; 6; 8; 10g, B = f0; 1; 2; 3; 4; 5; 6g and A [ A = A C = f4; 5; 6; 7; 8; 9; 10g, compute: A \ B = B \ A, A \ B \ C, A [ (B \ C), A − (B − C) (A [ B) \ C,(A − B) − C, A \ (B − C) A [ B = B [ A (commutative) Describe 3 sets A; B; C s.t. A \ (B [ C) 6= (A \ B) [ C A \; = ;, A [; = A (A \ B) \ C = A \ (B \ C), (A [ B) [ C = A [ (B [ C)(associative) Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Basic Concepts Basic Concepts Set Theory Set Theory Operations on Sets Operations on Sets Relations Relations Operation Properties Operation Properties Functions Functions Sets: Operation Properties(2) Cartesian Product A \ (B [ C) = (A \ B) [ (A \ C), Given two sets A and B, we define the Cartesian product of A A [ (B \ C) = (A [ B) \ (A [ C) and B as the set of ordered couples (a; b) where a 2 A and (distributive) b 2 B; formally, A × B = f(a; b): a 2 A and b 2 Bg A \ B = A [ B, A [ B = A \ B (De Morgan laws) Notice that: A × B 6= B × A Exercise: Prove the validity of all the properties. Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Basic Concepts Set Theory Set Theory Properties Operations on Sets Relations Relations Equivalence Relation Operation Properties Functions Functions Cartesian Product (2) Relations Examples: A relation R from the set A to the set B is a subset of the given A = f1; 2; 3g and B = fa; bg, then Cartesian product of A and B: R ⊆ A × B; if (x; y) 2 R, then A × B = f(1; a); (1; b); (2; a); (2; b); (3; a); (3; b)g and we will write xRy for 'x is R-related to y'. B × A = f(a; 1); (a; 2); (a; 3); (b; 1); (b; 2); (b; 3)g. Cartesian coordinates of the points in a plane are an example A binary relation on a set A is a subset R ⊆ A × A of the Cartesian product < × < Examples: The Cartesian product can be computed on any number n of given A = f1; 2; 3; 4g, B = fa; b; d; e; r; tg and aRb iff in the sets A1; A2 :::; An, A1 × A2 × ::: × An is the set of ordered Italian name of a there is the letter b, then R = f(2; d); (2; e); (3; e); (3; r); (3; t); (4; a); (4; r); (4; t)g n-tuple (x1;:::; xn) where xi 2 Ai for each i = 1 ::: n. given A = f3; 5; 7g, B = f2; 4; 6; 8; 10; 12g and aRb iff a is a divisor of b, then R = f(3; 6); (3; 12); (5; 10)g Exercise: in prev example, let aRb iff a + b is an even number R = ? Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Set Theory Properties Set Theory Properties Relations Equivalence Relation Relations Equivalence Relation Functions Functions Relations (2) Relation properties Given a relation R from A to B, Let R be a binary relation on A. R is the domain of R is the set Dom(R) = fa 2 A j there exists a reflexive iff aRa for all a 2 A; b 2 B; aRbg the co-domain of R is the set Cod(R) = fb 2 B j there exists symmetric iff aRb implies bRa for all a; b 2 A; an a 2 A; aRbg transitive iff aRb and bRc imply aRc for all a; b; c 2 A; Let R be a relation from A to B. The inverse relation of R is anti-symmetric iff aRb and bRa imply a = b for all a; b 2 A; the relation R−1 ⊆ B × A where R−1 = f(b; a) j (a; b) 2 Rg Chiara Ghidini Mathematical Logic Chiara Ghidini Mathematical Logic Outline Outline Set Theory Properties Set Theory Properties Relations Equivalence Relation Relations Equivalence Relation Functions Functions Equivalence Relation Set Partition Let R be a binary relation on a set A. R is an equivalence Let A be a set, a partition of A is a family F of non-empty relation iff it satisfies all the following properties: subsets of A s.t.: reflexive the subsets are pairwise disjoint symmetric the union of all the subsets is the set A transitive Notice that: each element of A belongs to exactly one subset an equivalence relation is usually denoted with ∼ or ≡ in F .