(Last modified Tue Jan 22 22:41 2008)

home foundations

Logic
Glossary of logic terms and concepts
Propositional logic (PL)
  syntax semantics interpretation
First-order logic (FOL)
  syntax semantics interpretation
Modal and temporal logic
Propositional logic semantics

The semantics of PL formulae tells us how to determine the truth-value of any PL formula, with respect to some specific interpretation I.  We will describe the semantics by showing how the truth-value of each syntactic kind of formula is determined by its parts, if any.  Because we show how to determine the truth value for every way of constructing a PL formula (i.e., for constants, propositional variables, parenthesization of a subformula, negation of a subformula, conjunction of two subformulae, and disjunction of two subformulae — there are no other ways), we have shown how to determine the truth value of every PL formula — the semantics are complete. 

α and β are assumed to be syntactically correct PL formulae. 

Constants

The truth-value of each of the constants is its own value. 

Propositional variables

The truth-value of a propositional variable is the same as the truth-value of the sentence it refers to.  An interpretation gives a truth-value to a sentence; without a specific interpretation, the truth-value of a propositional variable is unknown. 

Parenthesation
α(α)
truetrue
falsefalse

Parenthesation

The truth-value of (α) is the same as the truth-value of α itself.  The only effect of parentheses is to control the order in which operations are evaluated (or equivalently, to indicate the branching of the abstract syntax tree). 

Negation ("not")
α¬α
true false
false true

Negation

The truth-value of ¬α is the opposite of the truth-value of α

The truth-value of a negated formula is summarized in the truth-table to the right. 

Conjunction ("and")
αβαβ
truetruetrue
truefalsefalse
falsetruefalse
falsefalsefalse

Conjunction

A conjunction is true only if both its subformulae are true. 

The truth-value of a conjunction is summarized in the truth-table to the right. 

Disjunction ("or")
αβαβ
truetruetrue
truefalsetrue
falsetruetrue
falsefalsefalse

Disjunction

A disjunction is false only if both its subformulae are false. 

The truth-value of a disjunction is summarized in the truth-table to the right. 

That's it

The semantics above specifies the truth-value for any syntactically correct PL formula.  For each formula, the semantics give a rule for determining the truth-value of the formula, usually from the truth-value(s) of its subformula(s). 

Let's consider an example:  true∧(¬false∨¬true).  We will write our results in tabular form, as below.  In this table, we will write down the result of each operation whose result we know; for neatness, we will put each result under its operation symbol.  For clarity, in this table we have numbered the rows on the left and put an explanation of each row on the right. 

true ( ¬false ¬true ) Explanation
1.   true   false ¬false is true; ¬true is false
2.   true truefalse is true
3. true truetrue is true

We can see the values of true and false immediately, so there is no need to write them down again.  The first subformulae we can work out, beyond true and false, are ¬false and ¬true; we write their results beneath them in row 1.  Having done that, we can work out ¬false∧¬true, which we now know is the same as truefalse, and we write the result under the ∨.  Now we know enough to evaluate the entire formula, and we write the final answer under the ∧. 

Once we have learned how to follow this method, we need not number the rows nor explain each row, and we would produce a table such as the one below.  While we could write all the results in the same row, this makes it difficult to check our work later, so we continue to use a new row for each step.

true ( ¬false ¬true )
  true   false
  true
true

A truth table for any formula

We have seen truth tables for the basic operations so far; but it is certainly possible to write a truth table for any formula, or for other operations.  The example in the previous section was written using constants, but can be generalized to use metavariables instead:  α∧(¬β∨¬γ). 

αβγ ¬β ¬γ ¬β∨¬γ α∧(¬β∨¬γ)
truetruetrue falsefalse false false
truetruefalse falsetrue true true
truefalsetrue truefalse true true
truefalsefalse truetrue true true
falsetruetrue falsefalse false false
falsetruefalse falsetrue true false
falsefalsetrue truefalse true false
falsefalsefalse truetrue true false

A formula for any truth table

There is a straightforward way to write a formula that matches a particular truth table, namely by examining the table, writing a conjunction (∧) for each true row, then joining the conjunctions with ∨.  (This is disjunctive normal form.) 

The conjunction for a true row will contain each name that is true for that row, and the negation of each name that is false. 

If there are no true rows, then the formula is simply false

For example:

αβ??explanation
true true false (this row is false so we ignore it)
true falsetrue True row.  α is true, and β is false, so α∧¬β
falsetrue true True row.  α is false, and β is true, so ¬αβ
falsefalsefalse (this row is false so we ignore it)

The disjunction of the conjunctions for each true row is (α∧¬β) ∨(¬αβ).  This is a formula that matches the truth table. 

This method works for any truth table of any size.

Semantics of other operations

If ... then
αβαβ
truetruetrue
truefalsefalse
falsetruetrue
falsefalsetrue

Material implication (if ... then) →

Material implication is a troublesome operation because it seems to be connected with causality, yet (because propositional logic abstracts everything but truth values and logical structure) causality has no effect on its truth value. 

Material implication of β by α is written αβ and pronounced "if alpha, then beta."  Unlike the binary logic operations we have already seen, material implication is not commutative and its two operands have separate names:  α is called the antecedent and β the consequentαβ is true unless α is false and β is true. 

Material implication is easily confused with the meta-concept of semantic consequence; when material implication is used, semantic consequence is often what is intended.  To avoid this confusion, use the logically equivalent ¬αβ instead of αβ, and if ¬αβ does not seem right, consider using the meta-operation of semantic consequence instead. 

If and only if
αβαβ
truetruetrue
truefalsefalse
falsetruefalse
falsefalsetrue

Material bi-implication (if and only if) ↔ ≡

Material bi-implication is a troublesome operation because it seems to be connected with causality in both directions, yet (because propositional logic abstracts everything but truth values and logical structure) causality has no effect on its truth value. 

Material bi-implication of α and β is written αβ or αβ and pronounced "alpha if and only if beta."  αβ is true unless α and β have different truth-values. 

Material implication is easily confused with the meta-concept of logical equivalence; when material implication is used, logical equivalence is often what is intended.  To avoid this confusion, use the logically equivalent (αβ)∨(¬α∧¬β) instead of αβ, and if (αβ)∨(¬α∧¬β) does not seem right, consider using the meta-operation of logical equivalence instead. 

PL syntax semantics interpretation

Share-Alike Made with jEdit Valid CSS! Valid HTML 4.01! UC Irvine Thomas A. Alspaugh
Assistant Professor, Informatics Dept.
School of Information and Computer Sciences