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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Warning: Learn to distinguish between objects and their representations!<br />

({a, b, c} and {b, a, a, c} are different representations of the same set)<br />

c○: Michael Kohlhase 44<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 :⇔ (∀x.x ∈ A ⇒ x ∈ B) ∧ (A ≡ B)<br />

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

proper superset: A ⊃ B :⇔ (∀x.x ∈ B ⇒ x ∈ A) ∧ (A ≡ B)<br />

c○: Michael Kohlhase 45<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.<br />

n-fold Cartesian product: A1 × · · · × An := {〈a1, . . . , an〉 | ∀i.(1 ≤ i ≤ n) ⇒ ai ∈ Ai},<br />

call 〈a1, . . . , an〉 an n-tuple<br />

n-dim Cartesian space: A n := {〈a1, . . . , an〉 | (1 ≤ i ≤ n) ⇒ ai ∈ A},<br />

call 〈a1, . . . , an〉 a vector<br />

Definition 48 We write n<br />

<br />

i∈{i∈N | 1≤i≤n} Si.<br />

i=1 Si for <br />

i∈{i∈N | 1≤i≤n} Si and n i=1 Si for<br />

c○: Michael Kohlhase 46<br />

These operator definitions give us a chance to reflect on how we do definitions in mathematics.<br />

26

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

Saved successfully!

Ooh no, something went wrong!