Now that we've
set up how to specify a formal system to produce strings given a set of production rules and symbol primitives; a formal language; we need to speak about what it means to make a system of inference out of a formal language.
People more familiar with the material will probably be trolled extremely hard by my cavalier attitude to equality and the formal status of arguments, but I hope that it provides enough of a flavour of logic to proceed from. I'm happy to receive comments/criticisms/corrections and rewrite things to be more formally valid, but only if the corrections don't sacrifice (or even improve!) the post being intuitive and introductory.
For a given formal language, we can construct the collection of all possible well formed formulae that can be produced from it. This collection of well formed formulae is the vocabulary with which we will express a system of inference on such a formal language.
For the propositional calculus, the set of well formed formulae is obtainable through the following rules:
An alphabet of propositional symbols.
An alphabet of logical connectives on those propositional symbols - this is like negation, implication, and, or, xor and so on.
(1) Every element of the alphabet of propositional symbols is a well formed formula.
(2) If
is a well formed formula, then
is a well formed formula.
(3) If
are well formed formulae, then
is a well formed formula, where
is any binary logical connective (like or or and).
is negation.
We want to augment this language with more rules of a different flavour; a more restrictive collection of ways of linking well formed formulae that embeds intuitions regarding demonstrating propositions given assumptions - deduction proper - rather than constructing new grammatically sound propositions based on old ones. We need to know more than the lexicology of a language to be able to reason using it.
To reason
formally using a language, the first step is to
formalise and stipulate the rules by which well formed formulas can be reasonably linked to others. These formalised stipulations embed intuitions about what a system of inference should be able to do.
What this entails is letting some variables range over the set of well formed formulas defined above, then stipulating linking statements between the variables using logical connectives. Stated abstractly, it isn't particularly intuitive, so I'll proceed with (some of one way of doing) the specifics for propositional calculus.
All of this is still spelling out the syntax language, so we're still discussing (1) in the previously linked post.
In an introductory symbolic logic class, you'll be introduced to a natural deduction system and asked to prove things in it. This is going to be a very abbreviated form of that.
We're going to introduce a few more rules that allow us to produce well formed formulas given other well formed formulas; except these encode
inference rather than
grammaticality, these are not an exhaustive list. Given that
and
are well formed formulae of the language of propositional calculus, we introduce some axioms to relate them
inferentially.
(some) Inference Rules:
Conjunction (how
"and/conjunction" works):
(CE1)
lets us produce
(CE2)
lets us produce
(CI) If we have
and
, this lets us produce
.
These just say that if two things can be assumed together independently, this means that we can conclude each of the things independently from assuming them together. "There are 2 apples and 3 pears on this shopping list" therefore "there are 2 apples on this shopping list" and "there are 3 pears on this shopping list". These are called conjunction elimination (CE1 and CE2) and conjunction introduction (CI).
Modus ponens (how
, "implication" works):
(MP) If we have
and we have
, then we can produce
.
This tells you that implication lets you transmit assumptions into conclusions whenever those assumptions imply those conclusions.
Now we have to introduce two symbols,
and
, which are logical constants (0th order logical connectives)... They will suspiciously resemble true and false respectively for good reason.
Disjunction (how
, "or/disjunction" works:
(DI) If we have
, we can produce
(DS) If we have
and
, then we can produce
Informally - since we've not introduced truth or falsity as notions yet - the first says that if we know something is true, we know that either that thing is true or something else is true (which might be quite silly depending on the context, but it's fine here. "1+1=2 therefore 1+1=2 or Santa exists", it's rather artificial from the perspective of reasoning in natural language. The second says that if we know at least one of two things is true, and one of those things is false, then we know the other is true.
A common feature of all these rules is that they have an "if, then" form, given a bunch of inputs, we can produce (a bunch of) outputs. They are production rules that work on well formed formulae that capture a notion of inference. If we have a bunch of inputs
, and they let us produce the conclusion
, we write
. The distinct elements of the bunch of inputs will be separated with commas (and canny readers will probably notice that comma separation before
does exactly the same thing as making a conjunction of the separate elements).
As a sample of how to use this notation, we can write out some rules involving negation:
(DNE)
(PBC)
These say "not not x lets us produce x" and "if x implies the falsehood symbol, then we can produce not x". Rephrasing them (informally at this point) in terms of truth and falsity. If we know that not X is false, then X is true; this is double negation elimination (DNE). The second one says that if x implies a falsehood, we can conclude that x is false, this is proof by contradiction.
Some curious features of the formalism are that we don't need to stipulate
anything at all to derive (anything which is equal to)
, IE
(this is writing that there's no premises to the argument, and that the system derives the conclusion with no stipulations). And that if we start with (anything which is equal to)
we can derive anything -
. Any statement which is provable from no assumptions is called a tautology (it is equivalent to
in some sense). The latter is called the principle of explosion.
Two examples of a proofs (using the stated axioms):
We want to show that
.
(1) Assume
.
(2)
(DI)
(3)
(DS).
We want to show that
:
(1)
(CE1)
(2)
(CE2)
(3)
(using
and MP)
(4)
(using
and MP)
(5)
(3,4, CI).
A canny and sufficiently pedantic reader will have noticed that in each of these proofs I've made assumptions, then used those assumptions to derive conclusions. This is called a conditional proof. But if we're being extremely pedantic about the foundations, even that can't be taken for granted (it either has to be some assumption of the system itself or provable from/about the system).
Formally, this looks like:
(CP) If we have that
, then this means
.
or
implies
.
This is called the deduction theorem, it's what's lets you link the ability to produce a well formed formula using the inference rules to the overall ability of the system to produce that well formed formula as a conclusion.
At this point, notice that there are four things kicking about in the discussion that look a lot like entailment:
(1) The rules that produce well formed formulae from other well formed formulae.
(2) The implication symbol internal to the formal language
(3) The statement that the rules that produce an inference from a set of assumptions
(4) Some further sense of entailment that lets us say
implies
, the middle "implies"; this is some 'meta theoretical' entailment, as it's entailment
about the formal language under consideration.
All of these are
formally distinct entities! They aren't the same thing and don't mean the same thing. But when reasoning about mathematical structures, so long as the context is sufficiently clear, we don't need to keep track of all the distinctions; when reasoning about objects that are sufficiently far removed from what spelling out
reasoning even means, we don't have to pay so much attention to all the internal distinctions between entailment types.
But for now we do.