15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

32 CHAPTER 3. ELEMENTARY DISCRETE MATH<br />

We can represent sets by<br />

listing the elements within curly brackets: e.g. {a, b, c}<br />

describing the elements via a property: {x | x has property P }<br />

stating element-hood (a ∈ S) or not (b ∈ S).<br />

Axiom 57 Every set we can write down actually exists! (Hidden Assumption)<br />

Warning: Learn to distinguish between objects and their representations!({a, b, c} and {b, a, a, c} are different representat<br />

©: Michael Kohlhase 45<br />

Indeed it is very difficult to define something as foundational as a set. We want sets to be collections<br />

of objects, and we want to be as unconstrained as possible as to what their elements can be. But<br />

what then to say about them? Cantor’s intuition is one attempt to do this, but of course this is<br />

not how we want to define concepts in math.<br />

So instead of defining sets, we will directly work with representations of sets. For that we only<br />

have to agree on how we can write down sets. Note that with this practice, we introduce a hidden<br />

assumption: called set comprehension, i.e. that every set we can write down actually exists. We<br />

will see below that we cannot hold this assumption.<br />

Now that we can represent sets, we want to compare them. We can simply define relations between<br />

sets using the three set description operations introduced above.<br />

Relations between Sets<br />

set equality: A ≡ B :⇔ ∀x.x ∈ A ⇔ x ∈ B<br />

subset: A ⊆ B :⇔ ∀x.x ∈ A ⇒ x ∈ B<br />

proper subset: A ⊂ B :⇔ (A ⊆ B) ∧ (A ≡ B)<br />

superset: A ⊇ B :⇔ ∀x.x ∈ B ⇒ x ∈ A<br />

proper superset: A ⊃ B :⇔ (A ⊇ B) ∧ (A ≡ B)<br />

©: Michael Kohlhase 46<br />

We want to have some operations on sets that let us construct new sets from existing ones. Again,<br />

can define them.<br />

Operations on Sets<br />

union: A ∪ B := {x | x ∈ A ∨ x ∈ B}<br />

union over a collection: Let I be a set and Si a family of sets indexed by I, then <br />

i∈I Si :=<br />

{x | ∃i ∈ I.x ∈ Si}.<br />

intersection: A ∩ B := {x | x ∈ A ∧ x ∈ B}<br />

intersection over a collection: Let I be a set and Si a family of sets indexed by I, then<br />

<br />

i∈I Si := {x | ∀i ∈ I.x ∈ Si}.<br />

set difference: A\B := {x | x ∈ A ∧ x ∈ B}<br />

the power set: P(A) := {S | S ⊆ A}<br />

the empty set: ∀x.x ∈ ∅<br />

Cartesian product: A × B := {〈a, b〉 | a ∈ A ∧ b ∈ B}, call 〈a, b〉 pair.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!