This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ariable
in p.
T2. Each internal node with a single successor is labeled
by a subformula ¬q of p and has q as a successor.
T3. Each internal node with two successors is labeled by a
subformula aXb of p with X in {∧,∨,⊕,→, } and has a as a
left successor and b as a right successor.
14 T1. Each leaf is an occurrence of a propositional variable in p.
T2. Each internal node with a single successor is labeled by a subformula ¬q
of p and has q as a successor.
T3. Each internal node with two successors is labeled by a subformula aXb of
p with X in {∧, ∨, ⊕, →, ↔} and has a as a left successor and b as a right
successor. Example Example 4. The formation tree of the formula ((a ∧ b) ∨ ¬c) is given by
((a ∧ b) ∨ ¬c)
✚
✚
(a ∧ b) ¬c
✡❏
✡❏
ab
c
Remark. In a course on compiler construction, you will learn how to write a
parser for languages such as the one that we have speciﬁed for propositional
logic. You can check out lex and yacc if you want to write a parser for propositional logic in C or C++ now. In Haskell, you can use for example the parser
generator Happy. 4
15 Assigning Meanings to Formulas
We know that each formula corresponds to a unique
binary tree.
We can evaluate the formula by
 giving each propositional variable an interpretation.
 defining the meaning of each logical connective
 propagate the truth values from the leafs to the root
in a unique way, so that we get an unambiguous
evaluation of each formula.
16 4 Semantics The Semantics of Propositional Logic Let B = {t, f } denote the set of truth values, where t and f represent true
and false, respectively. We associate to the logical connective ¬ the function
M¬ : B → B given by
P M¬ (P )
Let4B={t,f}.Semantics of Propositional Logic function Mx: B>B
The Assign to each connective x a
f
t
t
f
Let B = {t, f } denote semantics values,
that determines thethe set of truth of x. where t and f represent true
and falseP ) is true if We associate is false. This justiﬁes the name negation
Thus, M¬ (, respectively. and only if P to the logical connective ¬ the function
for M¬ : B → B given by
this connective. The graph of the function M¬ given above is called the
P M¬ Similarly, we associate to a connective
truth table of the negation connective.(P )
f
t
X in the set {∧, ∨, ⊕, →, ↔} a binary function MX : B × B → B. The truth
t
f tables of these connectives are as follows: Thus, M¬ (P ) is true if and only if P is false. This justiﬁes the name negation
for P Q M∧ (P, Q) M∨ (P, Qthe M⊕ (P, QM¬ M→ (P, Q) is called Q)
this connective. The graph of ) function ) given above M↔ (P, the
truth table of the negation connective. Similarly, we associate to a connective
ff
f
f
f
t
t
X in the set {∧, ∨, ⊕, →, ↔} a binary function MX : B ×tB → B. The truth
ft
f
t
t
f
tables of these connectives are t follows: t
as
tf
f
f
f t P t Q M∧tP, Q) M∨ (P, Q) M⊕ (P, Q) M→ (P, Q) M↔ (P, Q)
t
f
t
t
( ff
f
f
f
t
t
You should tvery carefully inspect this table! It is t
critical that you memorize
f
f
t
t
f
and fully understand the meaning of each connective.
tf
f
t
t
f
f
The t...
View
Full
Document
This note was uploaded on 03/24/2014 for the course CSCE 222 taught by Professor Math during the Fall '11 term at Texas A&M.
 Fall '11
 math

Click to edit the document details