CS 486: Spring 2003
Cornell University
Prof. Robert Constable
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.
Discrimination is done by the case statement for F a formula.
case is | ||
end |
For a formula, let Var be the variables occurring in , and let Form be the subformulas of .
degree = case is | ||
---|---|---|
degree | ||
degree degree | ||
degree degree | ||
degree degree | ||
end |
Smullyan defines a recursive relation `` is of degree .'' It is defined
this way where op is one of the binary connectives, and, or, and implies.
is of degree iff |
Let us also write is of degree as Degree. Then we have defined
Degree as a propositional function by (primitive) recursion on .
Another way to write the propositional function is Degree. Then we can
say:
Let be an interpretation of the variables in formula , that is,
where {true, false}.
Let value case is | ||
end |
where the (binary operator) case covers the operations
These are operations defined on in the usual way.
We can also define a (primitive) recursive predicate:
iff | & |
& & |
We can say that Value is a computable function of this type:
Smullyan does not use either of these methods exactly. He proves this theorem on page 11.
&
&
Proof by induction on . 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?
Form
Var
Form
Form
.
(IsVar
[IsVar
(IsVar
.
Let X be any formula, 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
Notice that there are no elements of Form 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 of U, there will be unique values 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.
It is easily verified by induction on the degree of X (prove Form... by induction on X)
that there exists one and only one way of assigning truth values to all subformulas of X
[ Form
] such that the atomic subformulas (variables) are assigned the same value
as
and such that
the truth value for each compound subformula Y of X
[
Form
] is determined from the truth values of the immediate subformulas
of Y by the truth table rules B1 - B4 [
& 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.