The text attempts to change the way that logic is taught to students: as a basic tool rather than "in isolation". That is, the authors are more interested in teaching the use of logic rather than the subject of logic itself. The intent is to give students skill in propositional and predicate calculus so that they are capable of employing those skills in serious applications of computer science and discrete math.
Logic is the "glue" that binds together methods of reasoning, in all domains. Traditional methods of proof (e.g., by assumption, contradiction, mutual implication, and induction) all have their basis in formal logic. Hence, where proofs are to be developed or presented, the study of logic can be helpful.
The authors hope to impart not only the "anatomy" of the glue —proof theory and model theory— but, more importantly, skill in its use. That is why they emphasize syntactic manipulation of formulas as an effective tool for discovering proofs. Syntactic manipulation cannot completely replace thinking about meaning, but there should be a balance between syntactic and semantic reasoning. Students lacking familiarity with syntactic manipulation are forced to carry out all reasoning in semantic terms, and thereby lack that balance.
One advantage of reasoning syntactically is that it forces proofs to be rigorous, in that each step of a proof must be justified by an appeal to an inference rule and/or an already-established theorem. Proofs that rely heavily upon semantics can be "hand-wavy".
The style of logic presented in the text is an equational logic based upon equality and Leibniz's rule of substitution of equals for equals. This style has these advantages:
Math is used for representing, or modeling, the world, providing a way to represent relationships that is not only concise and precise but also well-suited to manipulations that can reveal insights about the objects being modeled.
Examples:
A mundane example:
Mary had twice as many apples a John. But then she discarded half of hers, while John ate one of his. Afterwards, Mary still had exactly twice as many apples as John. How many applies did Mary and John, respectively, have initially?
Letting m and j represent the number of applies initially held, respectively, by Mary and John, this "word problem" can be modeled using two equations:
(1) m = 2j
(2) m/2 = 2(j-1)
Any pair (m,j) of natural numbers satisfying both equations could describe the number of apples initially held by Mary and John. Notice how more succinct is this mathematical model than is the word problem.
Which illustrates one of the Virtues of mathematical models:
A mathematical model may be more understandable, concise, precise, and/or rigorous than an informal natural language description.
To illustrate the benefits of rigor, consider the specification of an algorithm that computes a natural number approximation to a given integer's square root. Let n be the input variable and b the output variable (both of type integer).
A typical way of expressing a specification is via a precondition and postcondition. Here, the likely precondition would be n ≥ 0. But what about the postcondition? To say, informally, that the value of b will be an integer that is "close to" √n is too imprecise. Even to say that b will be the "best" integer approximation to √n is too vague. Formalizing the postcondition forces us to think carefully about which approximations to √n would be acceptable.
There are at least three reasonable choices:
A second important virtue of mathematical models is this:
Answers to questions about objects/phenomena can often be computed directly using a mathematical model describing them.
This virtue is illustrated by how Neptune was discovered in 1846 using models of planetary motion.
A third important virtue of mathematical models:
Math provides methods for reasoning: for manipulating expressions, proving properties from and about these expressions, and obtaining new results from known ones. This reasoning can be carried out without knowing/caring about the meaning of the symbols occurring in the expressions.
As an example, G&S show how to take e = m·c2 and use algebraic manipulations to arrive at (the equivalent, under the assumption c≠0) e/c2 = m
The point made here is that, during the manipulations, there is no need to be concerned with the meanings of the variables e, m, or c. That is, the manipulations are purely syntactic. (Well, almost, as the assumption c≠0 played a role. Is that a matter of syntax? Or of semantics?)
Here could be where a solution to the Mary/John apple word problem is derived!
Most students will be much more familiar with manipulating arithmetic expressions (involving numbers) than with manipulationg logical expressions (involving boolean values). The latter is a useful skill for programmers, and this book/course will emphasize it.
As an example, how would you make sense of this (confusing) statement about the array b[]:
Every value occurring in array segment b[1..n] that does not occur in b[i..j] does occur in b[i..j].
By the end of this course, you should be able to translate this sentence into one that makes more sense.
In science and engineering, mastery of a subject is equivalent to being able to reason about it. The relevant concept here is proof. The text discusses various methods of proof. Formal logic is the basis for these discussions.