Reading preferences
Optional display controls need JavaScript. All reading content and navigation work without it.
How to use Read
This page follows the chapter in source order. Equations are native MathML, so compatible screen readers and braille systems can navigate their internal structure. Every equation has an exact source-line link.
Propositional Logic: introduction to this part
This part contains material on classical propositional logic. The first chapter is relatively rudimentary and just lists definitions and results, many proofs are not carried out but are left as exercises. The material on proof systems and the completeness theorem is included from the part on first-order logic, with the “FOL” tag set to false. This leaves out everything related to predicates, terms, and quantifiers, and replaces talk of structures source 17 with talk about valuations source 18.
It is planned to expand this part to include more detail, and to add further topics and results, such as truth-functional completeness.
Introduction
Propositional logic deals with formulas that are built from propositional variables using the propositional connectives source 15, source 15, source 15, source 15, and source 15. Intuitively, a propositional variable source 16 stands for a sentence or proposition that is true or false. Whenever the “truth value” of the propositional variable in a formula is determined, so is the truth value of any formulas formed from them using propositional connectives. We say that propositional logic is truth functional, because its semantics is given by functions of truth values. In particular, in propositional logic we leave out of consideration any further determination of truth and falsity, e.g., whether something is necessarily true rather than just contingently true, or whether something is known to be true, or whether something is true now rather than was true or will be true. We only consider two truth values true (source 27) and false (source 27), and so exclude from discussion the possibility that a statement may be neither true nor false, or only half true. We also concentrate only on connectives where the truth value of a formula built from them is completely determined by the truth values of its parts (and not, say, on its meaning). In particular, whether the truth value of conditionals in English is truth functional in this sense is contentious. The material conditional source 34 is; other logics deal with conditionals that are not truth functional.
In order to develop the theory and metatheory of truth-functional propositional logic, we must first define the syntax and semantics of its expressions. We will describe one way of constructing formulas from propositional variables using the connectives. Alternative definitions are possible. Other systems will choose different symbols, will select different sets of connectives as primitive, and will use parentheses differently (or even not at all, as in the case of so-called Polish notation). What all approaches have in common, though, is that the formation rules define the set of formulas inductively. If done properly, every expression can result essentially in only one way according to the formation rules. The inductive definition resulting in expressions that are uniquely readable means we can give meanings to these expressions using the same method—inductive definition.
Giving the meaning of expressions is the domain of semantics. The central concept in semantics for propositional logic is that of satisfaction in a valuation. A valuation source 54 assigns truth values source 55, source 55 to the propositional variables. Any valuation determines a truth value source 56 for any formula source 57. A formula is satisfied in a valuation source 58 iff source 58—we write this as source 59. This relation can also be defined by induction on the structure of source 60, using the truth functions for the logical connectives to define, say, satisfaction of source 61 in terms of satisfaction (or not) of source 62 and source 62.
On the basis of the satisfaction relation source 64 for sentences we can then define the basic semantic notions of tautology, entailment, and satisfiability. A formula is a tautology, source 67, if every valuation satisfies it, i.e., source 68 for any source 68. It is entailed by a set of formulas, source 69, if every valuation that satisfies all the formulas in source 70 also satisfies source 70. And a set of formulas is satisfiable if some valuation satisfies all formulas in it at the same time. Because formulas are inductively defined, and satisfaction is in turn defined by induction on the structure of formulas, we can use induction to prove properties of our semantics and to relate the semantic notions defined.
Propositional formula
Formulas of propositional logic are built up from propositional variables and the propositional constant source 16 using logical connectives.
A denumerable set source 21 of propositional variables source 21, source 22, … The propositional constant for falsity source 23.
The logical connectives: , source 27 (negation) , source 28 (conjunction) , source 29 (disjunction) , source 30 (conditional)
Punctuation marks: (, ), and the comma.
We denote this language of propositional logic by source 35.
In addition to the primitive connectives introduced above, we also use the following defined symbols:
, source 45 (biconditional)
, source 47 (truth).
Definition: Propositional formulas
The set source 80 of formulas of propositional logic is defined inductively as follows:
source 83 is an atomic formula.
Every propositional variable source 87 is an atomic formula.
If source 90 is a formula, then source 90 is a formula.
If source 93 and source 93 are formulas, then source 93 is a formula.
If source 96 and source 96 are formulas, then source 96 is a formula.
If source 99 and source 99 are formulas, then source 99 is a formula.
Nothing else is a formula.
When writing a formula source 129 constructed from source 129, source 129 using a two-place connective source 130, we will often leave out the outermost pair of parentheses and write simply source 131.
Definition: Defined propositional operators
Formulas constructed using the defined operators are to be understood as follows:
source 140 abbreviates source 141.
source 161 abbreviates source 161.
Definition: Syntactic identity
The symbol source 168 expresses syntactic identity between strings of symbols, i.e., source 169 iff source 169 and source 169 are strings of symbols of the same length and which contain the same symbol in each place.
The source 173 symbol may be flanked by strings obtained by concatenation, e.g., source 174 means: the string of symbols source 175 is the same string as the one obtained by concatenating an opening parenthesis, the string source 176, the source 176 symbol, the string source 177, and a closing parenthesis, in this order. If this is the case, then we know that the first symbol of source 178 is an opening parenthesis, source 179 contains source 179 as a substring (starting at the second symbol), that substring is followed by source 180, etc.
Preliminaries
Theorem: Structural induction for formulas
If some property source 15 holds for all the atomic formulas and is such that
it holds for source 18 whenever it holds for source 19; it holds for source 20 whenever it holds for source 21 and source 21; it holds for source 22 whenever it holds for source 23 and source 23; it holds for source 24 whenever it holds for source 25 and source 25;
then source 29 holds for all formulas.
Proof
Let source 33 be the collection of all formulas with property source 34. Clearly source 34. source 34 satisfies all the conditions of Definition: Propositional formulas: it contains all atomic formulas and is closed under the operators. source 36 is the smallest such class, so source 37. So source 37, and every formula has property source 38.
End of proof.
Proposition: Balanced parentheses in formulas
Any formula in source 42 is balanced, in that it has as many left parentheses as right ones.
Exercise: Prove balanced parentheses
Proposition: No proper initial segment is a formula
No proper initial segment of a formula is a formula.
Exercise: Prove the initial-segment proposition
Proposition: Unique readability of formulas
Any formula source 59 in source 59 has exactly one parsing as one of the following
source 68 for some formula source 68.
source 70 for some formulas source 70 and source 70.
Moreover, this parsing is unique.
Proof
By induction on source 82. For instance, suppose that source 82 has two distinct readings as source 83 and source 83. Then source 83 and source 83 must be the same (or else one would be a proper initial segment of the other); so if the two readings of source 85 are distinct it must be because source 86 and source 86 are distinct readings of the same sequence of symbols, which is impossible by the inductive hypothesis.
End of proof.
Definition: Uniform substitution
If source 92 and source 92 are formulas, and source 92 is a propositional variable, then source 93 denotes the result of replacing each occurrence of source 94 by an occurrence of source 94 in source 94; similarly, the simultaneous substitution of source 95, …, source 95 by formulas source 96, …, source 96 is denoted by source 97.
Exercise: Identify uniform substitutions
For each of the five formulas below determine whether the formula can be expressed as a substitution source 101 where source 102 is (i) source 102; (ii) source 102; and (iii) source 103. In each case specify the relevant substitution.
Exercise: Define substitution by induction
Give a mathematically rigorous definition of source 115 by induction.
Formation Sequences
Defining formulas via an inductive definition, and the complementary technique of proving properties of formulas via induction, is an elegant and efficient approach. However, it can also be useful to consider a more bottom-up, step-by-step approach to the construction of formulas, which we do here using the notion of a formation sequence.
Definition: Formation sequences for formulas
A finite sequence source 22 of strings of symbols from the language source 23 is a formation sequence for source 24 if source 24 and for all source 24, either source 25 is an atomic formula or there exist source 25 such that one of the following holds:
source 28. source 29. source 30. source 31.
Example: A formation sequence
source 37 is a formation sequence of source 46, as is source 47
As can be seen from the second example, formation sequences may contain `junk': formulas which are redundant or do not contribute to the construction.
Proposition: Every formula has a formation sequence
Every formula source 65 in source 65 has a formation sequence.
Proof
Suppose source 69 is atomic. Then the sequence source 69 is a formation sequence for source 70.
Now suppose that source 72 and source 72 have formation sequences source 73 and source 73 respectively.
If source 77, then source 78 is a formation sequence for source 79. If source 80, then source 81 is a formation sequence for source 82. If source 83, then source 84 is a formation sequence for source 85. If source 86, then source 87 is a formation sequence for source 88.
By the principle of induction on formulas, every formula has a formation sequence.
End of proof.
We can also prove the converse. This is important because it shows that our two ways of defining formulas are equivalent: they give the same results. It also means that we can prove theorems about formulas by using ordinary induction on the length of formation sequences.
Lemma: Initial subsequences remain formation sequences
Suppose that source 105 is a formation sequence for source 106, and that source 106. Then source 106 is a formation sequence for source 107.
Proof
Exercise.
End of proof.
Theorem: Formulas characterized by formation sequences
source 116 is the set of all strings of symbols in the language source 117 with a formation sequence.
Proof
Let source 121 be the set of all strings of symbols in the language source 122 that have a formation sequence. We have seen in Proposition: Every formula has a formation sequence that source 124, so now we prove the converse.
Suppose source 126 has a formation sequence source 126. We prove that source 127 by strong induction on source 127. Our induction hypothesis is that every string of symbols with a formation sequence of length source 129 is in source 129. By the definition of a formation sequence, either source 130 is atomic or there must exist source 131 such that one of the following is the case:
source 134. source 135. source 136. source 137.
Now we reason by cases. If source 140 is atomic then source 141. Suppose instead that source 141. By Lemma: Initial subsequences remain formation sequences, source 143 and source 143 are formation sequences for source 144 and source 144 respectively. Since these are proper initial subsequences of the formation sequence for source 146, they both have length less than source 146. Therefore by the induction hypothesis, source 147 and source 147 are in source 147, and so by the definition of a formula, so is source 149. The other cases follow by parallel reasoning.
End of proof.
valuation and Satisfaction
Definition: Propositional valuations
Let source 14 be the set of the two truth values, “true” and “false.” A valuation for source 15 is a function source 16 assigning either source 16 or source 16 to the propositional variables of the language, i.e., source 17.
Definition: Evaluation of propositional formulas
Given a valuation source 22, define the evaluation function source 23 inductively by: source 24
Exercise: A ternary connective
Consider adding to source 120 a ternary connective source 120 with evaluation given by source 122 Write down the truth table for this connective.
Theorem: Local determination
Suppose that source 134 and source 135 are valuations that agree on the propositional variables occurring in source 136, i.e., source 136 whenever source 137 occurs in some formula source 138. Then source 138 and source 138 also agree on source 139, i.e., source 139.
Proof
By induction on source 143.
End of proof.
Definition: Satisfaction by a valuation
We can inductively define the notion of satisfaction of a formula source 148 by a valuation source 149, source 149, as follows. (We write source 150 to mean “not source 150.”)
Case: source 153.
Case: source 158 iff source 159.
Case: source 162 iff source 163.
Case: source 166 iff source 166 and source 167.
Case: source 170 iff source 171 or source 171 (or both).
Case: source 174 iff source 174 or source 175 (or both).
If source 182 is a set of formulas, source 182 iff source 183 for every source 183.
Proposition: Satisfaction agrees with truth value
source 187 iff source 187.
Proof
By induction on source 191.
End of proof.
Exercise: Prove satisfaction agrees with truth value
Semantic Notions
We define the following semantic notions:
Definition: Satisfiability, tautology, and semantic consequence
A formula source 17 is satisfiable if for some source 18, source 18; it is unsatisfiable if for no source 19, source 19;
A formula source 20 is a tautology if source 20 for all valuations source 21;
A formula source 22 is contingent if it is satisfiable but not a tautology;
If source 24 is a set of formulas, source 24 (“source 24 entails source 25”) if and only if source 25 for every valuation source 26 for which source 26.
If source 27 is a set of formulas, source 27 is satisfiable if there is a valuation source 28 for which source 29, and source 29 is unsatisfiable otherwise.
Exercise: Classify formulas semantically
For each of the following four formulas determine whether it is (a) satisfiable, (b) tautology, and (c) contingent.
Proposition: Basic semantic consequence facts
Proof
Exercise.
End of proof.
Exercise: Prove the semantic consequence facts
Proposition: Consequence and unsatisfiability
Proof
Exercise.
End of proof.
Exercise: Prove the consequence-unsatisfiability equivalence
Theorem: Semantic deduction theorem
Proof
Exercise.
End of proof.