0% found this document useful (0 votes)
16 views

CS 2742 (Logic in Computer Science) - Fall 2011: Antonina Kolokolova

The document discusses sets and Boolean algebras. It begins with an example of sets on a real line and definitions of union, intersection, and disjoint sets. It then covers subset relations and how to prove properties of sets using logic and counterexamples. Finally, it defines a Boolean algebra as a set with two operations (addition and multiplication) that satisfy commutative, associative, distributive, identity, and complement laws, similar to the algebra of propositions. Boolean algebras include propositional logic and set theory as examples.

Uploaded by

ZhichaoWang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

CS 2742 (Logic in Computer Science) - Fall 2011: Antonina Kolokolova

The document discusses sets and Boolean algebras. It begins with an example of sets on a real line and definitions of union, intersection, and disjoint sets. It then covers subset relations and how to prove properties of sets using logic and counterexamples. Finally, it defines a Boolean algebra as a set with two operations (addition and multiplication) that satisfy commutative, associative, distributive, identity, and complement laws, similar to the algebra of propositions. Boolean algebras include propositional logic and set theory as examples.

Uploaded by

ZhichaoWang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CS 2742 (Logic in Computer Science) Fall 2011

Lecture 15
Antonina Kolokolova
October 20, 2011

Before continuing, let us look at a simple example of sets:


Example 1 (Intervals on a real line). Let (1, 0] and [0, 1) be two intervals on a real line.
(1, 0] [0, 1) = (1, 1), (1, 0] [0, 1) = {0}, (1, 0] [0, 1) = (1, 0).
Definition 1. Two sets are disjoint if they have no common elements. Sets A1 . . . An form
a partition of a set A if sets are pairwise disjoint (that is, i, j Ai Aj = and their union
forms the whole set A.
Note that the rule of inclusion/exclusion simplifies greatly when sets are disjoint: in this
case, the sum of the sizes of the disjoint sets is exactly the size of their union. This is used
in probability theory.
Some subset relations:
1) A B A
2) A A B
3) Transitivity: if A B and B C then A C.
To prove that A B show that any element x A is also B. Proof style: suppose x is
in A. Now show that x B. Now use logic of the definitions.
Now can prove properties of sets such as DeMorgan, by using suppose x is in the left side...
show that x is in the right side.
To prove something does not hold, find a counterexample.

46

Example 2. Show that it is not true that for all A, B, C, (A B) (B C) = A C.


To prove this, find a counterexample, that is, sets A, B, C for which this does not hold. Let
A = {1, 2}, B = {2} and C = {1}. Then A C = {2}, A B = {1}, B C = {2} and the
union is {1, 2}. Alternatively, think of an element in the LHS that is not in A C: in this
case, such an element is some element not in A.

Boolean algebra

As you have noticed, the algebra of sets is very similar to the algebra of propositions. This
is because they are all examples of boolean algebras.
Definition 2. A Boolean algebra is a set B together with two operations, generally denoted
+ and , such taht for all a and b in B both a + b and a b are in B and the following
properties hold:
Commutative laws: a + b = b + a and a b = b a.
Associative laws: (a + b) + c = a + (b + c) and (a b) c = a (b c).
Distributive laws: (a + b) c = a c + b c and a b + c = (a + c) (b + c) (recall that the
second one does not hold for the normal arithmetic + and ).
Identity laws: a + 0 = a and a 1 = a
Complement laws: for each a there exists an element called negation of a and denoted
a
such that a + a
= 1, a a
= 0.
In the case of propositional logic, 0 is F , 1 is T and there are no other elements, so it is
sufficient to say that T = F and F = T (in that setting, is used for complementation).
In set theory, 0 and 1 are and the universe U , respectively, and negation of every set is its
complement.
Now, properties of Boolean algebras such as DeMorgans law can be derived from these
axioms.

47

You might also like