Mathematical Logic Lecture Notes, Exercises of Logic

An overview of mathematical logic and its development as a mathematical subject. It covers basic notions from elementary set theory and formalizes concepts used informally by mathematicians. The document also discusses the connections and disconnections between the notions of truth in a given structure and provability from a given set of axioms. It refers to several books for additional material in model theory and computability theory. a useful resource for students studying mathematical logic.

Typology: Exercises

2022/2023

Uploaded on 03/14/2023

alpa
alpa 🇺🇸

4.4

(20)

249 documents

1 / 119

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Mathematical Logic
(Math 570)
Lecture Notes
Lou van den Dries
Fall Semester 2019
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Mathematical Logic Lecture Notes and more Exercises Logic in PDF only on Docsity!

Mathematical Logic

(Math 570)

Lecture Notes

Lou van den Dries

Fall Semester 2019

  • 1 Preliminaries
    • 1.1 Mathematical Logic: a brief overview
    • 1.2 Sets and Maps
  • 2 Basic Concepts of Logic
    • 2.1 Propositional Logic
    • 2.2 Completeness for Propositional Logic
    • 2.3 Languages and Structures
    • 2.4 Variables and Terms
    • 2.5 Formulas and Sentences
    • 2.6 Models
    • 2.7 Logical Axioms and Rules; Formal Proofs
  • 3 The Completeness Theorem
    • 3.1 Another Form of Completeness
    • 3.2 Proof of the Completeness Theorem
    • 3.3 Some Elementary Results of Predicate Logic
    • 3.4 Equational Classes and Universal Algebra
  • 4 Some Model Theory
    • 4.1 L¨owenheim-Skolem; Vaught’s Test
    • 4.2 Elementary Equivalence and Back-and-Forth
    • 4.3 Quantifier Elimination
    • 4.4 Presburger Arithmetic
    • 4.5 Skolemization and Extension by Definition
  • 5 Computability, Decidability, and Incompleteness
    • 5.1 Computable Functions
    • 5.2 The Church-Turing Thesis
    • 5.3 Primitive Recursive Functions
    • 5.4 Representability
    • 5.5 Decidability and G¨odel Numbering
    • 5.6 Theorems of G¨odel and Church
    • 5.7 A more explicit incompleteness theorem
  • 5.8 Undecidable Theories

Chapter 1

Preliminaries

We start with a brief overview of mathematical logic as covered in this course. Next we review some basic notions from elementary set theory, which provides a medium for communicating mathematics in a precise and clear way. In this course we develop mathematical logic using elementary set theory as given, just as one would do with other branches of mathematics, like group theory or probability theory. For more on the course material, see

Shoenfield, J. R., Mathematical Logic, Reading, Addison-Wesley, 1967.

For additional material in Model Theory we refer the reader to

Chang, C. C. and Keisler, H. J., Model Theory, New York, North- Holland, 1990,

Poizat, B., A Course in Model Theory, Springer, 2000,

and for additional material on Computability, to

Rogers, H., Theory of Recursive Functions and Effective Com- putability, McGraw-Hill, 1967.

1.1 Mathematical Logic: a brief overview

Aristotle identified some simple patterns in human reasoning, and Leibniz dreamt of reducing reasoning to calculation. As a viable mathematical subject, however, logic is relatively recent: the 19th century pioneers were Bolzano, Boole, Cantor, Dedekind, Frege, Peano, C.S. Peirce, and E. Schr¨oder. From our perspective we see their work as leading to boolean algebra, set theory, propositional logic, predicate logic, as clarifying the foundations of the natural and real number systems, and as introducing suggestive symbolic notation for logical operations. Also, their activity led to the view that logic + set theory can serve as a basis for

1.1. MATHEMATICAL LOGIC: A BRIEF OVERVIEW 3

Once we have mathematical definitions of these notions, we can try to prove theorems about these formalized notions. If done with imagination, this process can lead to unexpected rewards. Of course, formalization tends to caricature the informal concepts it aims to capture, but no harm is done if this is kept firmly in mind.

Example. The notorious Goldbach Conjecture asserts that every even integer greater than 2 is a sum of two prime numbers. With the understanding that the variables range over N = { 0 , 1 , 2 ,... }, and that 0, 1 , +, ·, < denote the usual arithmetic operations and relations on N, this assertion can be expressed formally as

(GC) ∀x[(1 + 1 < x ∧ even(x)) → ∃p∃q(prime(p) ∧ prime(q) ∧ x = p + q)]

where even(x) abbreviates ∃y(x = y + y) and prime(p) abbreviates

1 < p ∧ ∀r∀s(p = r · s → (r = 1 ∨ s = 1)).

The expression GC is an example of a formal statement (also called a sentence) in the language of arithmetic, which has symbols 0, 1 , +, ·, < to denote arithmetic operations and relations, in addition to logical symbols like =, ∧, ∨, ¬, →, ∀, ∃, and variables x, y, z, p, q, r, s. The Goldbach Conjecture asserts that this particular sentence GC is true in the structure (N; 0, 1 , +, ·, <). (No proof of the Goldbach Conjecture is known.) It also makes sense to ask whether the sentence GC is true in the structure

(R; 0, 1 , +, ·, <)

where now the variables range over R and 0, 1 , +, ·, < have their natural ‘real’ meanings. (It’s not, as is easily verified. That the question makes sense —has a yes or no answer—does not mean that it is of any interest.) A century of experience gives us confidence that all classical number-theoretic results—old or new, proved by elementary methods or by sophisticated algebra and analysis—can be proved from the Peano axioms for arithmetic. 2 However, in our present state of knowledge, GC might be true in (N; 0, 1 , +, ·, <), but not provable from those axioms. (On the other hand, once you know what exactly we mean by provable from the Peano axioms,

you will see that if GC is provable from those axioms, then GC is true in (N; 0, 1 , +, ·, <), and that if GC is false in (N; 0, 1 , +, ·, <), then its negation ¬GC is provable from those axioms.) The point of this example is simply to make the reader aware of the notions “true in a given structure” and “provable from a given set of axioms,” and their difference. One objective of this course is to figure out the connections (and disconnections) between these notions.

(^2) Here we do not count as part of classical number theory some results like Ramsey’s Theorem that can be stated in the language of arithmetic, but are arguably more in the spirit of logic and combinatorics.

4 CHAPTER 1. PRELIMINARIES

Some highlights (1900–1950)

The results below are among the most frequently used facts of mathematical logic. The terminology used in stating these results might be unfamiliar, but that should change during the course. What matters is to get some preliminary idea of what we are aiming for. As will become clear during the course, each of these results has stronger versions, on which applications often depend, but in this overview we prefer simple statements over strength and applicability. We begin with two results that are fundamental in model theory. They concern the notion of model of Σ where Σ is a set of sentences in a language L. At this stage we only say by way of explanation that a model of Σ is a mathematical structure in which all sentences of Σ are true. For example, if Σ is the (infinite) set of axioms for fields of characteristic zero in the language of rings, then a model of Σ is just a field of characteristic zero.

Theorem of L¨owenheim and Skolem. If Σ is a countable set of sentences in some language and Σ has a model, then Σ has a countable model.

Compactness Theorem (G¨odel, Mal’cev). Let Σ be a set of sentences in some language. Then Σ has a model if and only if each finite subset of Σ has a model.

The next result goes a little beyond model theory by relating the notion of “model of Σ” to that of “provability from Σ”:

Completeness Theorem (G¨odel, 1930). Let Σ be a set of sentences in some language L, and let σ be a sentence in L. Then σ is provable from Σ if and only if σ is true in all models of Σ.

In our treatment we shall obtain the first two theorems as byproducts of the Completeness Theorem and its proof. In the case of the Compactness Theorem this reflects history, but the theorem of L¨owenheim and Skolem predates the Completeness Theorem. The L¨owenheim-Skolem and Compactness theorems do not mention the notion of provability, and thus model theorists often prefer to bypass Completeness in establishing these results; see for example Poizat’s book.

Here is an important early result on a specific arithmetic structure:

Theorem of Presburger and Skolem. Each sentence in the language of the structure (Z; 0 , 1 , +, −, <) that is true in this structure is provable from the axioms for ordered abelian groups with least positive element 1 , augmented, for each n = 2, 3 , 4 , ..., by an axiom that says that for every a there is a b such that a = nb or a = nb + 1 or... or a = nb + 1 + · · · + 1 (with n disjuncts in total). Moreover, there is an algorithm that, given any sentence in this language as input, decides whether this sentence is true in (Z; 0, 1 , +, −, <).

Note that in (Z; 0, 1 , +, −, <) we have not included multiplication among the primitives; accordingly, nb stands for b + · · · + b (with n summands). When we do include multiplication, the situation changes dramatically:

6 CHAPTER 1. PRELIMINARIES

For example, { 1 , 2 , 7 } is the set with 1, 2, and 7 as its only elements. Note that { 1 , 2 , 7 } = { 2 , 7 , 1 }, and { 3 , 3 } = { 3 }: the same set can be described in many different ways. Don’t confuse an object x with the set {x} that has x as its only element: for example, the object x = { 0 , 1 } is a set that has exactly two elements, namely 0 and 1, but the set {x} = {{ 0 , 1 }} has only one element, namely x. Here are some important sets that the reader has probably encountered previously.

Examples. (1) The empty set: ∅ (it has no elements). (2) The set of natural numbers: N = { 0 , 1 , 2 , 3 ,.. .}. (3) The set of integers: Z = {... , − 2 , − 1 , 0 , 1 , 2 ,.. .}. (4) The set of rational numbers: Q. (5) The set of real numbers: R. (6) The set of complex numbers: C.

Remark. Throughout these notes m and n always denote natural numbers. For example, “for all m ...” will mean “for all m ∈ N...”.

If all elements of the set A are in the set B, then we say that A is a subset of B (and write A ⊆ B). Thus the empty set ∅ is a subset of every set, and each set is a subset of itself. We often introduce a set A in our discussions by defining A to be the set of all elements of a given set B that satisfy some property P. Notation:

A := {x ∈ B : x satisfies P } (hence A ⊆ B).

Let A and B be sets. Then we can form the following sets:

(a) A ∪ B := {x : x ∈ A or x ∈ B} (union of A and B); (b) A ∩ B := {x : x ∈ A and x ∈ B} (intersection of A and B); (c) A r B := {x : x ∈ A and x /∈ B} (difference of A and B); (d) A × B := {(a, b) : a ∈ A and b ∈ B} (cartesian product of A and B).

Thus the elements of A × B are the so-called ordered pairs (a, b) with a ∈ A and b ∈ B. The key property of ordered pairs is that we have (a, b) = (c, d) if and only if a = c and b = d. For example, you may think of R × R as the set of points (a, b) in the xy-plane of coordinate geometry. We say that A and B are disjoint if A ∩ B = ∅, that is, they have no element in common.

Remark. In a definition such as we just gave: “We say that · · · if —,” the meaning of “if” is actually “if and only if.” We committed a similar abuse of language earlier in defining set inclusion by the phrase “If —, then we say that · · · .” We shall continue such abuse, in accordance with tradition, but only in similarly worded definitions. Also, we shall often write “iff” or “⇔” to abbreviate “if and only if.”

1.2. SETS AND MAPS 7

Maps

Definition. A map is a triple f = (A, B, Γ) of sets A, B, Γ such that Γ ⊆ A × B and for each a ∈ A there is exactly one b ∈ B with (a, b) ∈ Γ; we write f (a) for this unique b, and call it the value of f at a (or the image of a under f ).^3 We call A the domain of f , and B the codomain of f , and Γ the graph of f.^4 We write f : A → B to indicate that f is a map with domain A and codomain B, and in this situation we also say that f is a map from A to B.

Among the many synonyms of map are

mapping, assignment, f unction, operator, transf ormation.

Typically, “function” is used when the codomain is a set of numbers of some kind, “operator” when the elements of domain and codomain are themselves functions, and “transformation” is used in geometric situations where domain and codomain are equal. (We use equal as synonym for the same or identical; also coincide is a synonym for being the same.)

Examples. (1) Given any set A we have the identity map 1A : A → A defined by 1A(a) = a for all a ∈ A. (2) Any polynomial f (X) = a 0 + a 1 X + · · · + anXn^ with real coefficients a 0 ,... , an gives rise to a function x 7 → f (x) : R → R. We often use the “maps to” symbol 7 → in this way to indicate the rule by which to each x in the domain we associate its value f (x).

Definition. Given f : A → B and g : B → C we have a map g ◦ f : A → C defined by (g ◦ f )(a) = g(f (a)) for all a ∈ A. It is called the composition of g and f.

Definition. Let f : A → B be a map. It is said to be injective if for all a 1 6 = a 2 in A we have f (a 1 ) 6 = f (a 2 ). It is said to be surjective if for each b ∈ B there exists a ∈ A such that f (a) = b. It is said to be bijective (or a bijection) if it is both injective and surjective. For X ⊆ A we put

f (X) := {f (x) : x ∈ X} ⊆ B (direct image of X under f ).

(There is a notational conflict here when X is both a subset of A and an element of A, but it will always be clear from the context when f (X) is meant to be the the direct image of X under f ; some authors resolve the conflict by denoting this direct image by f [X] or in some other way.) We also call f (A) = {f (a) : a ∈ A} the image of f. For Y ⊆ B we put

f −^1 (Y ) := {x ∈ A : f (x) ∈ Y } ⊆ A (inverse image of Y under f ).

Thus surjectivity of our map f is equivalent to f (A) = B.

(^3) Sometimes we shall write f a instead of f (a) in order to cut down on parentheses. (^4) Other words for “domain” and “codomain” are “source” and “target”, respectively.

1.2. SETS AND MAPS 9

Let I and A be sets. Then there is a set whose elements are exactly the maps f : I → A, and this set is denoted by AI^. For I = { 1 ,... , n} we also write An instead of AI^. Thus an element of An^ is a map a : { 1 ,... , n} → A; we usually think of such an a as the n-tuple (a(1),... , a(n)), and we often write ai instead of a(i). So An^ can be thought of as the set of n-tuples (a 1 ,... , an) with each ai ∈ A. For n = 0 the set An^ has just one element — the empty tuple. An n-ary relation on A is just a subset of An, and an n-ary operation on A is a map from An^ into A. Instead of “1-ary” we usually say “unary”, and instead of “2-ary” we can say “binary”. For example, {(a, b) ∈ Z^2 : a < b} is a binary relation on Z, and integer addition is the binary operation (a, b) 7 → a + b on Z.

Definition. {ai}i∈I or (ai)i∈I denotes a family of objects ai indexed by the set I, and is just a suggestive notation for a set {(i, ai) : i ∈ I}, not to be confused with the set {ai : i ∈ I}. (There may be repetitions in the family, that is, it may happen that ai = aj for distinct indices i, j ∈ I, but such repetition is not reflected in the set {ai : i ∈ I}. For example, if I = N and an = a for all n, then {(i, ai) : i ∈ I} = {(i, a) : i ∈ N} is countably infinite, but {ai : i ∈ I} = {a} has just one element.) For I = N we usually say “sequence” instead of “family”.

Given any family (Ai)i∈I of sets (that is, each Ai is a set) we have a set ⋃

i∈I

Ai := {x : x ∈ Ai for some i ∈ I},

the union of the family, or, more informally, the union of the sets Ai. If I is finite and each Ai is finite, then so is the union above and

|

i∈I

Ai| ≤

i∈I

|Ai|.

If I is countable and each Ai is countable then

i∈I Ai^ is countable.

Given any family (Ai)i∈I of sets we have a set

i∈I

Ai := {(ai)i∈I : ai ∈ Ai for all i ∈ I},

the product of the family. One axiom of set theory, the Axiom of Choice, is a bit special, but we shall use it a few times. It says that for any family (Ai)i∈I of nonempty sets there is a family (ai)i∈I such that ai ∈ Ai for all i ∈ I, that is,

i∈I Ai^6 =^ ∅.

Words

Definition. Let A be a set. Think of A as an alphabet of letters. A word of length n on A is an n-tuple (a 1 ,... , an) of letters ai ∈ A; because we think of it as a word (string of letters) we shall write this tuple instead as a 1... an (without parentheses or commas). There is a unique word of length 0 on A, the

10 CHAPTER 1. PRELIMINARIES

empty word and written . Given a word a = a 1... an of length n ≥ 1 on A, the first letter (or first symbol) of a is by definition a 1 , and the last letter (or last symbol) of a is an. The set of all words on A is denoted A∗:

A∗^ =

n

An^ (disjoint union).

Logical expressions like formulas and terms will be introduced later as words of a special form on suitable alphabets. When A ⊆ B we can identify A∗^ with a subset of B∗, and this will be done whenever convenient.

Definition. Given words a = a 1... am and b = b 1... bn on A of length m and n respectively, we define their concatenation ab ∈ A∗:

ab = a 1... amb 1... bn.

Thus ab is a word on A of length m + n. Concatenation is a binary operation on A∗^ that is associative: (ab)c = a(bc) for all a, b, c ∈ A∗, with  as two-sided identity: a = a = a for all a ∈ A∗, and with two-sided cancellation: for all a, b, c ∈ A∗, if ab = ac, then b = c, and if ac = bc, then a = b.

Equivalence Relations and Quotient Sets

Given a binary relation R on a set A it is often more suggestive to write aRb instead of (a, b) ∈ R.

Definition. An equivalence relation on a set A is a binary relation ∼ on A such that for all a, b, c ∈ A: (i) a ∼ a (reflexivity); (ii) a ∼ b implies b ∼ a (symmetry); (iii) (a ∼ b and b ∼ c) implies a ∼ c (transitivity).

Example. Given any n we have the equivalence relation “congruence modulo n” on Z defined as follows: for any a, b ∈ Z we have

a ≡ b mod n ⇐⇒ a − b = nc for some c ∈ Z.

For n = 0 this is just equality on Z.

Let ∼ be an equivalence relation on the set A. The equivalence class a∼^ of an element a ∈ A is defined by a∼^ = {b ∈ A : a ∼ b} (a subset of A). For a, b ∈ A we have a∼^ = b∼^ if and only if a ∼ b, and a∼^ ∩ b∼^ = ∅ if and only if a  b. The quotient set of A by ∼ is by definition the set of equivalence classes:

A/ ∼ = {a∼^ : a ∈ A}.

This quotient set is a partition of A, that is, it is a collection of pairwise disjoint nonempty subsets of A whose union is A. (Collection is a synonym for set; we use it here because we don’t like to say “set of ... subsets ...”.) Every partition

12 CHAPTER 1. PRELIMINARIES

Of course, P can have at most one least element; therefore we can refer to the least element of P , if P has a least element; likewise, we can refer to the largest element of P , if P has a largest element. A minimal element of P is a p ∈ P such that there is no x ∈ P with x < p; a maximal element of P is defined likewise, with > instead of <. If P has a least element, then this element is also the unique minimal element of P ; some posets, however, have more than one minimal element. The reader might want to prove the following result to get a feeling for these notions:

If P is finite and nonempty, then P has a maximal element, and there is a linear order ≤′^ on P that extends ≤ in the sense that

p ≤ q =⇒ p ≤′^ q, for all p, q ∈ P.

(Hint: use induction on |P |.)

Let X ⊆ P. A lowerbound (respectively, upperbound ) of X in P is an element l ∈ P (respectively, an element u ∈ P ), such that l ≤ x for all x ∈ X (respectively, x ≤ u for all x ∈ X). We often tacitly consider X as a poset in its own right, by restricting the given partial ordering of P to X. More precisely this means that we consider the poset (X, ≤X ) where the partial ordering ≤X on X is defined by

x ≤X y ⇐⇒ x ≤ y (x, y ∈ X).

Thus we can speak of least, largest, minimal, and maximal elements of a set X ⊆ P , when the ambient poset (P, ≤) is clear from the context. For example, when X is the collection of nonempty subsets of a set A and X is ordered by inclusion, then the minimal elements of X are the singletons {a} with a ∈ A. We call X a chain in P if (X, ≤X ) is linearly ordered.

Occasionally we shall use the following fact about posets (P, ≤).

Zorn’s Lemma. Suppose P is nonempty and every nonempty chain in P has an upperbound in P. Then P has a maximal element.

For a further discussion of Zorn’s Lemma and its proof using the Axiom of Choice we refer the reader to Halmos’s book on set theory.

Chapter 2

Basic Concepts of Logic

2.1 Propositional Logic

Propositional logic is the fragment of logic where new statements are built from given statements using so-called connectives like “not”, “or” and “and”. The truth value of such a new statement is then completely determined by the truth values of the given statements. Thus, given any statements p and q, we can form the three statements

¬p (the negation of p, pronounced as “not p”), p ∨ q (the disjunction of p and q, pronounced as “p or q”), p ∧ q (the conjunction of p and q, pronounced as “p and q”).

This leads to more complicated combinations like ¬

p ∧ (¬q)

. We shall regard ¬p as true if and only if p is not true; also, p ∨ q is defined to be true if and only if p is true or q is true (including the possibility that both are true), and p ∧ q is deemed to be true if and only if p is true and q is true. Instead of “not true” we also say “false”. We now introduce a formalism that makes this into mathematics.

We start with the five distinct symbols

⊥ ¬ ∨ ∧

to be thought of as true, false, not, or, and and, respectively. These symbols are fixed throughout the course, and are called propositional connectives. In this section we also fix a set A whose elements will be called propositional atoms (or just atoms), such that no propositional connective is an atom. It may help the reader to think of an atom a as a variable for which we can substitute arbitrary statements, assumed to be either true or false. A proposition on A is a word on the alphabet A ∪ {>, ⊥, ¬, ∨, ∧} that can be obtained by applying the following rules:

2.1. PROPOSITIONAL LOGIC 15

a moment’s thought. For now we shall assume this lemma without proof. At the end of this section we establish more general results of this kind which are needed also later in the course.

Remark. Rather than thinking of a proposition as a statement, it’s better viewed as a function whose arguments and values are statements: replacing the atoms in a proposition by specific mathematical statements like “2 × 2 = 4”, “π^2 < 7”, and “every even integer > 2 is the sum of two prime numbers”, we obtain again a mathematical statement.

We shall use the following notational conventions: p → q denotes ¬p ∨ q, and p ↔ q denotes (p → q) ∧ (q → p). By recursion on n we define

p 1 ∨... ∨ pn =

⊥ if n = 0 p 1 if n = 1 p 1 ∨ p 2 if n = 2 (p 1 ∨... ∨ pn− 1 ) ∨ pn if n > 2

Thus p ∨ q ∨ r stands for (p ∨ q) ∨ r. We call p 1 ∨... ∨ pn the disjunction of p 1 ,... , pn. The reason that for n = 0 we take this disjunction to be ⊥ is that we want a disjunction to be true iff (at least) one of the disjuncts is true. Similarly, the conjunction p 1 ∧... ∧ pn of p 1 ,... , pn is defined by replacing everywhere ∨ by ∧ and ⊥ by > in the definition of p 1 ∨... ∨ pn.

Definition. A truth assignment is a map t : A → { 0 , 1 }. We extend such a t to ˆt : Prop(A) → { 0 , 1 } by requiring (i) ˆt(>) = 1, ˆt(⊥) = 0, (ii) ˆt(¬p) = 1 − ˆt(p), (iii) ˆt(p ∨ q) = max(ˆt(p), ˆt(q)), ˆt(p ∧ q) = min(ˆt(p), ˆt(q)).

Note that there is exactly one such extension ˆt by unique readability. To simplify notation we often write t instead of ˆt. The array below is called a truth table. It shows on each row below the top row how the two leftmost entries t(p) and t(q) determine t(¬p), t(p ∨ q), t(p ∧ q), t(p → q) and t(p ↔ q).

p q ¬p p ∨ q p ∧ q p → q p ↔ q 0 0 1 0 0 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 1

Let t : A → { 0 , 1 }. Note that t(p → q) = 1 if and only if t(p) ≤ t(q), and that t(p ↔ q) = 1 if and only if t(p) = t(q). Suppose a 1 ,... , an are the distinct atoms that occur in p, and we know how p is built up from those atoms. Then we can compute in a finite number of steps t(p) from t(a 1 ),... , t(an). In particular, t(p) = t′(p) for any t′^ : A → { 0 , 1 } such that t(ai) = t′(ai) for i = 1,... , n.

16 CHAPTER 2. BASIC CONCEPTS OF LOGIC

Definition. We say that p is a tautology (notation: |= p) if t(p) = 1 for all t : A → { 0 , 1 }. We say that p is satisfiable if t(p) = 1 for some t : A → { 0 , 1 }.

Thus > is a tautology, and p ∨ ¬p, p → (p ∨ q) are tautologies for all p and q. By the remark preceding the definition one can verify whether any given p with exactly n distinct atoms in it is a tautology by computing 2n^ numbers and checking that these numbers all come out 1. (To do this accurately by hand is already cumbersome for n = 5, but computers can handle somewhat larger n. Fortunately, other methods are often efficient for special cases.)

Remark. Note that |= p ↔ q iff t(p) = t(q) for all t : A → { 0 , 1 }. We call p equivalent to q if |= p ↔ q. Note that “equivalent to” defines an equivalence relation on Prop(A). The lemma below gives a useful list of equivalences. We leave it to the reader to verify them.

Lemma 2.1.2. For all p, q, r we have the following equivalences: (1) |= (p ∨ p) ↔ p, |= (p ∧ p) ↔ p, (2) |= (p ∨ q) ↔ (q ∨ p), |= (p ∧ q) ↔ (q ∧ p), (3) |= (p ∨ (q ∨ r)) ↔ ((p ∨ q) ∨ r), |= (p ∧ (q ∧ r)) ↔ ((p ∧ q) ∧ r), (4) |= (p ∨ (q ∧ r)) ↔ (p ∨ q) ∧ (p ∨ r), |= (p ∧ (q ∨ r)) ↔ (p ∧ q) ∨ (p ∧ r), (5) |= (p ∨ (p ∧ q)) ↔ p, |= (p ∧ (p ∨ q)) ↔ p, (6) |= (¬(p ∨ q)) ↔ (¬p ∧ ¬q), |= (¬(p ∧ q)) ↔ (¬p ∨ ¬q), (7) |= (p ∨ ¬p) ↔ >, |= (p ∧ ¬p) ↔ ⊥, (8) |= ¬¬p ↔ p.

Items (1), (2), (3), (4), (5), and (6) are often referred to as the idempotent law , commutativity, associativity, distributivity, the absorption law , and the De Morgan law , respectively. Note the left-right symmetry in (1)–(7) : the so-called duality of propositional logic. We shall return to this issue in the more algebraic setting of boolean algebras. Some notation: let (pi)i∈I be a family of propositions with finite index set I, choose a bijection k 7 → i(k) : { 1 ,... , n} → I and set ∨

i∈I

pi := pi(1) ∨ · · · ∨ pi(n),

i∈I

pi := pi(1) ∧ · · · ∧ pi(n).

If I is clear from context we just write

i pi^ and^

i pi^ instead. Of course, the notations

i∈I pi^ and^

i∈I pi^ can only be used when the particular choice of bijection of { 1 ,... , n} with I does not matter; this is usually the case, because the equivalence class of pi(1) ∨ · · · ∨ pi(n) does not depend on this choice, and the same is true for the equivalence class of pi(1) ∧ · · · ∧ pi(n).

Next we define “model of Σ” and “tautological consequence of Σ”.

Definition. Let Σ ⊆ Prop(A). By a model of Σ we mean a truth assignment t : A → { 0 , 1 } such that t(p) = 1 for all p ∈ Σ. We say that a proposition p is a tautological consequence of Σ (written Σ |= p) if t(p) = 1 for every model t of Σ. Note that |= p is the same as ∅ |= p.

Lemma 2.1.3. Let Σ ⊆ Prop(A) and p, q ∈ Prop(A). Then