CS 486: Spring 2001 Cornell University Prof. Robert Constable

Lecture 3: Some Notes

Summary of the Propositional Calculus

Restricted logical languages are designed to ignore some of the structure of propositions to concentrate on others. This is a common way of understanding a complex subject—abstract away some of the detail leaving a simpler part to analyze. In the case of the propositional calculus, we examine only the connections between propositions formed with the so-called logical connectives: and, or, implies, equivalence and not. Sometimes we also use constants for a proposition which has no proof, say False, and the proposition which needs no proof, True. An analogy from mathematics which explains our approach is the study of the algebra of integers in which we look at the arithmetic operations of plus, minus, times and the two constants with special algebraic properties, 0 and 1.

The heart of any mathematical abstraction is the idea of a variable used to define functions. In algebra the variables range over the integers, for instance; and they allow us to define functions denoted by polynomials. Variables are used to allow us to refer to functions in logic as well. In the case of logic, we are interested in the propositional functions built using the logical operators. These are denoted by propositional formulas which are like polynomials.

The propositional calculus is simple enough that we can settle many questions that are of interest for all logics. Based on a precise definition of logical truth (tautologies) and a precise notion of proof, we can decide whether a formula is true. If it is true, we can find a proof, and if it is not, we can find a counterexample to its truth. The fact that all true formulas are provable is called the completeness theorem. The fact that truth is decidable is called the decidability theorem. Their combination is the fundamental result about the calculus. We will prove it in great detail. This fundamental theorem is not true for many other logical calculi, and indeed there are many properties of this calculus that do not generalize. We will be most interested in the properties that are general.

Among the generally valid properties and generally useful concepts are the idea that the presentation of a logic involves syntax, semantics and proof mechanisms, that logical truth can be precisely defined, that proofs are systematic searches for counterexamples, that proofs can be presented in several styles, that the meaning of a formula is given by the methods of proving it, and that formulas can have several meanings. Study of this calculus reveals the ways in which computers can be used to build formulas, construct and check proofs and even find proofs, and transform them from one style to another. The fact that the connection between this formal logic of propositions and the informal logic of natural language is complex is another general result about logics, but not one that we will study in detail. Other courses do, especially in philosophy.

Labeled Disjoint Union

Definition l : A + r : B is the labeled disjoint union of sets or types A, B. We can think of this as the set of all pairs ⟨l, a⟩, ⟨r, b⟩ for each a ∈ A, b ∈ B. The labels are l and r.

Propositional Formulas are an Inductive Type

Form = var: Var + neg: Form + and: Form × Form + or: Form × Form + imp: Form × Form.

Discrimination is done by the case statement for F a formula.

case F is

var(v)  → exp(v)
neg(U)  → exp(U)
and(U, V) → exp(U, V)
or(U, V) → exp(U, V)
imp(U, V) → exp(U, V)

end

We examine how Smullyan uses the inductive character of the type of propositional formulas, which we write as Form. His account starts on page 8 under the heading Induction Principles, where he discusses definitions and proofs by induction.

For X a formula, let Var_{X} be the variables occurring in X, and let Form_{X} be the subformulas of X.

Definition of Degree

We can define degree as a (primitive) recursive function as follows:

degree(F) = case F is

var(v)  → 0
neg(U)  → degree(U) + 1
and(U, V) → degree(U)+ degree(V) + 1
or(U, V) → degree(U)+ degree(V) + 1
imp(U, V) → degree(U)+ degree(V) + 1

end

Degree is a computable function from Form to ℕ; we symbolize this by: degree ∈ Form → ℕ.

Smullyan defines a recursive relation “X is of degree n.” It is defined this way where op is one of the binary connectives, and, or, and implies.

X is of degree n iff

(∃ V : V ar. (F = V) ⇒ n = 0) &
(∃ U : F orm. ∃ u : ℕ. (F = ∼ U) & (U is of degree u) ⇒ n = u + 1) &
∃ U, V : F orm. ∃ u, v : ℕ.

(F = (U op V) & (U is of degree u) & (V is of degree v)) ⇒ n = u + v + 1.

Let us also write X is of degree n as Degree(X, n). Then we have defined Degree(X, n) as a propositional function by (primitive) recursion on X. Another way to write the propositional function is Degree(X)(n). Then we can say:

Degree ∈ F orm → (ℕ → P rop).

Definition of Valuation

Let v_{0} be an interpretation of the variables in formula X, that is, v_{0} ∈ V ar_{X} → 𝔹 where 𝔹 ={true, false}.

Let value(v_{0})(F) = case F is

var(v)  → v_{0}(v)
neg(U)  → not(value(v_{0})(U))
bop(U op V) → op(value(v_{0})(U), value(x_{0})(V))

end

where the bop (binary operator) case covers the operations and, or, imp. These are operations defined on 𝔹 in the usual way.

We can also define a (primitive) recursive predicate:

V alue(F, V_{0}, x) iff (∃ V : V ar.(F = V) ⇒ x = V_{0}(F)) &
∃ U : F orm. ∃ u : 𝔹.
(F = neg U & V alue(U, V_{0}, u) ⇒ x = not (u) &
∃ U, V : F orm. ∃ u, v : 𝔹.
(F = (U op V) & V alue(U, V_{0}, u) & V alue(V, V_{0}, u) ⇒ x = op (u, v)

We can say that Value is a computable function of this type: V alue ∈ F orm → (V ar → 𝔹) → (𝔹 → P rop).

Smullyan does not use either of these methods exactly. He proves this theorem on page 11.

Valuation Theorem

∀ X : F orm. ∀ v_{0} : V ar_{X} → 𝔹. ∃!f : (F orm_{X} → 𝔹).

∀ Y : F orm_{X}[atomic(Y) ⇒ f(Y) = v_{0}(Y) &
∃ U : F orm_{X}.(X =∼ U) ⇒ f(X) = not(f(U)) &
∃ U, V : F orm_{X}.(X = (U op V) ⇒ f(X) = op(f(U), f(V)))]

Proof by induction on X. Qed.

Smullyan suggests another proof in parentheses based on building a formation tree. We can prove it this way as well. Students sometimes think that the weak valuation theorem stated next captures the idea of valuations since it can be proved in such a way as to construct a valuation. It seems simpler since it does not use a recursive proposition nor does it explicitly build a recursive function; but the theorem has proofs that do not build valuations, so it does not fully describe valuations. Can you see why not?

Weak Valuation Theorem

(related to Smullyan, p. 11)

∀X :Form.∀v_{o} :Var_{X} → 𝔹.

∀Y :Form_{X} . ∃! y : 𝔹.
∀U, V : Form_{Y} . ∃!u, v : 𝔹.
(IsVar(Y) ⇒ y = v_{o}(Y)) &
[IsVar(U) ⇒ u = v_{o}(U)) &
(IsVar(V) ⇒ v = v_{o}(V)) &
Y =∼ U ⇒ y = not(u) &
Y = (U ∧ V) ⇒ y = and(u, v) &
Y = (U ∨ V) ⇒ y = or(u, v) &
Y = (U ⊃ V) ⇒ y = imp(u, v) ].

Proof

Let X be any formula, v_{o} any interpretation, and Y any subformula of X (including X itself). Proceed by induction on Y. Base: Y is a variable. Then choose y to be v_{o}(Y). Notice that there are no elements of Form_{Y} in this case. Induction case: Assume the theorem is true for all subformulas of Y, show that it is true for Y. Let U or U, V be the immediate subformulas of Y. If Y = ∼U then by the induction hypothesis there is a unique truth value u satisfying the conditions of the theorem. Take y = not(u). For any subformulas U′ of U, there will be unique values u′ in 𝔹 satisfying the formula. If Y = (U b V) for any binany connective b, then let u, v be the unique truth values of U and V respectively, and take y = b(u, v) where b(u, v) is the truth table definition of the operator b. Qed.

Smullyan p. 11 translated

It is easily verified by induction on the degree of X (prove ∀X : Form... by induction on X) that there exists one and only one way of assigning truth values to all subformulas of X [∀Y : Form_{X} . ∃! y : 𝔹] such that the atomic subformulas (variables) are assigned the same value as v_{o} [IsV ar(Y) ⇒ y = v_{o}(Y)] and such that the truth value for each compound subformula Y of X [∀U, V : Form_{Y} . ∃!u, v : 𝔹] is determined from the truth values of the immediate subformulas of Y by the truth table rules B1 – B4 [Y =∼ U ⇒ y = not(u) & Y = (U b V) ⇒ y = b(u, v)]. The flaw in this reading of Smullyan is that the phrase “there exists one and only one way of assigning truth values...” really means that there is a function. A “way of assigning” is a synonym for a function.