## CS381 Notes

Chapter 1: Foundations of Logic

Mathematical

Mathematical logic includes a formal language, precice notation.

Propositional Logic is the logic of compound statements using boolean connectives.

A proposition is a declarative statement that is either true or false. Propositional logic includes combining propositions with connectives (also called operators).

Understand the contrapositive. Reverse each element, then switch them. The contrapositive has the same truth table as the original.

Excersises

a) Swimming is not allowed or there are sharks.

b) swimming is allowed only if there are no sharks

( p can-imply q ) and ( not p can imply q )

Swimming is allowed can imply that there are sharks, AND swimming is not allowed can imply that there are sharks

p q | !p p->q !p->q p->q^!p->q

1 1 0 1 1 1

1 0 0 0 0 0

0 1 1 1 1 1

0 0 1 1 0 0

If two compound statements have the same truth table, they are equivalent.

leave a comment