Navaz Alani
Spring 2020
Introduciton
What is logic? For Aristotle, logic was the instrument by means of which we come to know anything. Aristotelian logic formalizes basic principles of good reasoning and provides a way to evaluate specific cases of reasoning.
A syllogism is a kind of logical argument in whcih one proposition (the conclusion) is inferred from two or more others (the premises) of a specific form. Here is an example of an Aristotelian syllogism:
These are the premises:
- All humans are mortal
- Socrates is a human
Here is the inference/conclusion
Socrates is mortal
This is an example of a good reasoning/argument because it is truth perserving i.e. if the premises 1 and 2 are true
, then the conclusion must also be true
. The correctness of the argument depends purely upon its form, not content. The form can be viewed as the high-level structure of the argument.
Another one of the Aristotelian syllogisms:
- All Accords are Hondas
- All Hondas are Japanese
All Accords are Japanese
As you can see, the high-level structure of this argument is the same, which is why it holds as long as the propositions are true
. The general form of these hypothetical syllogisms is:
- All are
- All are
All are
This is an example of a good argument. What about this one?
- All are
- Some are
Some are
This is actually a bad argument. It is not truth preserving in that the 2 initial premises could be true
but the conclusion may not necessarily. Try find a case under which this argument does not hold i.e. find two premises which are both true
but the resulting conclusion is not.
Significance of Logic (in CS)
- In the heart of all electronic computers, there are logic gates. Digital circuits are formed of logic gates. The study of logic can help minimize the number of components in electronic circuits. * AI- in specific, expert systems which are essentially formed of an inference engine running on a knowledge base. An example is DENDRAL (by Stanford University in the 1960s) which was an expert system to aid the identification of unknown organic molecules.
- Automated theorem proving/automated proof verifiers
- Databases- the core of modern database systems (e.g. SQL) uses first order logic.
- Programming- program specification, formal verification
- DNA computing
- Synthetic biology
Propositional Logic
- In this context, we define logic to be the analysis and appraisal of arguments.
- An argument is a set of statements, namely one or several premises and a and a conclusion, usually connected by a "therefore". You can see that this definition is made with respect to the high-level structure of an argument. Consider the following argument:
- No pure water is burnable
- Some Cuyahoga river water is burnable
Some Cuyahoga river water is not pure
This is a valid argument, which is one in which whenever the premises are true
, the conclusion is also true. Convince yourself that this argument holds.
- Logic essentially studies the "forms" of reasoning (the high-level structure). As mentioned before, the content of the arguments may deal with anything.
- Learning logic is learning the tools of reasoning applicable to any discipline.
Have a look at this argument:
- No pure water is burnable
- Some Cuyahoga river water is not burnable
Some Cuyahoga river water is pure
This argument is invalid (incorrect/unsound). There could be a case where the whole river is polluted by non-burnable pollutant- it works under the assumption that all unburnable water is pure. Here is another one:
- If demand rises, companies expand
- If companies expand, companies hire more workers
If demand rises, companies hire more workers.
NOTE: One may argue against the conclusion but as soon as the premises are accepted to be true
, the conclusion must also be true
. In such cases, the conclusion is said to logically follow from the premises, or that the argument is valid (correct/sound).
Another argument:
- This computer program has a bug or the input is erroneous
- The input is not erroneous
This computer program has a bug
Compoud statements consist of several parts, each of which is a statement
in its own right.
- "Demand rises" and "companies expand" are connected by
if ..., then ...
- "This computer program has a bug" and "input is erroneous" are connected by
... or ...
Some Important Logical Arguments
To analyze arguments for correctness we abbreviate the essential statements by
substituting letters and so on.
- may represent "demand rises"
- may represent "companies expand"
- may represent "companies hire"
The argument then becomes:
- If , then
- If , then
If , then
This kind of argument is called a hypothetical syllogism and it is a valid
argument (it is truth preserving/the reasoning is sound).
The "computer bug" example has this high-level structure:
- or
This kind of argument is called a disjunctive syllogism. The word disjunction
and its derivatives refer to something to do with the connector or
.
Here's another argument which is called modus ponens.
- If , then
Concretizing Propositional Logic
Definition A statement that is either true
or false
is called a
proposition. From the previous series of analysis:
- are called propositional variables
- True (T) and False (F) (or 0 or 1 respectively) are called
propositional constants - Any propositional variable can be assigned to the value 0 or 1
- Propositional variables are atomic propositions i.e. they annot be further
subdivided - Compound statements are obtained by combining several atomic propositions.
- The function of the structures
... or ...
,... and ...
,not ...
,
if..., then ...
is to combine propositions and are therefore called
logical connectives
Statements formulated in natural language are frequently ambiguous because
the words can have more than one meaning. We want to avoid this so we introduce
new mathematical symbols to take the role of connectives.
Conventions: Stating a proposition in English rightarrow that it is True.
"It is true that cats eat fish" = "cats eat fish"
Similarly, if is a proposition, then "" means " is True" or " holds".
This should justify the syntax used in the arguments above.
NEGATION (Definition) Let be a proposition. The compound proposition
, pronounced as "not " is the proposition that is True when is
False and that is False when is True.
- is called the logical negation
- The connective can be translated into English as
it is not the case that ...
or simply
Here is the truth table for negation:
() | |
---|---|
0 | 1 |
1 | 0 |
CONJUNCTION: (Definition) Let and be two propositions, then
is True if and only if both and are True.
- is called the logical conjunction of and
- The connective is pronounded "and" and may be translated to the English
word "and"
Truth table for conjunction:
() | ||
---|---|---|
1 | 1 | 1 |
1 | 0 | 0 |
0 | 1 | 0 |
0 | 0 | 0 |
Obeservations:
- In English, we usually take shortcuts that are not allowed in logic statements.
"He eats and drinks" really means "he eats and he drinks". - In logic, every statement must have its own subject and its own predicate.
Taking "He eats" and "he drinks", our sentence becomes - Sometime, we use words other than "and" to denote a conjunction: "but", "in
addition to" and "moreover" - Not all instances of "and" are for conjunction: "Jack and Jill are cousins".
In this case "and" is not a conjunction at all.
DISJUNCTION: (Definition) Let and be propositions. Then,
is False if and only if both and are True. If , or both are True,
then is True.
- is the logical (inclusive) disjunction of and .
- The connective is pronounced as "or" and can be translated to English
by "or".
Truth table for (inclusive) disjunction:
() | ||
---|---|---|
1 | 1 | 1 |
1 | 0 | 1 |
0 | 1 | 1 |
0 | 0 | 0 |
Observations:
The English "or" can have 2 meanings:
- "Exclusive or". "You can have either soup or salad" means you can have
"soup" or "salad", but not both. - "Inclusive or". "The computer program has a bug or the input is erroneous".
The computer program could have a bug, the input could be erroneous, or both.
Note: When performing a disjunction of two sentences, make sure that the
sentences are complete: each should have its own subject and predicate.
The predicate is the part of a sentence which contains the verb and states
something about the subject. This helps avoid any ambiguity.
"There was an error on line 15 or 16" must first be expanded to "There was an
error on line 15 or there was an error on line 16". This helps make sure that
the propositions are valid.
IMPLICATION: (Definition) Let and be two prepositions. Then
is False if is True and is False and is
True otherwise.
- is called the logical implication of and
- may be translated to English using
if ..., then ...
to
"it is not the case that is True and is False". - is called the antecedent
- is called the consequent
Truth table for implication:
() | ||
---|---|---|
1 | 1 | 1 |
1 | 0 | 0 |
0 | 1 | 1 |
0 | 0 | 1 |
Observations:
- If is False, then is vacuously True since in such a case, the
verification of does not require anything to deduce from .
More formally, vacuous truth is when an implication is true, only because
its antecedent cannot be satisfied.
The following are logically equivalent:
- If , then
- Whevener , then
- is sufficient for
- only if
- implies
- if
- whenever
- is necessary for
- is implied by
EQUIVALENCE: (Definition) Let and be propositions. Then
is True whenever and have the same truth values.
- is called the logical equivalence/biconditional of and
- It is pronounced " if and only if ". Usually, "if and only if" is
abbreviated as "iff".
() | ||
---|---|---|
1 | 1 | 1 |
1 | 0 | 0 |
0 | 1 | 0 |
0 | 0 | 1 |
Sorting out Equivalence and Implication: There is a difference and it is not
always clear which connective is intended in English. Have a look:
"Eating hanburgers at a fast food restaurant is equivalent to aiding the
destruction of the world's rainforests"
This looks like an equivalence, but if you swapped the two propositions,
clearly something is wrong. The intended meaning could have been:
"If one eats hamburgers at a fast food restaurant, then one is aiding the
destruction of the world's rainforests"
Remarks on Logical Operators
- is the only unary connective i.e. it acts on one proposition
- All other connectives are binary i.e. acting on two propositions
- are symmetric. The order of propositions does not matter.
is an equivalent statement to . - is not symmetric. and have different
truth values.
Ambiguity and Imprecision
Logic helps clarify the meaning of descriptions e.g. in English. After all, we
even use it to state, precisely, the requirements of computer systems. Natural
language definitions can be ambiguous or imprecise. What's the difference?
- Ambiguity is when a sentence has more than one meaning.
Take a look at this sentence: "David and John from Toronto are coming for a
visit". Well, who is from Toronto? David, John or both? More information is
needed. This statement is ambiguous. Another one: "I know a much funnier man
than Bill". Could it mean "I know a much funnier man than Bill does" or "I know
a much funnier man than Bill is"- it is ambiguous.
Ambiguity is dealt with by querying the author of the sentence or by examining
context.
- Imprecision (Vagueness) is when a sentence has only one meaning but as a
proposition, the distinction between circumstances where under which it is True
and circumstances under which it is False are not clearly defined.
Take a look at this sentence: "John is tall". But what exactly does this mean?
A more precise sentence could be "John is 2 meters tall". Another one: "This
computer is fast" can be made more precise: "This computer can execute 2
million instructions per second".
Imprecise sentences, caused by qualitative descriptions, can be made precise
by introducing quantitative measures.
Propositional Language
Here's the general idea behind the formal propositional language.
- Using connectives, one can combine propositions (atomic or compound)
- Ambiguity is prevented through fully parenthezised formulae which are parsed
uniquely - When possible, parentheses are dropped in favor of precedence rules
We shall construct the , which is the formal language of propositional
logic. We start off by defining the syntax of in which terminology is
introduced. Then, formulas in are discussed. Equipped with these two,
we work on some proofs in order to demonstrate the uniqueness of the
language.
Language Specifications
is the formal language of propositional logic and it is composed of the
following symbols:
- Propositional variables: (with or without subscripts) represent
propositions, as previously discussed - Logical Connectives: as previously
discussed
The following are laguage specifications, with introduction of terminology:
- Expressions: finite length strings of symbols in . All of
are expressions in the language. - The Length of an expression is defined to be the number of symbols in it
- An empty expression is one which has length 0. It is denoted by
, and is not to be mistaken with the empty set, .
- An empty expression is one which has length 0. It is denoted by
- Two expressions and are equal iff they are of the same length and
have the same symbols in the same order. - Expressions are scanned from left to right, like reading English.
- Concatenation of two expressions and (in that order) is denoted
by . Note that . - If where are expressions, then we define
- is a segment of
- A proper segement of is defined to be the case when and
is non-empty
- If , where are expressions, then we define
- to be an initial segement (prefix) of
- to be an terminal segement (suffix) of
Syntax: Well-formed Formulae
Definition: An atom (atomic formula) is an expression consisting of a
prepositional variable only. The set of atomic formulae in is denoted by
.
Definition: An expression in is called a formula (a well-formed
propositional formula) iff it can be constructed according to the following
rules of formation:
- Every atomic formula is a formula
- If is an atomic formula, then so it
- If are formulae, then so are
the set of all formulae in is denoted by . It is the smallest
class of expressions of that contains and is closed under the
formation rules of formulae.
Example: Generating formulae.
Let be an element in
and are elements in . How is generated from
the rules of formation?
By rule 1, the atomic propositional variables are themselves formulae.
With these propositional variables, one can form the formulae ,
, using rule 3. Another formula, can be formed
by rule 2 applied to . Then, can be formed by rule 3.
Finally, can be formed using rule 3 yet again.
As you can see, a formula in can be built from the bottom up, using the
rules of formation.
Example: Parsing formulae
Take the following complex sentence in the English language
"If Michelle wins at the olympics, everyone will admire her and she will get
rich, but if she does not win, all her effort was in vain."
To translate this sentence to the language of propositional logic, we first
isolate the atomic propositions in the sentence (notice how each proposition
is sure to have a subject and an action):
- Michelle wins at the Olympics
- Everyone admires Michelle
- Michelle will get rich
- Michelle's effort was in vain
Then, the compound sentence (compound proposition) above can be expressed as
follows:
Parse Trees: A parse tree can be used to analyse formulae too. Have a look
at the parse tree of (Forgive my directory
structure rendering of a parse tree).
Question: Can a formula be of two (or more) kinds?
For example, can a formula be both a conjunction and an implication?
This is important when it comes to understanding the place for ambiguity in
.
Here are some claims about that we intend to prove, we shall refer to
them as .
- Every formula in has the same number of occurences of left and right
parentheses. - Any proper initial segment of a formula in has more occurrences of left
than right parentheses. Any proper terminal segment of a formula in
has fewer occurrences of left compared to right parentheses. - Neither a proper initial segment/proper terminal segment can be a formula in
.
are all claims which help one prove an even greater claim- the one
which we are interested in.
Unique Readability Theorem Every formula in is exactly one of the
six forms: an atom, , , ,
and , and it is so in exactly one way.
This theorem obliterates questions about ambiguity of formulae in .
But how can we prove such claims? Let us get some guidance from
mathematical induction. But first, a review of the natural numbers.
Natural Numbers
The natural numbers are the set of numbers that we use to count, namely
0, 1, 2, 3, 4 and so on. These numbers form an unbounded sequence. They
include 0 because it is the number with which a count actually starts- one
starts counting at 0 and increases it with each object/entity counted.
Suppose names a property. We write '' to mean that that '2 has the
property ' or ' holds for 2'.
A statement 'Every natural number has property ' actually corresponds to
a set of statements: .
Mathematical Induction
Here is the essential principle of mathematical induction. Suppose that we
establish two things:
- the natural number has property (BASIS)
- when a natural number has property , the next natural number also has
property (INDUCTIVE STEP)
We may conclude that every natural number greater than or equal to
has property .
Why does this work? Well, one needs to understand the definition of natural
numbers. The natural numbers are defined recursively (in a self-referential
manner). At a high level: let the -th natural number be denoted by .
Define (let the first natural number be 0), and then for ,
we define (define every natural number after the first to
be 1 plus the previous natural number). Now of course, no one would take this
definition seriously as the natural numbers are used to define themselves- the
actual definition of the natural numbers involves sets and an idea similar to
the one presented above.
So, if the first natural number has a property , and for any number that has
the property , the next number has property too, here's what happens.
Since holds for 0, it starts a domino effect- the next one, 1, also has
property , and therefore 2 has property and so on...
Takeaways: Here's what we can take away from the above insight into
natural numbers and mathematical induction.
- To talk about something, give it a name e.g. a property , a number
- A formula is a textual object. In this object, we can substitute one symbol
or expression for another. - The induction principle describes a method for proof consisting of two parts
- The basis and inductive steps
- In the inductive step, hypothesize (this is called the
inductive hypothesis) and prove using it.
NOTE: The process of induction does not specify how to use the inductive
hypothesis to prove the next case, or how to prove the basis. In each problem,
these steps will be different.
Induction for
Suppose one wants to prove that every formula in property . Well, it
turns out that we cannot use induction above because a formula is not a natural
number. However, we can manipulate the situation to approach the proof
using an induction based solution. We can choose to prove any of the following:
- For all natural numbers , every formula with or fewer symbols in it has
property . - For all natural numbers , every formula with or fewer connectives has
property . - For all natural numbers , every formula whose parse tree has height or
less has property . - For all natural numbers , every formula reproducible with or less
applications of the formation rules has property .
Note that the inductive step for each of these would require showing, by cases,
that if and , then and (where
is one of ). Formulae have smaller
values than and .
We concoct a principle of induction which can be used in this case:
Structural Induction
The Principle of Structural Induction says: Suppose is a property. If:
- For any atomic formula in , holds for
- For any formula in , if , then has property
too - For all formulae in , if and , then
(where is one of ) has
property too.
then, any formula in has property .
Here is an example of structural induction in action. Suppose we want to prove
the following lemma, which is the first of the claims in .
Lemma: Every well-formed formula has an equal number of left and right
parentheses.
Proof: Before starting, for convenience, we define: for all formulae
in , is the number of left parentheses in and is
the number of right parentheses in .
Also, let the property being proven be called property .
Base Case: If is an atom, then it has no parentheses. Therefore,
and so . The base case holds.
Inductive Step: In this step, we shall consider three formulae and ,
for which it the inductive hypothesis that R holds for and is
assumed.
-
Assume is of the form . By the inductive hypothesis, .
Therefore: -
Assume is of the form . By the inductive hypothesis,
and . Therefore:
Therefore, property holds for all well-formed formulae in .
We can now move on and use the tool of structural induction as the proof method
for the unique readability theorem. Before proceeding, a small discussion to
build some intuition about the the proof...
Let us try to see what happens when trying to interpret a well-formed formula
in as something that it is not. Consider the implication
. We want to show that this is an implication and
not a conjunction. Let's do both to see where parsing the formula as a
conjunction fails.
If we parse the formula in as an implication, it would look something like:
let and , then , where and are
well-formed formulae in (one can check by following the rules of
formation until the formula has been constructed from the atoms ).
Now, if we try to parse the formula as a conjunction, here is what it would
look like: let and , and . However,
this is not a valid parse since and are not valid formulae (by the
lemma just proven above about equal number of left and right parentheses in a
well-formed formula in . They also fail to be constructible from the rules
of formation).
What does this show us? We managed to prove that cannot be parsed as a
conjunction because upon decomposition, one does not end up with two
well-formed formulae as specified by . But can we be sure that this holds
all the time?
Unique Readability Theorem
Now, let us approach the unique readability theorem by rephrasing it as a
property which is stated below. Note that the notation and
for the number of left and right parentheses in expression will continue to
be used.
Property :
Every formula, , containing at most connectives satisifies all of the
following conditions:
- The first symbol of is either a '(' (right parenthesis) or a
propositional variable - A has an equal number of right and left parentheses and every
proper initial segment of has more left parentheses than right. - A has a unique construction as a formula.
Where a proper initial segement is defined to be a non-empty expression
such that is for some non-empty expression .
Proof: (Using structural induction, of course)
Base case: The base case is , which is a formula with no logical
connectives. This has to be a propositional variable, so condition 1 is
satisfied. Secondly, a propositional variable has no parentheses so the first
part of condition 2 is satisfied. Since , in this case has no proper initial
segments, the second part of condition 2 is vacuously satisfied.
Inductive step: (This is going to be a bit longer...) The inductive
hypothesis is that the property holds for some ,
meaning that it holds for formulae with at most logical connectives.
We now need to prove, using this hypothesis, that holds for .
So let be a formula with logical connectives.
Unary connective: If is of the form for some formula ,
which has connectives and therefore satisfies conditions 1, 2 and 3, by the
inductive hypothesis.
- Clearly, the first symbol of is a '(', so condition 1 is fulfilled.
- Since satisfies condition 1, has an equal number of left
and right parentheses too- satisfies the first half of the second
condition. Now to prove the second half, we analyse the possible proper
initial segments, , of :- If is "", then
- If is "", then
- If is "", where is some proper initial segment of ,
since satisfies condition 2, we have that but
and which means that . - If is "", then since , we have that
.
Together, these cases show that satisfies condition 2.
- Since has a unique construction as a formula, so does - It is the
negation of the uniquely constructued formula .
Binary Connectives: If is of the form where
represents a logical binary connective and are formulae with at most
connectives, property holds for them.
To prevent repetition, it is simply stated that the proof of the conditons 1
and 2 is very similar to the ones done for the proof in the unary connecive
case. What remains is to prove the 3rd condition- let's do it!
To prove the unique construction of , we shall prove that if can be
decomposed as for some binary connective and formulae
, then it must be the case that and .
For clarity, we mean that the two decompositions,
and , are of the same formula (same length and
sequence of symbols in the same order).
-
Case 1: If has the same length as , they must be the exact same
string of symbols as they both begin at the second character of . -
Case 2: If is a proper prefix of (i.e. has length less than
the length of ). Now, since and are both formulae with at most
connectives, the inductive hypothesis holds for them.But this would mean that by condition 2, has the same number of left and
right parentheses. However, by the same condition applied to , we see that
any proper prefix of (namely ) must have fewer left than right
parentheses. So assuming that is a proper suffix of clearly
contradicts itself and therefore must be false. -
Case 3: Proven same as case 2 above.
Since case 2 and 3 contradict themselves, the only valid case is case 1, which
rightarrow that (and also ). Therefore, the two decompositions of
are the exact same and this shows that is uniquely constructed.
Fun fact: In mathematical proofs, the black square () indicates
the end of a proof. It is used in the same manner here.
This proof proved the unique readability theorem (condition 3), but conditions
1 and 2 were required to prove it.
Consequences
Equipped with the a proven unique readability theorem, we can claim the
following now:
A propositional variable is called an atom
is called a negation formula
is called a conjunction formula
is called a disjunction formula
is called a implication formula
is called an equivalence formula
... and each is exactly of one kind.
This is important, as stated before, because the meaning of these formulae is
going to be derived from their syntax, so this ensures unambiguity.
Connective Precedence
For human beings, the following precedence rules are established:
- takes precedence over
- takes precedence over
- takes precedence over
- takes precedence over
This allows some parentheses to be elided without loss of meaning or ambiguity:
can be expanded, using these precedence rules, to be
.
Scope
- If is of the form , then we say that is the
scope of negation in . - If is of the form (where is a binary logical
connective), then we say that is the left scope of the connective
(disjunction, conjunction, ...) in and is the right scope of the
connective in .
Semantics
So far, the syntax of the propositional language has been covered through the
structure of well-formed formulae in . Now, we want to be able to analyse
the meaning of a syntactically valid/well-formed formula. This is done through
the specifications of semantics (grammar) for propositional language.
Syntax cared about when a formula was valid/invalid. Now, we care about when a
formula is true. We shall develop methods which will allow analysis of formulae
to determine truths, validity of arguments and so on. Let's begin.
The meaning of a formula is defined to be its truth value, which is computed
from the truth values of its constitient atomic formulae/propositions. This
means that one has to first parse the formula into its atoms. Let's look at an
example. Take the following compound sentence: "If you take a class in computer
science and if you do not understand the concept of recursion, you will not
pass". The question is- when exactly is this statement true?
To begin the analysis, we decompose the statement into its atomic propositions.
- "You take a class in computer science"
- "You understand the concept of recursion"
- "You will pass"
Using these atoms, the statement can be expressed as a formula in as
(note how the rule for precedence of
negation over conjunction and implication applies in this formula). Now, let us
see how this statement evaluates for all possible truth value combinations of
. Each sub-formula, by the unique readablility theorem, is of one form
only. This form is with respect to some logical operator and the truth table
for that operator is used to evaluate the sub-formula with the sub-formula
already evaluated. As you can see, this is a bottom-up process- starting with
the atomic formulae and building up, through the sub-formulae, all the way to
the compound formula in question.
1 | 1 | 1 | 0 | 0 | 0 | 1 |
1 | 1 | 0 | 0 | 0 | 1 | 1 |
1 | 0 | 1 | 1 | 1 | 0 | 0 |
1 | 0 | 0 | 1 | 1 | 1 | 1 |
0 | 1 | 1 | 0 | 0 | 0 | 1 |
0 | 1 | 0 | 0 | 0 | 1 | 1 |
0 | 0 | 1 | 1 | 0 | 0 | 1 |
0 | 0 | 0 | 1 | 0 | 1 | 1 |
Clearly, the only way that this formula can evaluate to false is when
have truth values of respectively i.e. when "You take a class in
computer science and you do not understand the concept of recuresion but you
pass".
We can now generalise what we just did through truth valuations.
Truth Valuations
A truth table is a list of the valiues that a formula takes under all
possible truth valuations. Fix a set . We decide to interpret 0 as
false and 1 as true.
Let be a formula and be the set of propositional
variables that are contained in .
A truth valuation, , is a function from a set of propositional variables
to the set . The action of the valuation on
the formula is denoted as . More formally, is a function
.
It is important to realise that a truth table is a collection of truth
valuations, each for a possible combination of the truth values for the
constituent propositional variables.
In the truth table above, the first three columns specify the truth
values for the propositional variables. If there are propositional
variables, there will be rows in the truth table (convince yourself).
The next few columns are intermediate steps to the final column, which is
the value of the truth valuation, evaluated at the truth values for the
propositional variables on that row.
The beauty of the framework that we have created to do logic within is that
it is compatible with recursion- which is essentially when a definition is
self-referential. This will be useful when defining what a truth valuation for
a general formula in is (hint: compare the idea of recursion to the
process performed in the truth table above- the definition of a truth valuation
is essentially that process).
Definition: Fix a truth valuation . The
value of the formula in under the truth valuation is
denoted by and is defined recursively as follows:
- is given by the definition of , for every propositional variable,
.
Suppose is and is a truth valuation under
which . We follow the precedence rules to work with this
unparenthesized formula: and , therefore
. Another truth valuation, could be such that and
. Then and
so that . This shows that different truth valuations can lead to
different truth values for the subformulae and the formula at large.
Note: We now know how to form propositional formulae from everyday compound
sentences and evaluate them under specific truth values of the constituent
atoms/propositional variables. Now, we proceed to analyse entities larger than
sentences- arguments. We shall see how to relate a collection of
propositional formulae (premises) to another propositional formula (the
conclusion), similar to the discussions at the beginning of this document.
What we do now is to make some definitions which will allow us to analyse
arguments in this framework we have studied.
Definition: We say that a truth valuation satisfies a formula
in iff .
The Greek letter is used to denote an arbitrary set of formulae.
Define:
Definition: A set of formulae is said to be
satisfiable iff there exists a truth valuation such that .
When this happens, one says that is satisfied under .
- Observe that if , then all formulae in must evaluate
to be true under the truth valuation . - If however, , then at least one formula in must
evaluate to be false under the truth valuation . This is important to
understand because it is easily misunderstood that means that
every formula in evaluates to be false under the truth valuation
- this is not true!
Example: We explore satisfiability through the example of a 4x4 Sudoku game
analysis. In 4x4 Sudoku, each number must appear once in each row,
once in each column and oncee in each 2x2 block in the partitioned 4x4 grid.
Before we write any formulae, we setup our propositional variables. Let
be the proposition that "the cell in the -th row, -th column
contains a ", where of course.
To verify that a sudoku game is winnable, we need to verify that the game's
rules can be satisfied. So, given a 4x4 Sudoku grid with starting values
, in positions (format
).
Let's start off with a set containing all of the
formulae (representing conditions of the game) that have to be satisfied in
order to win. We shall populate it with conditions now:
-
To verify that a solution for the given grid is indeed for that given grid,
one can start by verifying that the starting values match. This can be done
by satisfying each formula in
.
We can now add each formula in to above. -
Next, to ensure that there is at most one digit per position in the grid,
we can do the following. For each position and each pair of non-equal
possible values , we add the formula
to the set . -
Next, to verify that each digit appears once in each row. First, we can check
that for each row, each digit appears at least once. This can be done by
adding the formula
for
both ranging over .Now, to make sure that each number appears once in each row, we look at every
pair of cells and in each row and add the following formula
for all values of . -
To verify that the columns are properly filled, the same process as the rows
is performed, with the necessary index changes. -
The same goes for verifying that the 2x2 boxes in the 4x4 grid are also
properly filled- also with the indexing changes required.
Once all of this has been done, contains all of the formulae which all
have to be true in order for the Sudoku grid to be considered solved. This
condition can be checked by forming one large formula by taking the conjunction
of each of the formulae in .
Definition: A formula is a tautology iff it is true under all
possible truth valuations .
Definition: A formula is a contradiction iff it is false under all
possible truth valuations .
Definition: A formula that is neither a tautology nor a contradiction is
said to be contingent.
Example This is an important tautology that we have all dealt with in real
life: the law of the excluded middle ("tertium non datur") states that
is a tautology. Let us check this by drawing out the truth
table and verifying that it evaluates to be true under all possible truth
values:
1 | 0 | 1 |
0 | 1 | 1 |
Now, you may be thinking of why this is important. Well, tautologies can be
considered to be a method of generating statements that are always true (a way
of bootstrapping towards truth, if you may...). For example, take the formula
, which is clearly contingent. However, using the tautology
, one can be sure that the formula obtained by replacing
all instances of in the tautology with , namely
is also a tautology:
We formalise and generalise this...
Theorem: Let be a tautology and let be the
propositional variables of . Suppose that are arbitrary
fomulae, then the formula obtained by replacing by , by ,
..., by is a tautology.
Example This is an important contradiction, which presumably, we have all
encountered in one way or another. It is law of contradiction which says
that "Nothing can both be, and not be" i.e. . Again, we check
the truth table for this formula to ensure that it evaluates to false under all
possible truth values.
1 | 0 | 0 |
0 | 1 | 0 |
Note: Some eagle-eyed readers must have noticed the inherent connection
between tautologies and contradictions- you cannot have one without the other.
is a tautology iff is a contradiction. Can you see why?
These can be summarized through Plato's three essential laws of thought:
- Law of identity: "Whatever is, is".
- Law of contradiction: "Noting can both be, and not be".
- Law of excluded middle: "Everything must either be or not be".
Argument Validity
As stated in the beginning of this document, the idea is to only analyse the
structure of an argument. That is why propositional language is being used- to
abstract out the content of an argument and narrow focus to the structure. A
typical argument states a series of propositions (called the premises) and
using those premises, states a final proposition (called the conclusion).
If the argument is correct (valid, sound), the the conclusion is guaranteed to
be correct provided that the content of the premises is correct. We formalize
these ideas now.
Definition Let and . is
said to be a tautological consequence of the formulae in iff for
any truth valuation , we have that implies that . When
this is the case, it is denoted as .
Note the following:
- "" is NOT a valid symbol in (as per the specifications above)
and so is not a formula. Instead, it is a statement made
about and . - When it is not the case that , this is denoted as
. - When , we say that the formulae in
(tauto)logically imply the formula or that
semantically entails .
Special Case: What if ? By the definitions we
just made, if , then for every valuation , if
then . Now, means that for every
formula in , . But since there are no formulae in ,
is vacuously true. As a result, is a
tautology.
Arguing intuitively, means that the truth of the formule in
is enough for to be true. But since has no formulae,
the antecedent of the condition is false and so the truth value of is
unconditional, therefore it is a tautology,
Argument Validity and Satisfiability
Let be a set of formulae (premises)
and let be a formula (conclusion). The following are equivalent:
- The argument with premises and conclusion is valid
- is a tautology
- is a contradiction
- is not satisfiable
- The set is not satisfiable
- is a tautological consequence of i.e.
Note: Here are some key points that one ought to remeber about validity:
Consider and argument comprised of the premises
and conclusion .
- A valid/sound argument does not guarantee the truth value of the conclusion.
As mentioned before, there is another requirement for the conclusion to be
true the truth of all the premises. Formally, the conclusion is true iff- The argument with premises and conclusion is
valid and - The premises are all true
- The argument with premises and conclusion is
- TLDR: a valid argument (sound reasoning) only guarantees the truth of a
conclusion if the argument is based on true premises (assumptions).
Definition: For two formulae , the notation
is used to denote that and .
and are said to be tautologically equivalent (or just equivalent)
iff holds.
Formulae that are tautologically equivalent have the property that they are
assigned the same truth values under any truth valuation.
Notes:
- "(Tauto)logically implies" is different from the meaning of
the implication . By its definition, iff
is a tautology. - "(Tauto)logically equivalent" () is different from the
meaning of the equivalence . By its definition,
iff is a tautology.
Validity Proofs with Truth Tables
One way to verify the statement (prove the validity of the
argument with premises and conclusion ), it is sufficient to show
that all truth valuations which satisfy also satisfy (note
that there can exist truth valuations which satisfy but not and
this is fine).
Here's an example showing that
using a truth table.
Letting and be the premises:
ROW # | |||||||
---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
2 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |
3 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
4 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
5 | 0 | 1 | 1 | 1 | 1 | 1 | 1 |
6 | 0 | 1 | 0 | 1 | 0 | 0 | 1 |
7 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
8 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
The truth valuations represented by rows 1,5,7,8 are the ones under which the
premises evaluate to be true. What is important is what when the premises are
true, the conclusion is also true. This shows that
.
Therefore, the argument
Conclusion:
is a valid argument. Try it- let be any propositions for which the
premises above are true- the conclusion will also be true.
Now, to prove that an argument is NOT valid, one has to repeat the same truth
table drawing as above for that argument, and find at least one truth valuation
under under which the premises are satisfied, but not the conclusion. That is
enough to prove the invalidity of the argument.
There's a problem with this method of validating arguments though. For a
formula with variables and connectives, the truth table has rows
and at most columns. This gets out of hand quickly when the number of
variables is larger.
Validity without Truth Tables
In this case, we can be smart and use the following proof methods.
Proof by Contradiction: Remember in logic, a contradiction is a statement
which is never true. In this context, the word contradiction is used
differently. The proof method works by assuming the opposite of what is being
proven and showing the absurdity of that.
Say, again, that we want to show that
.
Proof by contradiction: Assume the opposite-
.
This means that there exists a truth valuation under which the premises are
true but not the conclusion i.e. there exists a truth valuation such that:
Here's what one can deduce from this: by the 3rd line, we it must be that
and . But if , this must mean that by the 1st
line. But if , this means that to satisfy the 2nd line.
Wait what? By the third line, but by the 2nd line, , which
shows that this is an absurd situation. For it to be true, would need to
both be and not be 1- which is never true. Therefore, the assumption that we
made at the beginning, that
is false.
As a result, is true,
proving that the argument is valid.
Proof by Counterexample: This method works by constructing a truth
valuation under which the premises are true, but the conclusion is false.
Suppose we want to show that
.
Proof by counterexample: By any method you can think of, construct a
counterexample such as the truth valuation under which ,
and . Under this:
- Premise 1:
- Premise 2:
- Premise 3:
- Conclusion:
So we have a counterexample- the truth valuation . Therefore, this argument
is not valid.
There are smarter ways however...
Important Tautological Equivalences
Consider the following statements:
- "He is either not informed or he is not honest"
- "It is not true that he is informed and honest"
These two statements seem to be logically equivalent. Let's prove this.
Let "he is honest" and "he is informed". The first statement
translates to and the second one to
.
We have De Morgan's Law:
1 | 1 | 0 | 0 | 1 | 0 | 0 |
1 | 0 | 0 | 1 | 0 | 1 | 1 |
0 | 1 | 1 | 0 | 0 | 1 | 1 |
0 | 0 | 1 | 1 | 0 | 1 | 1 |
De Morgan's Laws are used to negate conjunctions and disjunctions. The one
above can be summarized as "To negate a conjunction, take the conjunction of
the negation of the conjuncts".
We also have Dual De Morgan's Law:
. Again, this can be
readily shown by drawing out a truth table. This one says: "To negate a
disjunction, take the conjunction of the negation of the disjuncts".
Next, consider the following statements:
- "If the goods were not delivered, the customer cannot have paid"
- "If the customer has paid, the goods must have been delivered"
Let "the goods were delivered" and "the customer has paid", then the
two sentences above translate to and
.
The two and are called
contrapositives of each other. The table below shows that these are
tautologically equivalent i.e.
1 | 1 | 0 | 0 | 1 | 1 |
1 | 0 | 0 | 1 | 1 | 1 |
0 | 1 | 1 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 1 | 1 |
The contrapositive can be useful in proofs when it is easier to prove
than .
Contrapositive VS Converse: It is easy to get these two confused and this
leads to logical errors since they are not tautologically equivalent.
- The contrapositive of is
and it is equivalent to the formula - The converse of is and it is NOT
equivalent to the formula
Another important tautological equivalence is the biconditional which
states that .
We can see this in the following truth table:
1 | 1 | 1 | 1 | 1 | 1 |
1 | 0 | 0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 1 | 1 |
The biconditional is important in proofs: when proving , proving
and is sufficient.
Lemma: If and
Theorem [Replacability of Equivalent Formulae]: Let .
If results from replacing some (not necessarily all) instances of in
by , then .
Proof: [An exercise in structural induction]
Theorem [Negating a formula]: Suppose is a formula composed of some
atoms and the connectives only, by the formation rules.
Suppose that results from replacing with and
with in , as well as replacing each propositional variable with its
negation. Then .
Proof: [An exercise in structural induction]
For example, if we have that . The
negation of by the above theorem is
.
Formula Simplification, Essential Laws and Normal Forms
Here, we draw a similarity between simple algebraic manipulations and
simplification of formulae in the propositional language. In algrebra, the
expression is clearly yields . But how do we know this? The
rules that were followed to reach the deduction that the expression evaluated to
were the associativity of addition, and how zero is defined i.e. and
. In essence, this helped us reach a simplified form of the expression,
which can help to make it easier to understand and work with.
Now, consider the following propositional formula .
When seeking a simplification of this formula, the process is very similar to
the algebraic one above. The difference is that in this case, the algebraic
rules are actually (tauto)logical equivalences. We use the following
equivalences in order to simplify this logical formula:
Using these equivalences above, we can do the following:
Simplification of Conditonals and Biconditionals
Since the symbolic treatment of conditionals and biconditionals is relatively
cumbersome, one usually "substitutes" them using logically equivalent formulae.
In order to remove the conditional from a formula, one pay perform a
substitution using the following equivalence:
To get rid of the biconditional, one may use either of the following forms:
Example:
Essential Laws of Propositional Calculus
Name | Law |
---|---|
Excluded Middle | |
Contradiction Law | |
Identity Laws | and |
Dominaiton Laws | and |
Idempotent Laws | and |
Double-negation | |
Commutative Laws | and |
Associative Laws | and |
Distributive Laws | and |
De Morgan's Laws | and |
- Note that all of these laws can be readily proven using a truth table
- All laws come in pairs (except the double negation law). These pairs are
called dual pairs: for each formula depending only on the connectives
, the dual is obtained by replacing each 1 by a 0 and each
0 by a 1, all with and finally replace all with . - The laws help one simplify a formula and should therefore be applied whenever
they can. There is no point in leaving the formula as it is. It is better simplified as just . - A non-perfect analogy for the commutative, associative and distributive
laws is found in the algebraic operators . The is often treated
as and is often treated as (not always...).
Here are two other laws which can be derived from the laws above. Firstly, here
are the absorption laws:
They can be proven using the identity, distributivity and domination laws:
Here is another important law, with its dual:
These can be proven using distributivity in revserse, followed by the law of the
excluded middle and finally the identity laws.
Shortcuts for Simplifying Formulae
Definition: A formula is called a literal if it is of the form or , where is a propositional variable.
The two and are called complementary literals. The following
rules allow one to simplify conjunctions only containing literals:
- If a conjunction contains complementary literals or the propositional constant
0, then it always yields 0 i.e. it is a contradiction - All instances of the propositional constant 1 and the duplicate copies of any
literal may be dropped. If nothing remains, then the formula is a tautology -
you can keep just a 1 to have a formula.
To simplify disjunctions, the duals of the two rules above are used.
- If a disjunction contains complementary literals or the propositional constant
1, then it always yields 1 i.e. it is a tautology - All instances of the propositional constant 0 and all duplicate copies of any
literal may be dropped. If nothing remains, then the formula is a
contradiction- you can keep just a 0 to have a formula.
Example: Simplifying
Using the rules above, this expression can be simplified to:
Normal Forms
Just like matrices, formulae can be converted into some standard froms through
which they can become more convenient for symbolic manipulations and
identification and comparision of formulae. In propositional calculus, there are
two such forms: the Disjunctive Normal Form and the Conjunctive Normal
Form.
Definition: A formula is said to be in disjunctive normal form (DNF) if it
is written as a disjunction, in which all the terms are conjunctions of
literals.
Example: The formulae ,
and are all in DNF.
The disjunction is NOT in DNF. This is because the
term is a negation, not a conjunction.
Definition: A disjunction with literals as disjuncts is called a disjunctive
clause. Similarly, a conjunction with literals as conjuncts is called a
conjunctive clause.
Examples: is a conjunctive clause and
is called a disjunctive clause,
In general, disjunctive and conjunctive clauses are just called clauses,
Definition: A conjunction with disjunctive clauses as its conjuncts is said
to be in conjunctive normal form.
Examples: Each of , and is in
CNF. However, the formula is NOT in CNF- the term
in the second argumet of the first conjunction is a conjunction, not
a literal, therefore it is not a disjunctive clause.
Obtaing Normal Forms
How does one compute the normal form of a formula? The following tautological
equivalences can be used to this end.
These help to get rid of implications and equivalences from formulae.
These equivalences help to eliminate from the scope of
such that every only has an atom in its scope.
These equivalences help eliminate from the scope of .
These last equivalences help eliminate from the scope of .
This method will lead to the DNF/CNF of a formula.
Notes: The two nomrmal forms that have been discussed thus far are not
mutually exclusive i.e. a formula in CNF can also be a valid formula in DNF.
Have a look at the formula , which is a
conjunction with 3 literals. It is in CNF, with three disjunctive clauses.
Alternatively, it is also in DNF, with one conjunctive clause.
On the other hand, the formula is in DNF, with
two conjunctive clauses, but it cannot be considerd to be a formula in CNF at
all. But if is exchanged for in this formula, it is a valid
formula in CNF too, just like the example above.
Algorithm for CNF
- Eliminate equivalences and implications using and
- Push negation inwards, to the variables using De Morgan's Laws
- Recursively:
- If is a literal, then return
- If is , then return
- If is ,
- call and
- Suppose
- Suppose
- Return
i.e. the conjunction of , for all pairs of .
Example: Consider the formula
. Using the recursive algorithm for CNF in
the last step above, we can expand and simplify into the DNF:
Theorem (Existance of Normal Forms): Any formula is
tautologically equivalent to a formula in DNF.
Proof:
-
If is a contradiction, then is tautologically equivalent to the DNF
, where is any atom occurring in . -
If is not a contradiction, then the following method can be used (note
that this is just a demonstration of the method on an example)Suppose that has three atoms, and the value of is 1 iff
or or are assigned to respectively.For each of these assignments, we have a conjunctive clause with three
literals, each being either the atom or its negation, depending on the truth
value that has been assigned to it. We have the following conjunctive clauses:
, , . We see that the first of these clauses is true iff have
truth values , the second is true iff have truth values
respectively and finally the third is true iff have truth values
.Therefore, the follwing formula in DNF is stautologically equivalent to .
. -
If is a tautology, then the required DNF may simply be the formula
, where is any atom occurring in .
This completes the "proof".
The following theorem can also be proven using a similar strategy:
Theorem: Any formula is tautologically equivalent to a
formula in CNF.
DNF from Truth Tables
Note that from the example provided in the proof above shows that it can be
possible to construct the DNF of a formula using just its truth table.
Consider the following truth table for the formula with three propositional
variables .
1 | 1 | 1 | 1 |
1 | 1 | 0 | 0 |
1 | 0 | 1 | 1 |
1 | 0 | 0 | 0 |
0 | 1 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 0 | 1 | 1 |
0 | 0 | 0 | 0 |
From this table, it can be seen that the truth valuations under which is
true are , and for respectively.
Using the same approach as in the theorem above, we get that
CNF from Truth Tables
The process of complementation can be used to obtain conjunctive normal
forms from truth tables. If a formula only contains the connectives , then its complement is the formula formed by replacing all
by , all by and all atoms by their negations.
Using complementation, the complement of the formula
is
Note that if a formula is in DNF, then its complement, , is in CNF.
Therefore, the CNF of a formula can be obtained from a truth table by first
computing the DNF of , then taking the complement of that.
Adequate Sets of Connectives
So far, one unary connective () and four binary connectives
() have been introduced. However, there exist many
more connectives. In fact, there are possible binary connectives.
In general, for any -ary connective (one that takes arguments), there are
rows in the truth table for such a connective ( truth valuations for
the arguments to the connective. The number of -ary connectives is equal
to the number of rows in the truth table, times the number of binary numbers of
length (equal to the height of the truth table) . So there are
-ary connectives.
Definition: An adequate set of connectives is one that has the capability
to express all truth tables. It can be shown that the set is an adequate set of connectives. This is also known as
the standard set of connectives.
The objective now is to devise a method to show that a set of connectives is
adequate.
Proofs of Adequacy
Definition: The arity of a function, , is the number, of
inputs that the function takes. Functions with 0 inputs are called
nullary. Functions with 1 input are called unary. Functions with 2
inputs are called binary. A propositional connective, , with arity ,
is .
A set, , of propositional connectives is said to be adequate for
propositional logic if every propositional connective (of any arity) can
be implemented using only the connectives in .
Theorem: is an adequate set of connectives.
Proof: Fix any -ary function .
Let be the arguments to the function . We shall show that
the function can be implemented using only the connectives in the given set.
We already know of a method which can be used to do this- from the formation of
Disjunctive Normal Forms.
- Write out the truth table for
- For every row in the truth table, write out a conjunction with literals-
the -th one being if, for that row, the -th column equals 1 and
otherwise - Construct a formula that is the disjunction of all of the conjunctions
formed from the truth table.
By construction, has the same truth table as and so we have managed to
implement using only the connectives in the given set. Therefore, the set
is adequate for propositional logic.
Here is a connective that is itself adequate for propositional logic. The
Pierce arrow, denoted , is defined through the following truth
table:
1 | 1 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
0 | 0 | 1 |
Indeed, the standard set of connectives can be implemented using the Pierce
arrow:
So, to test whether a set of connectives is adeqate for propositional logic, it
suffices to show that the Pierce arrow can be implemented using that set.
Another one of these beastly connectives is the Sheffer stroke, which is denoted
as . It is defined as follows:
| | ||
---|---|---|
1 | 1 | 0 |
1 | 0 | 1 |
0 | 1 | 1 |
0 | 0 | 1 |
The Sheffer stroke is also known as NAND (negation of ).
The set of connectives is also adequate. This can be shown by
implementing the Pierce arrow using the Sheffer stroke:
Proofs of Indequacy
Similar to how a connective can be proven adequate, a connective can be proven
inadequate by showing that one or more of the standard connectives cannot be
implemented using the connective.
Example: Show that the set of connectives is inadequate.
We shall show that cannot be implemented using the set . Note that a
formula of one variable, say , containing only the connectives in is such
that if a truth valuation sets , then the formula itself must evaluate
to 0.
So, for it to be possible to define the standard using , there
needs to exist a formula with the only propositional variable being and
the only connective being such that . But as
mentioned before, if , then too, so and cannot
be tautologically equivalent.
Formal Deducibility
So far, the methods studied for proving arguments are using truth tables and the
semantics (tautological equivalence, ). We now desire to replace
these methods with a purely syntactic one, with rules of deduction that are
entirely syntactic.
We now define a relation called formal deducibility, denoted by ,
which is intuitively the same as tautological equivalence, but has a different
method of proving the validity of an argument which can be done
mechanically/syntactically.
The word "formal" in this context means that the method is only concerned with
the syntactic form of an argument. Proofs do not refer to any semantic
properties and can be verified mechanically.
The system of proof being used in this document is the system of Natural
Deduction, which is far from the only system of formal proof.
Conventions: Here are some conventions to be followed to make notation
easier.
- Formal deducibility is a relationship between a set of formulae (called the
premises) and a formula (called the conclusion). - The symbol denotes the relationship of formal deducibility between a
set and a formula. So asserts that is formally deducible
from the set . - If is a set of formulae, for notational convenience, the
curly braces may be elided. So saying is equivalent. - If is a set, where is a formula, then set-notational
syntax may be elided. So saying is equivalent. - If and are sets of formulae, then set notation syntax can
be elided from the expression . So is
equivalent notation.
Natural Deduction
A proof is a finite sequence of the form . Such a
statement is called a sequent.
A proof is considered to be valid if every sequent in the sequence of sequents
in the proof is created from previous sequents according to a specified proof
rule. These rules shall be introduced soon.
Also, a theorem is a sequent that occurs in a valid proof (usually the last).
Now, here are the rules of natural deduction. Each of is any formula and
is any set of formulae.
-
is the rule of Reflexivity. It says that is a
theorem. -
is the rule of Addition of Premises. It states that if is a theorem, then so is .
-
is the rule of elimination. It states that if
and are theorems,
then is a theorem. -
is the rule of elimination. It states
that if and are theorems,
then is a theorem. -
is the rule of introduction. It states
that if is a theorem, then
is a theorem. -
is the rule of elimination. It states that if is a theorem, then and
are theorems. -
is the rule of introduction. It states that if
and are theorems, them is a theorem. -
is the rule of elimination. It states that if and are theorems, then is a theorem.
-
is the rule of introduction. It states that if
is a theorem, then and are theorems. -
a) is the rule of elimination. It states that if and are theorems, then
is a theorem.b) is the rule of elimination. It states that if and are theorems, then
is a theorem. -
is the rule of introduction. It states that if
and are theorems, then is a theorem.
Example: This is called the membership rule. It states that if , then is a theorem.
The membership rule, when used, will now be cited as .
This now shows how to prove a theorem using the method of formal deduction.
Proof: Assume that and let . So .
In the above proof, line 1 is generated using the rule and this
is cited to its right. Then, line 2 is generated using line 1, by the
rule which is the addition of premises and this is cited to its right again.
These citations are important because they provide justification for each step.
Note that citations can only be made to previous lines in the proof.
These steps provide a formal proof for the statement and so
it is now a theorem.
Example: Prove that .
Here is a formal proof for this statement.
In this proof, the membership rule, , was used as a lemma. This is
possible because the rules of natural deduction and theorems are just schemas
for a proof. So instead of executing each of the steps in the proof of the
lemma, it suffices to cite the lemma, which is a theorem.
Note that in the above proof, it was also possible to reorder the lines, as long
as they all cite previous lines.
Some Intuition
- is the proof schema for an indirect proof/a proof by
contradiction. If a contradiction, which, in the rules, is and
can be deduced from the set , with an additional false premise (one
that does not hold), , then this proposition is deducible from the
set: . - is the proof schema for a proof by cases. If follows from
and also follows from , then follows from . - is the proof schema used to prove an implication. In order
to prove with a certain set of premises i.e. to prove
, one should assume (by adding it to the
premises) and try to prove i.e. .
Definition: Here is a complete formal definition for formal
deducibility. A formal deduction system such as Natural Deduction is specified
by a set of deduction rules.
A formula is formally deducible from (denoted as ) iff is generated by a finite numeber of applications of
the rules of the system. So holds iff there exists a finite
sequence:
such that the following are satisfied:
- Each sequent (for ) is generated by one
rule of formal deduction from the sequents that preceed it - The final sequent is the desired i.e.
and .
The above sequence of sequents is called a formal proof of its last sequent
i.e. .
Both formal deducibility and are constructed inductively and one can
observe that formulae correspond to schemes of proof and the rules of formation
correspond to the rules of formal deduction.
VS : There is a difference between
consequence and formal deducibility.
- Tautological consequence is concerned with semantics while formal
deducibility is concerned with syntax (Remeber: syntax is to form while
semantics is to meaning). - The connection between tautological consequence and implications is that
" iff is a tautology". - The connection between formal deducibility and implications is that " iff ".