Logics

In ATP, problems are expressed in some formal language. Most commonly the problems are expressed in a logic, ranging from classical propositional logic to more exotic logics, such as modal and temporal logics. Current research in ATP is dominated by the use of classical logic, at the propositional and 1st order levels. These logics, and proof within these logics, are well understood and documented.


Propositional (0th order) Logic

Propositional logic is a simple and well known language for representing knowledge. It is very simple to test for logical consequence in propositional logic, as is shown below.

The Language of Propositional logic

The syntax of propositional logic is most easily introduced through an example.

Example
A = { If I am clever then I will pass,
      If I will pass then I am clever,
      Either I am clever or I will pass }
C = I am clever and I will pass

The conclusion that I am clever and I will pass is a logical consequence of the axioms. The example is written in English, but it is easily translated into propositional logic. There are two propositions in the example: I am clever and I will pass. In propositional logic, these propositions can be represented by their text. Using the Prolog convention of starting propositions with lowercase alphabetic, the axiom set and conclusion become :

A = { If i_am_clever then i_will_pass,
      If i_will_pass then i_am_clever,
      Either i_am_clever or i_will_pass }
C = i_am_clever and i_will_pass
To remove the if-then and other English words, connectives are used. The commonly used connectives of propositional logic are: There are other less common connectives, giving a total of four unary connectives and 16 binary ones. Any good introductory text on logic, e.g., [Chu56] will provide details. For ATP, the above are adequate. The truth tables for the connectives provide their meaning.

Denoting arbitary propositional formulae by uppercase variable letters, e.g., P, propositional formulae are defined recursively by:

The precedence order of the above operators is ~ | & => <=>, i.e., ~ binds most tightly, down to <=>. This precedence ordering allows some brackets to be omitted, e.g., ~a | b => c means (((~a) | b) => c).

Now the above example can be written in propositional logic as follows:

Example
A = { i_am_clever => i_will_pass,
      i_will_pass => i_am_clever,
      i_am_clever | i_will_pass }
C = i_am_clever & i_will_pass


Interpretation of Propositional Logic

Recall that an interpretation assigns world object to words and functions of statements, and truth values (TRUE and FALSE) to the statements. In propositional logic there are no "component parts", only statements in the form of propositional formulae, e.g., i_am_clever and i_am_clever => ~i_will_pass. For propositional logic, interpretation consists of assigning truth values to propositions and defining how truth values are combined by the connectives. The manner in which the connectives are interpreted is globally agreed on, as described later. The assignment of truth values to the propositions is determined by the user.

The number of possible assignments of truth values to N propositions, and thus the number of possible interpretations of N propositions, is 2N. All the interpretations can be captured in a truth table with 2N rows. For a language that contains three propositions, i_am_clever, i_will_pass, and i_will_fail, there are eight possible interpretations:

Example
i_am_cleveri_will_passi_will_fail
1TTT
2TTF
3TFT
4TFF
5FTT
6FTF
7FFT
8FFF

An alternative way of representing all the interpretations is as a semantic tree:

The following table defines how truth values are combined with connectives:

Truth table for connectives
P Q ~P P & QP | QP => QP <=> Q P <~> Q
TTFT T T T F
TFFF T F F T
FTTF T T F T
FFTF F T T F

The definitions for negation, conjunction, and disjunction are common, and correspond directly to their English meanings. Equivalence is also quite straight forward. The definition for implication is less intuitive (to the English speaker). There's a simple example that helps to remember the definition: A politician says "If I am elected, then I will reduce taxes" (i_am_elected => i_will_reduce_taxes). If the politician is elected, and he does reduce taxes, then he didn't lie (TRUE => TRUE is TRUE). If he does not get elected, than it does not matter about his promise (FALSE => TRUE and FALSE => FALSE are both TRUE). Only if he is elected and he does not reduce taxes is the politician a liar (TRUE => FALSE is FALSE).

Given an interpretation, a truth table or semantic tree can be used to calculate the truth value of a propositional formula for all possible interpretations.

Example
I = { i_am_clever => TRUE,
      i_will_pass => FALSE }
F = (i_am_clever => i_will_pass) | ~i_am_clever
i_am_cleveri_will_passi_am_clever => i_will_pass~i_am_clever(i_am_clever => i_will_pass) | ~i_am_clever
TTTFT
TFFFF
FTTTT
FFTTT

Represented using a semantic tree:


Exam Style Questions

  1. How many possible interpretations are their of statements written in propositional logic?
  2. What is a semantic tree?