Try   HackMD

Discrete Mathematics: Logic

(Up)

This is intended to be a recap of notation as covered in an introductory course on discrete mathematics or logic circuits.

Logic

We all know Venn diagrams. They support the operations of intersection

AB, union
AB
, complement
Ac
. If we forget that
A,B
are sets and we just take them as abstract 'propositions' we write instead
AB
,
AB
,
¬A
:

Name Sets Logic Name
intersection
AB
AB
and
union
AB
AB
or
complement
Ac
¬A
negation
AB
implication

Implication can be defined as

AB=¬AB. [1]

The laws of what is called Boolean logic or classical propositional logic are exactly the same as the laws for Venn diagrams. Some useful ones are the following. You don't need to remember them (just draw some Venn diagrams in case you forget).[2]

¬¬A=A¬(AB)=¬A¬B¬(AB)=¬A¬BA(BC)=(AB)(AC)¬(AB)=A¬B

[Remark: There is a pattern here, namely that the negation of any operation (not, or, and, implication) can be "pushed down towards the leaves".]

Another usful one is "contraposition"

AB=¬B¬A

For example, if

A= "doesn't kill you" and
B=
"makes you strong", then on the left we have "what doesn't kill you makes you strong" and on the right we have "what doesn't make you strong, kills you". [3]

It is also common to extend the logical notation to "quantifiers"

Logic Name
x.A(x)
for all
x
we have
A(x)
x.A(x)
there is
x
such that
A(x)

We have used this above to write

Even in symbolic notation.

Further Reading