CS2742 Midterm Test 1 Study Sheet Propositional Logic
CS2742 Midterm Test 1 Study Sheet Propositional Logic
Propositional logic:
Propositional statement: expression that has a truth value (true/false). It is a tautology if it is always
true, contradiction if always false.
Logic connectives: negation (not) p, conjunction (and) pq, disjunction (or) pq, implication
p q (equivalent to p q), biconditional p q (equivalent to (p q) (q p)). The order of
precedence: strongest, next, next, and the same, weakest.
If p q is an implication, then q p is its contrapositive, q p a converse and p q
an inverse. An implication is equivalent to its contrapositive, but not to converse/inverse or their
negations. A negation of an implication p q is p q (it is not an implication itself!)
A truth table has a line for each possible values of propositional variables (2k lines if there are k
variables), and a column for each variable and subformula, up to the whole statement. The cells of
the table contain T and F depending whether the (sub)formula is true for the corresponding values
of variables.
A truth assignment is a string of values of variables to the formula, usually a row with values of first
several columns in the truth table (number of columns = number of variables). A truth assignment
is satisfying the formula if the value of the formula on these variables is T, otherwise the truth
assignment is falsifying. A truth assignment can be encoded by a formula that is a of variables
and their negations, with negated variables in places that have F in the assignment, and non-negated
that have T. For example, x = T, y = F, z = F is encoded as (x y z).It is an encoding in a
sense that this formula is true only on this truth assignment and nowhere else.
Two formulas are logically equivalent if they have the same truth table. The most famous example of
logically equivalent formulas is (p q) (p q) (with a dual version (p q) (p q))
where p and q can be arbitrary (propositional, here) formulas. These pairs of logically equivalent
formulas are called DeMorgans law.
There are several other important pairs of logically equivalent formulas, called logical identities or
logic laws. We will talk more about them when we talk about Boolean algebras. Here, just remember
that F p p p F , F p T p p and T p p p T .
A set of logic connectives is called complete if it is possible to make a formula with any truth table
out of these connectives. For example, , is a complete set of connectives, and so is the Sheffers
stroke | (where p|q (p q)), also called NAND for not-and. However, , is not a complete
set of connectives because it is impossible to express a truth table with 0 when all variables are 1
with them.
An argument consists of several formulas called premises and a final formula called a conclusion.
If we call premises A1 . . . An and conclusion B, then an argument is valid iff premises imply the
conclusion, that is, A1 An B. We usually write them in the following format:
Today is either Thursday or Friday
On Thursdays I have to go to a lecture
1
x
x
NOT
~x
y
x
AND
x /\ y
y
OR
x \/ y