Professional Documents
Culture Documents
The only type of brackets we officially have are “(” and “)”.
However, we may use other types of brackets for easier reading.
For example, we will treat “{[¬p→(q∧¬r)]∨p}↔(r∧s)” as the same
formula as “((¬p→(q∧¬r))∨p)↔(r∧s)”.
The syntactic structure of any (well-formed) formula can be
visualized by means of its so-called syntax tree, which shows the
“history” of the formation of the formula by means of the syntactic
rules. For example, the formula “(p∧q)→(¬r∧¬s)” has the
following syntax tree:
(p∧q) → (¬r∧¬s)
p∧q ¬r ∧ ¬s
p q ¬r ¬s
r s
The syntax tree has the form of a upside down tree with
propositional letters at the terminal nodes at the bottom (the leaf
nodes); in our case, they are “p”, “q”, “r” and “s”. These consisting
of a single propositional letter formulas are called atomic. The
history of the formation of the formula is given in the bottom-up
direction. Moving upwards, “(p∧q)” is formed from “p” and “q” by
rule iii); “¬r” and “¬s” are formed from “r” and “s”, respectively, by
ii); … and so on until we get to the whole formula at the top of the
tree (the root node). The last step, in which the whole formula is
constructed, shows the formula’s main logical connective and the
form of the whole expression. In the example, the main logical
connective is conditional and the whole formula is a conditional
as it is obtained by connecting “(p∧q)” and “(¬r∧¬s)” with
conditional.
II. If α has the value T, ¬α has the value F; if α has the value F, α
has the value T.
III. α∧β has the value T if α and β have the value T; it has the
value F otherwise.
IV. α∨β has the value F if α and β have the value F; it has the
value T otherwise.
V. α→β has the value F if α has the value T and β has the value
F; it has the value T otherwise.
VI. α↔β has the value T if α and β have the same truth value; it
has the value F otherwise.
The following are the truth tables of all the logical connectives we
introduced earlier:
α ¬α
T F
F T
These tables are based on the semantic rules, not the other way
around. Tables are a way to visualize the rules.
p∧q ¬r ∧ ¬s
F F
p q ¬r ¬s
F F F F
r s
T T
The diagram shows how the truth values of “p”, “q”, “r” and “s”
determine (from bottom to top) the truth values first of the
subformulas of “(p∧q)→(¬r∧¬s)” and finally of the formula itself.
“p∧q” has the value F because “p” and “q” have the value F (a
conjunction is true only if both conjuncts are true); “¬r” has the
value F because “r” has the value T; … etc. The whole formula has
the value T for this interpretation of its propositional letters.
Instead of the diagram above, the truth value of the formula for
this interpretation of its propositional letters can be determined
by a table. For this purpose, in the first row of the table we place
from left to right the subformulas and finally the formula itself in
the order of increasing complexity and then determine (again
from left to right) their truth values:
p q r s p∧q ¬r ¬s ¬r∧¬s
F F T T F F F F
(p∧q)→(¬r∧¬s)
T
p q r s p∧q ¬r ¬s ¬r∧¬s
F F T T F F F F
T T T T T F F F
(p∧q)→(¬r∧¬s)
T
F
If a formula has only one propositional letter, its truth table will
have two rows – one for the case when the letter has the value T
and one for the case when it has the value F. “(р∨¬р)→¬р” is an
example:
p ¬p p∨¬p (p∨¬p)→¬p
T F T F
F T T T
The truth values under “¬p” are the opposite of those under “p”.
The values under “р∨¬р” are derived from those under “p” and
“¬p” according to the truth table of disjunction. The values of the
entire formula in the last column are derived from the values in
the previous two columns by the truth table of conditional, but
since for determining the truth value of a conditional the order of
the two sentences matters, it is important to look first at the third
column (the values of the antecedent) and then at the second
column (the values of the consequent).
If a truth table has two rows (i.e., if the formula to which the table
belongs has only one letter), we will write in the first column
under the letter first “T” and then “F”. I.e., each truth table of a one
letter formula will start like this:
T
F
When the propositional letters are two (e.g., “p” and “q”), for each
of the two possible cases for “p” (which we continue to arrange in
the same way – first T, then F) there are two cases for “q”.
Therefore, we double each value under “p” and combine each pair
of repeating values with the two values for “q” arranged in the
same way – first T, then F. So, as a rule, the truth table of a two-
letter formula will start like this:
T T
T F
F T
F F
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Depending on its truth table, each formula falls into one of the
following three groups:
Formulas that have only the value T in the last column; they
are called tautologies.
Formulas that have only the value F in the last column; they
are called contradictions.
Formulas that have both the value T and the value F in the last
column; they are called contingent formulas.
p ¬p p∧¬p
T F F
F T F
Exercises
1) ¬(р∧¬q)
2) ¬(¬r)
3) [(q→p)]→q∧r
4) [¬(p→q)→p]→¬¬¬p
5) p→(¬r∧¬q)∨(q∧¬s)
6) q∧¬¬¬¬q
7) [¬(p)∧q]∨r
8) {[(s→s)→s]→s}→s
9) (q→q)→(r→r)
10) q→(q→r)→r
11) ¬¬[¬p→(r∨q)]
12) p∧(q∨r)∧s
1) (¬p∧r) ∨ (p↔¬q)
2) [p∧(q∨¬r)] ↔ [(p∧q)∨¬r]
3) (p∧¬p) ↔ (r→¬q)
4) [(p→¬q)→r] → (¬r∧¬p)
1) ¬[(q→p)∧r]∧p
2) ¬r→s
3) ¬(p∨q)∧¬(q∨p)
4) ¬¬[(p↔q)→(p↔q)]
5) q
6) (¬¬p→q)∧(q→p)
7) ¬q∨(p→q)
8) ¬¬p∧¬¬r
9) ¬q∨¬(¬p∧q)
10) p∧¬[(p∨q)→r]
(4) Construct the truth table of each formula and specify whether
it is a tautology, a contradiction, or contingent.
1) p → (q→p)
2) ¬(p∨q) → (p∧q)
3) (p→¬q) → ¬p
4) [p→(¬q∨r)] ∨ (¬p∨q)
5) (¬p∨¬q) → ¬(p∧q)
6) (p→q) → (¬q→¬p)
7) (p∧¬q) ∨ (¬p∧q)
8) (¬p∧¬q) ↔ (p↔¬q)
9) [(p∨q)∧¬(p∧q)] ↔ (p↔¬q)
(5) Show with truth tables that the following formulas are
tautologies.
1) p ∨ ¬p
2) p → [q→(p∧q)]
3) {p∨[(¬q∨r)∧p]} → (p∨¬r)
4) [(p→¬q)∧q] → ¬p
5) [(p∨q)∧¬p] ↔ (¬p∧q)
6) [(p∧q)→r] → [p→(q→r)]