Sets. Sets. Subset, universe. Specifying sets, membership. Examples: Specifying a set using a predicate. Examples

Similar documents
[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4

CSC Discrete Math I, Spring Sets

2 Review of Set Theory

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

LECTURE 8: SETS. Software Engineering Mike Wooldridge

1.1 - Introduction to Sets

2.1 Sets 2.2 Set Operations

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p.

Chapter 3. Set Theory. 3.1 What is a Set?

Review of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31

Discrete Mathematics Lecture 4. Harper Langston New York University

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets


Algebra of Sets. Aditya Ghosh. April 6, 2018 It is recommended that while reading it, sit with a pen and a paper.

MITOCW watch?v=kz7jjltq9r4

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

Lattice Tutorial Version 1.0

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

AXIOMS FOR THE INTEGERS

Introduction II. Sets. Terminology III. Definition. Definition. Definition. Example

1 Probability Review. CS 124 Section #8 Hashing, Skip Lists 3/20/17. Expectation (weighted average): the expectation of a random quantity X is:

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

Logic and Proof course Solutions to exercises from chapter 6

(Refer Slide Time: 0:19)

1 Introduction CHAPTER ONE: SETS

Discrete Mathematics

Sets and set operations

SOFTWARE ENGINEERING DESIGN I

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Sets. {1, 2, 3, Calvin}.

Set and Set Operations

Final Test in MAT 410: Introduction to Topology Answers to the Test Questions

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017

Sets and set operations. Lecture 5 ICOM 4075

Intro to semantics; Small-step semantics Lecture 1 Tuesday, January 29, 2013

Exercises Computational Complexity

THEORY OF COMPUTATION

Lecture 14: Lower Bounds for Tree Resolution

CSC 501 Semantics of Programming Languages

Recursion and Structural Induction

Programming Languages Third Edition

Lecture 3: Constructing the Natural Numbers

Open and Closed Sets

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in .

9.5 Equivalence Relations

EDAA40 At home exercises 1

COMP Logic for Computer Scientists. Lecture 17

8 Matroid Intersection

Publication Data. Reading Options. Licence and permissions ISBN Mark Jago, 2007

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Automated Reasoning. Natural Deduction in First-Order Logic

1. Chapter 1, # 1: Prove that for all sets A, B, C, the formula

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

Topology notes. Basic Definitions and Properties.

CS100: DISCRETE STRUCTURES

This Lecture. We will first introduce some basic set theory before we do counting. Basic Definitions. Operations on Sets.

CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN. Lecture 1: Introduction

The angle measure at for example the vertex A is denoted by m A, or m BAC.

Slides for Faculty Oxford University Press All rights reserved.

Greedy Algorithms 1 {K(S) K(S) C} For large values of d, brute force search is not feasible because there are 2 d {1,..., d}.

Functions. How is this definition written in symbolic logic notation?

Problem One: A Quick Algebra Review

Lecture 15: The subspace topology, Closed sets

We ve studied the main models and concepts of the theory of computation:

Topic 3: Propositions as types

c) the set of students at your school who either are sophomores or are taking discrete mathematics

CMPSCI 250: Introduction to Computation. Lecture #30: Properties of the Regular Languages David Mix Barrington 7 April 2014

Alphabets, strings and formal. An introduction to information representation

The Intersection of Two Sets

CHAPTER 1 BOOLEAN ALGEBRA CONTENTS

Bases of topologies. 1 Motivation

Introduction to Homotopy Type Theory

Eric Roberts Handout #39 CS 106B February 20, 2015 Sets

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

CS 173 Lecture 18: Relations on a Set

Introduction to Sets and Logic (MATH 1190)

Lecture 1. 1 Notation

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

a b c d a b c d e 5 e 7

Algorithms and Data Structures: Lower Bounds for Sorting. ADS: lect 7 slide 1

IB Sets and Venn Diagram Questions- Package #1

CS 671, Automated Reasoning

A Brief Introduction to Scheme (II)

CSE20: Discrete Mathematics

Notes for Recitation 8

Section 6.3: Further Rules for Counting Sets

One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

What is a Set? Set Theory. Set Notation. Standard Sets. Standard Sets. Part 1.1. Organizing Information

Dynamic Arrays and Amortized Analysis

Lecture Notes on Binary Decision Diagrams

Reasoning About Imperative Programs. COS 441 Slides 10

Some basic set theory (and how it relates to Haskell)

Transcription:

Sets 2/36 We will not give a precise definition of what is a set, but we will say precisely what you can do with it. Sets Lectures 7 and 8 (hapter 16) (Think of a set as a collection of things of which order and multiplicity do not matter.) s: {0, 1, 2, 3} = {3, 1, 0, 2} = {3, 1, 1, 1, 0, 0, 2}. {6} is the singleton set (N: {6} 6). denotes the empty set (i.e., the set without elements). N, Z: standard set-theoretic notations for sets of numbers. Specifying sets, membership 3/36 Subset, universe 4/36 We write t X for t is an element of the set X. Specifying a set using a predicate {x D P (x)} : the set of all x D such that P (x). s {n N n > 10} is the set of all natural numbers greater than 10; {x Z x 2 + x 0} = { 1, 0}. Membership The element-of predicate is a binary predicate. Property of : t {x D P (x)} == t D P (t) def = x [x : x ] Property of : ( ) t == t The universe, denoted by U, is a set of which all sets in a particular context are subsets. Property of U: t U == True is a subset of (notation: ) if every element of is also an element of U D E

Equality of sets 6/36 Intersection 7/36 Two sets are equal if they have exactly the same elements. The intersection of and is the set of everything that is both in and in {x Z x > 0} = {n N n 0} def = {x U x x } = def = {n N n > 5} {n N n < 10} = {6, 7, 8, 9} Property of =: = == x [x x ] = t == t = t == t Leibniz for =: = = Property of : t == t t Union 8/36 ommutativity and associativity of and 9/36 The union of and is the set of everything that is in or in def = {x U x x } {n N n > 5} {n N n < 10} = N Property of : t == t t and are commutative: =, and = ; and are associative: ( ) = ( ), and ( ) = ( ).

10/36 Reasoning with the subset predicate 11/36 ( ) = ( ) does not hold for all sets, and! -introduction: -elimination: 2 1 3 5 4 6 7 8 ( ) 1 2 3 4 5 6 7 8 ( ) ounterexample: Let = {1, 2, 4, 5}, = {2, 3, 5, 6} and = {4, 5, 6, 7}. Then = {2, 5}, ( ) = {2, 4, 5, 6, 7}, = {2, 3, 4, 5, 6, 7}, and ( ) = {2, 4, 5}. So ( ) = {2, 4, 5, 6, 7} {2, 4, 5} = ( ). { ssume: } (k) var x; x. (l 2) x { -intro on (k) and (l 2): } (l 1) x [x : x ] { Definition of on (l 1): } (l) ( ) (k) (l) (m) ( ) t { Property of on (k) and (l): } t 12/36 omplement 15/36 The complement of is the set of everything not in U ( ) Fact ( ) ( ) does hold. [Proof on blackboard] ( ) def = {x U (x )} (Suppose that U = Z) {x Z x 0} = {x Z x < 0} Property of : t == (t ) N: For computing it is important to know what is the universe: If U = N, then {0, 1} = {n N n 2} If U = Z, then {0, 1} = {x Z x < 0 x 2}.

Difference 16/36 Equality of sets (reasoning) 17/36 The difference of and is the set of everything that is in, but not also in =-introduction: =-elimination: \ def = {x U x (x )} \ (k). (k) = {n N n > 5} \ {n N n < 10} = {n N n 10} (l 2). { -intro on (k) and (l 2): } (l) { Definition of = on (k): } Property of \: t \ == t (t ) (l 1) { Definition of = on (l 1): } (l) = ( ) ( ) s 18/36 Notation 24/36 ssume U = Z. Prove that \ = for all sets and. [Proof on blackboard] Determine for each of the following formulas whether it holds for all sets and. If so, then give a proof; if not, then give a counterexample: \ = = ; = \ =. 0 {{0}} {0} {{0}} {{0}} {{0}} {{0}} 0 {{0}} {0} {{0}} {{0}} {{0}} {{0}}

Empty set 26/36 lternative property of empty set 27/36 The empty set is the unique set without elements. = {x U False} Property of : t == False == True == { Definition } x [x : x ] == { Property of } x [False : x ] == { Empty domain } True == x [x : False] == { Definition of } x [x : x ] == { Property of } x [x : False] From previous slide: (*) == True (**) == x [x : False] So: = == { Definition of = } == { (*) + True/False-elimination } == { (**) } x [x : False] Property of : = == x [x : False] 28/36 Powerset 29/36 The powerset P() of is the set of all subsets of. Prove that = \ = for all sets and. [Proof on blackboard. (lso available as detailed example of a derivation-style proof of a set-theoretic property from ourse Material section of the website)] s P({4, 6}) = {, {4}, {6}, {4, 6}} P({1, 2, 3}) = {, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}} P(R), [0, 5] P(R) 1 P(R), {1} P(R), {2, 5, 7} P(R) N P(R), R P(R) P({, { }}) = {, { }, {{ }}, {, { }}} If # = n, then #P() = 2 n.

Powerset in proofs 30/36 P() \ P() P( \ ) 31/36 Property of P: P() == s Prove that P() P( ) for all sets and. [Exercise] Does P() \ P() P( \ ) hold for all sets and? [nswer on next slide] X P() \ P() == { Property of \ } X P() (X P()) == { Property of P (2 ) } X (X ) ounterexample: Let = {1, 2}, = {2} and X = {1, 2}. Then X, so X P(). nd (X ), so (X P()). Hence, X P() \ P(). On the other hand, \ = {1}, so (X \ ). Hence, X P( \ ). X P( \ ) == { Property of P } X \ X 1 2 artesian product 32/36 artesian product in proofs 33/36 The artesian product is the set of pairs (a, b) with a and b. Property of : (a, b) == a b s {0, 1} {3, 5, 7} = {(0, 3), (0, 5), (0, 7), (1, 3), (1, 5), (1, 7)} N Z = {(n, x) n N x Z} Prove that 2 for all sets and. (3, 2) N Z ( 2, 3) N Z [See Section 16.9 of the book for the construction of a very similar proof.] N: 2 =, 3 =, etc.

Mind the rackets 34/36 Proofs in Set Theory 35/36 In set theory, brackets have a meaning, and different brackets have different meanings! 0 : a number {0} : a set (containing a number) {{0}} : a set (containing a set containing a number) {0, 1} : a set (containing two numbers, order does not matter) (0, 1) : a pair of numbers (order does matter!) {(0, 1)} : a set (containing a pair of numbers) : a set (containing nothing) { } : a set (containing the empty set) proof of a set-theoretic property is a convincing argument based on given definitions and properties of sets (see table on p. 381*) The logical reasoning structure of the proof must be clear and id, but you may omit references to the names of the logical reasoning steps ( -intro, -elim, -elim, etc.). You may also mix styles (derivations, calculations, natural language). You should, however, explicitly refer to the set-theoretic properties (Property of, Definition of, etc.) in your proof. * Leibniz for equality of sets may be used as well, although it is not in the table. ounterexamples in Set Theory 36/36 To refute the idity of a set-theoretic property, it is not enough to provide a diagram, or an informal reasoning of another kind. counterexample consists of 1. clear and concrete declarations of the sets involved (e.g., let =..., let =... ); 2. euation of the expressions involved (e.g., then =... ); 3. a convincing argument why the property is refuted (e.g., since the left-hand side of the implication is true, but the right-hand side is not, it follows that the implication is false).