next up previous
Next: About this document Up: My Home Page

Propositional Logic

Logic deals with the formalization of natural language and reasoning methods.

A proposition is a sentence that is either true or false, but not both.

Propositional logic is the study of the structure and meaning of (simple and complex) propositions.

Key questions are:

Examples

Example simple propositions include:

Some complex propositions are:

Sentences which are not propositions include:

Propositional Formulas

In studying properties of propositions we represent them by expressions called proposition forms or formulas.

Formulas are built from propositional variables, which represent simple propositions, and symbols representing logical connectives such as and, or, not, etc.

We use the letters p, q, r, s, tex2html_wrap_inline422 to denote propositional variables and the symbols such as tex2html_wrap_inline424 , tex2html_wrap_inline426 , and tex2html_wrap_inline428 to denote the standard logical connectives.

Proposition:
I passed the exam or I did not pass it.
Formula:
tex2html_wrap_inline430
The formula expresses the logical structure of the proposition, where p is essentially an abbreviation for the simple proposition ``I passed the exam.''

Proposition:
If I do not pass the exam I will fail the course.
Formula:
tex2html_wrap_inline434

Note. The term propositional logic also often refers to the formal language of propositional formulas.

Negation

We use the symbol tex2html_wrap_inline436 to denote negation.

Formalization (syntax): If tex2html_wrap_inline438 is a formula, then tex2html_wrap_inline440 is also a formula. We say that the second formula is the negation of the first.

For instance, p, tex2html_wrap_inline444 , and tex2html_wrap_inline446 are all formulas.

The similarity in the structure of a formula and its negation reflects a relationship between the meaning of propositions of this form.

Meaning (semantics): If a proposition is true, then its negation is false. If it is false, then its negation is true.

Example:

At the formula level we express the connection via a so-called truth table:

tabular280

If p is true, then tex2html_wrap_inline454 is false.

If p is false, the tex2html_wrap_inline458 is true.

Conjunction

We use the symbol tex2html_wrap_inline460 to denote conjunction.

Syntax: If tex2html_wrap_inline462 and tex2html_wrap_inline464 are formulas, then tex2html_wrap_inline466 is also a formula.

Semantics: If tex2html_wrap_inline468 is true and tex2html_wrap_inline470 is true, then tex2html_wrap_inline472 is true. In all other cases, tex2html_wrap_inline474 is false.

Truth table:

tabular286

Example:

  1. Bill went to the store.
  2. Mary ate cantaloupe.
  3. Bill went the store and Mary ate cantaloupe.
If p and q abbreviate the first and second sentence, then the third is represented by the conjunction tex2html_wrap_inline486 .

Inclusive Disjunction

We use the symbol tex2html_wrap_inline488 to denote (inclusive) disjunction.

Syntax: If tex2html_wrap_inline490 and tex2html_wrap_inline492 are formulas, then tex2html_wrap_inline494 is also a formula.

Semantics: If tex2html_wrap_inline496 is true or tex2html_wrap_inline498 is true or both are true, then tex2html_wrap_inline500 is true. If tex2html_wrap_inline502 and tex2html_wrap_inline504 are both false, then tex2html_wrap_inline506 is false.

Truth table:

tabular295

Example:

Exclusive Disjunction

We use the symbol tex2html_wrap_inline514 to denote exclusive disjunction.

Syntax: If tex2html_wrap_inline516 and tex2html_wrap_inline518 are formulas, then tex2html_wrap_inline520 is also a formula.

Semantics: An exclusive disjunction tex2html_wrap_inline522 is true if, and only if, one of tex2html_wrap_inline524 or tex2html_wrap_inline526 is true, but not both.

Truth table:

tabular304

Example:

Evaluation of Formulas

The semantics of logical connectives determines how propositional formulas are evaluated depending on the truth values assigned to variables.

Each possible truth assignment or valuation for the variables of a formula yields a truth value. The different possibilities can be summarized in a truth table.

Example: tex2html_wrap_inline534 (read ``p and not q'')

tabular317

Example: tex2html_wrap_inline548 (read ``p and, in addition, q or r'')

tabular322

Note that it is usually necessary to evaluate all subformulas as indicated by the respective rows.

Truth Tables

A truth table for a formula lists all possible ``situations'' of truth or falsity, depending on the values assigned to the variables of the formula.

Example:

tabular329

If p, q, r are the propositions ``Peter [Quincy, Richard] will lend Sam money,'' then Sam can deduce, not too surprisingly but logically correct, that he will be able to borrow money whenever one of his three friends is willing to lend him some.

Each row in the truth table corresponds to one possible situation of assigning truth values to p, q and r.

How many rows are there in a truth table with n variables? For n=1, there are two rows, for n=2, there are four rows, for n=3, there are eight rows, and so on. Do you see a pattern?

Constructing Truth Tables

There are two choices (true or false) for each of n variables, so in general there are tex2html_wrap_inline596 rows for n variables.

How can we construct these rows systematically?

A systematic procedure (an algorithm) is necessary to make sure you construct them all without duplicates.

The rightmost column must be computed as a function of all the truth values in the row.

Because it is clumsy and time-consuming to build large explicit truth tables, we will be interested in more efficient logical evaluation procedures.

Syntax of Formulas

The formal language of propositional logic can be specified by grammar rules.

The syntactic structure of a complex logical expression (i.e., its parse tree) must be unambiguous.

displaymath408

Parentheses are needed to avoid ambiguities. For example, the expression tex2html_wrap_inline602 can be interpreted in two different ways:

tabular351

Without parentheses the meaning of the formula is not clear! The same problem arises in arithmetic: does tex2html_wrap_inline618 mean tex2html_wrap_inline620 or tex2html_wrap_inline622 ?

Simplified Syntax

In arithmetic one often specifies a precedence among operators (say, times ahead of plus) to eliminate the need for some parentheses in certain programming languages. The same can be done for the logical connectives, though deleting parentheses may cause confusion.

The properties of the logical connectives can also be exploited to simplify the notation.

For instance, disjunction is commutative,

tabular358

and associative,

tabular364

We will therefore ambiguously write tex2html_wrap_inline642 to denote either tex2html_wrap_inline644 or tex2html_wrap_inline646 . The ambiguity is usually of no consequence, as both formulas have the same meaning.




next up previous
Next: About this document Up: My Home Page

Steve Skiena
Tue Aug 24 13:11:49 EDT 1999