If you have looked at the solutions of the puzzles from the previous theory page, you will have seen that it is useful to construct a truth table for the formulas that appear in the conclusion. The secret behind this is that you can find an exclusive model for the set of formulas of the puzzle in it. This theory page discusses this.
We first look back at the concept of valuation. A valuation is, by definition, a function that assigns truth values to all propositional variables ( if the proposition is false, for a true proposition). You can then also assign a truth value to a (well-formed) logical formula according to the rules of the game. In the table below, we have emphasised the function aspect of a valuation by writing the rules as function rules, so that a valuation of a formula amounts to a composition of mathematical functions.
Suppose that and can take on the value or (as with a valuation of proposition variables), then the following rules apply when using the logical connectives:
Suppose , , and are propositional variables with valuations , , and . Let's look at the formula . Then the valuation can be computed in steps as follows:
If and are valuations such that for every propositional variable that appears in a logical formula , then .
In the remainder of this theory page we will define important concepts such as model, tautology, valid consequence and consistency.
A valuation is called a model of a logical formula if: . A valuation is called a model of a formula set if it is a model of any formula . The set of models of a formula set is denoted as . A formula set is said to be satisfiable if the set of models of is not empty, i.e., if there exists a valuation that is a model of ; we therefore say that is satisfied by . A formula set is said to be inconsistent if no model of exists.
If we extend a formula set with a formula , then the set of models becomes a subset of the original set of corresponding models. Every model of the new formula set is a model of the original formula set, but the converse need not be true. In formula language: .
In previous examples of logic puzzles, we have already seen that each new formula in a problem provides additional information about the situation. This means that when we expand a set of formulas we generally get a smaller set of models and ideally end up with only one model that is the solution to the problem.
Let us use the party puzzle as an illustration. There were three statements and we'll give them names right away:
: "Bob comes to the party if Ann or Claudia come."
: "Ann comes to the party if Claudia does not come."
: "If Ann comes to the party, then Bob does not come ."
The question asked now boils down to: does the formula set have a unique model?
We use the letters , and for the propositions "Anna is coming to the party.", "Bob comes to the party.", and "Claudia comes to the party.", respectively. We first determine all models of , then of , and finally of . The results are shown in the table below.
ratings |
model of |
|
|
|
|
|
|
0 |
0 |
0 |
Yes |
no |
- |
0 |
0 |
1 |
no |
- |
- |
0 |
1 |
0 |
Yes |
no |
- |
0 |
1 |
1 |
Yes |
Yes |
Yes |
1 |
0 |
0 |
no |
- |
- |
1 |
0 |
1 |
no |
- |
- |
1 |
1 |
0 |
Yes |
Yes |
no |
1 |
1 |
1 |
Yes |
Yes |
no |
The only model that remains of the three statements is the valuation with , and . Bob and Claudio come to the party.
The definition of the term "valid consequence" corresponds with the previous intuitive description of a logically valid inference based on one or more premises . Such an argument is correct, i.e., logically valid, if and only if the conclusion is a valid consequence of . So every model of is also a model of the conclusion . If an argument is not correct, then a valuation must exist such that , but .
A logical formula is called a tautology if every valuation is a model of , i.e., if for every valuation .
Any formula of the form is a tautology. Also, any formula of the form is a tautology. You can see this from the truth tables below
A logical formula is called a contradiction if no valuation is a model of , i.e. if for every valuation . The formula is a contradiction if and only if is a tautology. We call a logical formula a contingency if at least one valuation exists that is a model of . Each formula set can be divided into contradictions, contingencies and tautologies.
Any formula of the form is a contraction. Also, any formula of the form is a contradiction. You can see this from the truth table below. The formula is a contingent formula because you can choose the valuation .
Two formulas and are called logical equivalent if the formula is a tautology. In other words, for every valuation we have , that is, and .
The formulas and are equivalent, i.e., is a tautology. This follows from the truth table below. For the formulas and , the formulas and are equivalent. This follows from the truth table below. That the formula is a tautology can also be shown via a truth table, but perhaps more convenient is the following kind of calculation in metalanguage, with as the symbol for "if and only if" and as the symbol for the conjunction "and":
It is already included in the name "logical equivalence", but indeed the three characteristics of an equivalence relation are fulfilled:
- (reflexivity) Every formula is logically equivalent to itself ( ).
- (symmetry) If the formula is logically equivalent to the formula , then also is logically equivalent to the formula (in metalanguage: ).
- (transitivity) If the formula is logically equivalent to the formula and is logically equivalent to the formula , then is logically equivalent to (in metalanguage using as implication arrow: ).
A formula is called a valid consequence of a formula set if every model of is also a model of . This is denoted as . In other words, the reasoning that the formula being true follows from formula set is valid.
If , then we also write as and we say that follows logically from the premises .
For the propositions , and we have:
For an empty formula set, i.e., , then , abbreviated as , means that each valuation is a model of , i.e., is a tautology.
If the formula is not a valid consequence of the formula set , i.ei, there exists a model of that is not a model of , then we denote this as .
For example, for propositions and we have because it follows from the valuation via the truth table of the connective that . This valuation makes and true, but is false. So the valuation is a model of , but not of . This valuation is called a counterexample.
To make this example more concrete, let's make and the statements "The computer code is correct." and "The program terminates." From the propositions "If the computer code is correct, the program terminates" and "The computer code is correct." it follows that the program terminates. But a terminating program does not mean that the computer code is correct. That is not a valid consequence of the propostions.
You can also make statements about valid inferences in metalanguage (here with the "if then" symbol , a "if and only if " symbol and a conjunction "and" symbolized by ). The following metapropositions are some examples.
For formulas and we have:
For formulas and we have:
For formulas , and we have:
A formula set is called (semantically) consistent if a model of exists. If no model of the formula set exists, then is called (semantically) inconsistent. The latter is often undesirable, because the absence of models means that every formula then follows validly from this set, and therefore also its negation.
Suppose and are proposition variables. Then is a fulfillable set. After all, the valuation and is a model of .
The formula set on the other hand, is an unfulfillable set. After all, for a valuation to be a model of , and . But then .
A formula set is (semantically) consistent if and only if the set is satisfiable. The concepts of consistency and satisfiability are therefore closely related. The first concept, consistency, is about ensuring that the set of formulas does not lead to a contradiction; thus, it is related to proof theory. The second concept, satisfiability, is more about the existence of a valuation for which all formulas in the given formula set have the truth value . It is therefore more about finding a suitable valuation than about excluding a contradiction.