29
Symbolic Logic Ioan Despi [email protected] University of New England July 19, 2013

Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Symbolic Logic

Ioan Despi

[email protected]

University of New England

July 19, 2013

Page 2: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Outline

1 What is logic?

2 Modus Ponens

3 Features of Rules of Reasoning

4 Necessity in Logic

5 Formal and informal logic

6 Statements

7 Logic Puzzles

8 Basic Concepts

9 Connectives

10 Negation

11 Truth-Tables

12 Logical Equivalence

13 De Morgan’s Laws

Ioan Despi – Web Programming 2 of 24

Page 3: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

What is logic?

Logic came from logos[Greek]: sentence, discourse, reason, rule, ratio

Logic is the study of the principles of correct reasoning.

Many of them, e.g.,I principles governing the validity of arguments, that is

F whether certain conclusions follow from some given assumptions.

Examples:

If Tom is an actor, then Tom is rich.Tom is an actor.Therefore, Tom is rich.

If 𝜆 > 3, then 𝜆 > 2.𝜆 > 3.Therefore, 𝜆 > 2.

More:

If Deta is in Europe, then Deta is not inChina.Deta is in Europe.Therefore, Deta is not in China.

All Cretans are liars.Ariadna is a Cretan.Therefore, Ariadna is a liar.

Ioan Despi – Web Programming 3 of 24

Page 4: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Modus Ponens

These four arguments here are obviously good arguments in the sensethat their conclusions follow from the assumptions.If the assumptions of the argument are true, then the conclusion of theargument must also be true.They are all cases of a particular form of argument known as ”modusponens”:

If P then Q.P.Therefore Q.

𝑃 ⇒ 𝑄𝑃∴ 𝑄

We shall be discussing validity again later on.Logic is not just concerned with the validity of arguments.Logic also studies

I consistency, andI logical truths, andI properties of logical systems such as

F completeness andF soundness.

But we shall see that these other concepts are also very much related tothe concept of validity.

Ioan Despi – Web Programming 4 of 24

Page 5: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Features of Rules of Reasoning

Modus ponens illustrates two features about the rules of reasoning in logic:1 Topic-neutrality.

I Modus ponens can be used in reasoning about diverse topics.I This is true of all the principles of reasoning in logic.

F The laws of biology might be true only of living creatures, andF the laws of economics are only applicable to collections of agents that

enagage in financial transactions, butF the principles of logic are universal principles which are more general than

biology and economics.

2 Non-contingency,I They do not depend on any particular accidental features of the world.I The theories in the empirical sciences (physics, biology) are contingent in

the sense that they could have been otherwise.I The principles of logic, on the other hand, are derived using reasoning only,

and their validity does not depend on any contingent features of the world.

Ioan Despi – Web Programming 5 of 24

Page 6: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Two Definitions

This is what is implied in the definitions of logic by two famous logicians:

Figure : Alfred Tarski (1901-1983)

“logic. . . [is] . . . the name of a disciplinewhich analyzes the meaning of theconcepts common to all the sciences,and establishes the general lawsgoverning the concepts. ”

Figure : Gottlob Frege (1848-1925)

“To discover truths is the task of allsciences; it falls to logic to discern thelaws of truth. ... I assign to logic thetask of discovering the laws of truth,not of assertion or thought.”

Ioan Despi – Web Programming 6 of 24

Page 7: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Necessity in Logic

The theories in the empirical sciences are contingent in the sense thatthey could have been otherwise.

The principles of logic are derived using reasoning only, and their validitydoes not depend on any contingent features of the world.Example:

I logic tells us that any statement of the form ”If P then P” is necessarilytrue.

I this principle tells us that a statement such as”if it is snowing, then it is snowing” must be true.

I we can easily see that this is indeed the case, whether or not it is actuallysnowing.

I even if the laws of physics or weather patterns were to change, thisstatement will remain true.

Thus we say that scientific truths (mathematics aside) are contingentwhereas logical truths are necessary.

This shows how logic is different from the empirical sciences like physics,chemistry or biology.

Ioan Despi – Web Programming 7 of 24

Page 8: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Formal and informal logic

One can distinguish between informal and formal logic:

Informal logic is used toI mean the same thing as critical thinkingI the study of reasoning and fallacies in the context of everyday life.

Formal logic isI concerned with formal systems of logic, i.e.,

F specially constructed systems for carrying out proofs, whereF the languages and rules of reasoning are precisely and carefully defined.

I Examples:F Sentential logic (also known as ”Propositional logic”) andF Predicate Logic

Ioan Despi – Web Programming 8 of 24

Page 9: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Reasons for Studying Formal Logic

Formal logic helps us identifyI patterns of good reasoning andI patterns of bad reasoning, so

we know which to follow and which to avoid.

Basic formal logic can help improve critical thinking.

Formal systems of logic are also used byI linguists – to study natural languagesI computer scientists – to research relating to Artificial IntelligenceI philosophers – to make their reasoning more explicit and preciseI many other disciplines

Ioan Despi – Web Programming 9 of 24

Page 10: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Statements

In logic we often talk about the logical properties of statements and howone statement is related to another.

There are three main sentence types in English:I Declarative sentences are used for assertions, e.g. ”She is here.”I Interrogative sentences are used to ask questions, e.g. ”Is she here?”I Imperative sentences are used for making requests or issuing commands,

e.g. ”Come here!”

In the sequel, we shall only take a statement to be a declarative sentence,i.e.,

I a complete and grammatical sentence that makes a claim, e.g.,F There is no reality, only its reflection.F The moon is made of green cheese.F Talking brings an audience.F Doing brings a profit.

Statements can be true or false, and they can be simple or complex.

But they must be grammatical and complete sentences.

Ioan Despi – Web Programming 10 of 24

Page 11: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Counterexamples and Test

These are not statements :I The Commonwealth of Australia [ A proper name, but not a sentence ]I A bridge too far. [ Not a complete sentence ]I Sit down! [ A command that is not a complete sentence making a claim ]I Are you coming? [ A question ]I +*()= [ Ungrammatical ]

Test to decide whether something is a statement in English:I given a sentence 𝜑, add ”it is true that. . . ” to the front.

F if the resulting expression is grammatical, then 𝜑 is a statement.F otherwise it is not.

Ioan Despi – Web Programming 11 of 24

Page 12: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Logic Puzzles

Bob was looking at a photo. Someone asked him”Whose picture are you looking at?”He replied:”I don’t have any brother or sister,

but this man’s father is my father’s son.”So, whose picture was Bob looking at?The man in the photo is Bob’s son.

There was a robbery in which a lot of goods were stolen. The robber(s)left in a truck. It is known that :

1 Nobody else could have been involved other than A, B and C.2 C never commits a crime without A’s participation.3 B does not know how to drive.

So, is A innocent or guilty?A is guilty.

Ioan Despi – Web Programming 12 of 24

Page 13: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Basic Concepts

A proposition is a statement which is either true or false.

A tautology is a proposition which is always true.

A contradiction is a proposition which is always false.

A compound proposition is build from propositions by the use ofconnectives and, or, not, implies, and equivalent to.

Ioan Despi – Web Programming 13 of 24

Page 14: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Connectives

Given two statements (propositions), denoted by 𝑝 and 𝑞 respectively, one canuse connectives to get the following compound propositions:

𝑝 ∧ 𝑞, the conjunction of 𝑝 and 𝑞, meaning “𝑝 and 𝑞”

𝑝 ∨ 𝑞, the disjunction of 𝑝 and 𝑞, meaning “𝑝 or 𝑞”

∼ 𝑝, the negation of 𝑝, meaning “not 𝑝”

𝑝 → 𝑞, the implication, meaning “𝑝 implies 𝑞”

𝑝 ↔ 𝑞, the equivalence of 𝑝 and 𝑞, meaning “𝑝 and 𝑞 are equivalent”

Ioan Despi – Web Programming 14 of 24

Page 15: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Negation

The negation of a statement 𝜙 is a statement whose truth-value isnecessarily opposite to that of 𝜙.

For any English sentence 𝜙, you can form its negation by appending”it is not the case that” to 𝜙 to form the longer statement

it is not the case that 𝜙.

In formal logic, the negation of 𝜙 can be written as ∼ 𝜙 or ¬𝜙.A statement and its negation

I can never be true togetherF they are logically inconsistent with each other.

I exhaust all logical possibilitiesF in any situation, one and only one of them must be true.

Here are some concrete examples:𝜙 ∼ 𝜙It is snowing. It is not the case that it is snowing.

(i.e., It is not snowing.)1 + 1 = 2 It is not the case that 1 + 1 = 2.

(i.e., 1 + 1 is not 2.)

Ioan Despi – Web Programming 15 of 24

Page 16: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Logical Values

In Propositional Logic there are only two truth-values :T and F, which stand for truth and falsity, respectively.

Some textbooks use ”1” and ”0” in place of ”T” and ”F”.I To say that a statement has truth-value T is just to say that it is true.I To say that its truth-value is F is to say that it is false.

The principle of bivalence: a WFF either has truth-value T or F.

The principle of excluded middle [tertium non datur] states that forany proposition, either that proposition is true, or its negation is true.

The principle of (non-) contradiction states that no statement can beboth true and not true (false).

Ioan Despi – Web Programming 16 of 24

Page 17: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Truth-Tables

They provide one systematic method for determining the validity ofsentences or arguments in Sentential (Propositional) Logic.

They show how the truth-value of a complex Well-Formed-Formula(WFF) depends on the truth-values of its component WFFs.A truth table is a complete list of the possible truth values of astatement. We use ”T” to mean ”true”, and ”F” to mean ”false” (thoughit may be clearer and quicker to use ”1” and ”0” respectively).

I with two propositions there are 4 possibilitiesI with three propositions there are 8 possibilitiesI with 𝑛 propositions there are 2𝑛 possibilities.

It is a mathematical tradition to split the first column in two - the firsthalf being all T’s and the second half being all F’s, then to split thesecond column into quarters with T’s in the first quarter, F’s in thesecond quarter and so on, then to split the third column, if there is one,into eights with blocks of T’s and F’s alternating, and so on.

The truth tables can be taken as the precise definitions for thecorresponding connectives.

Ioan Despi – Web Programming 17 of 24

Page 18: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Truth-Tables

Ioan Despi – Web Programming 18 of 24

Page 19: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Truth-Tables

𝑝 𝑞 𝑝 ∧ 𝑞 𝑝 𝑞 𝑝 ∨ 𝑞 𝑝 ∼ 𝑝𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝑇 𝐹𝑇 𝐹 𝐹 𝑇 𝐹 𝑇 𝐹 𝑇𝐹 𝑇 𝐹 𝐹 𝑇 𝑇𝐹 𝐹 𝐹 𝐹 𝐹 𝐹

𝑝 𝑞 𝑝 → 𝑞𝑇 𝑇 𝑇𝑇 𝐹 𝐹𝐹 𝑇 𝑇𝐹 𝐹 𝑇 .

𝑝 𝑞 𝑝 ↔ 𝑞𝑇 𝑇 𝑇𝑇 𝐹 𝐹𝐹 𝑇 𝐹𝐹 𝐹 𝑇 .

Ioan Despi – Web Programming 19 of 24

Page 20: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Logical Equivalence

Definition

Two (compound) propositions 𝑃 and 𝑄 are said to be equivalent orlogically equivalent, denoted by

𝑃 ≡ 𝑄 or by 𝑃 ⇔ 𝑄,

iff (i.e., if and only if) they have the same truth values.

In other words, for all possible truth values of the component statements,the compound propositions will have the same truth values.

Show (∼ 𝑝) ∨ (∼ 𝑞) and ∼ (𝑝 ∧ 𝑞) are equivalent.

Ioan Despi – Web Programming 20 of 24

Page 21: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Example

Show (∼ 𝑝) ∨ (∼ 𝑞) and ∼ (𝑝 ∧ 𝑞) are equivalent.

Solution.

𝑝 𝑞 ∼ 𝑝 ∼ 𝑞 𝑝 ∧ 𝑞 ∼ (𝑝 ∧ 𝑞) (∼ 𝑝) ∨ (∼ 𝑞)𝑇 𝑇 𝐹 𝐹 𝑇 𝐹 𝐹𝑇 𝐹 𝐹 𝑇 𝐹 𝑇 𝑇𝐹 𝑇 𝑇 𝐹 𝐹 𝑇 𝑇𝐹 𝐹 𝑇 𝑇 𝐹 𝑇 𝑇⏟ ⏞

intermediate results⏟ ⏞

exactly same columnsnot necessary but useful (same truth values)

Since the last two columns are the same, we conclude (∼𝑝)∨ (∼𝑞) and ∼(𝑝∧ 𝑞)are equivalent.

Ioan Despi – Web Programming 21 of 24

Page 22: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Example

Show ∼(𝑝 ∧ 𝑞) and (∼𝑝) ∧ (∼𝑞) are not logically equivalent.

Solution. This is manifested in the following truth table

𝑝 𝑞 ∼𝑝 ∼𝑞 𝑝 ∧ 𝑞 ∼(𝑝 ∧ 𝑞) (∼ 𝑝) ∧ (∼𝑞)𝑇 𝑇 𝐹 𝐹 𝑇 𝐹 𝐹𝑇 𝐹 𝐹 𝑇 𝐹 𝑇 𝐹𝐹 𝑇 𝑇 𝐹 𝐹 𝑇 𝐹𝐹 𝐹 𝑇 𝑇 𝐹 𝑇 𝑇⏟ ⏞

not exactly same

because the corresponding truth values differ (at 2 places).

Ioan Despi – Web Programming 22 of 24

Page 23: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Example

Show (𝑝 ∨ 𝑞) ∨ (∼ 𝑝) is a tautology and (𝑝 ∧ 𝑞) ∧ (∼ 𝑝) is a contradiction.

Solution. From the following truth table

𝑝 𝑞 ∼ 𝑝 ∼ 𝑞 𝑝 ∨ 𝑞 𝑝 ∧ 𝑞 (𝑝 ∨ 𝑞) ∨ (∼ 𝑝) (𝑝 ∧ 𝑞) ∧ (∼ 𝑝)𝑇 𝑇 𝐹 𝐹 𝑇 𝑇 𝑇 𝐹𝑇 𝐹 𝐹 𝑇 𝑇 𝐹 𝑇 𝐹𝐹 𝑇 𝑇 𝐹 𝑇 𝐹 𝑇 𝐹𝐹 𝐹 𝑇 𝑇 𝐹 𝐹 𝑇 𝐹⏟ ⏞

tautology⏟ ⏞ contradiction

We see that(𝑝 ∨ 𝑞) ∨ (∼ 𝑝) is always true and is thus a tautology and(𝑝 ∧ 𝑞) ∧ (∼ 𝑝) is always false and is thus a contradiction.

Ioan Despi – Web Programming 23 of 24

Page 24: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

De Morgan’s Laws

Theorem

(i) ∼ (𝑝 ∧ 𝑞) is equivalent to (∼ 𝑝) ∨ (∼ 𝑞) , i.e.,

∼ (𝑝 ∧ 𝑞) ≡ (∼ 𝑝) ∨ (∼ 𝑞)

(ii) ∼ (𝑝 ∨ 𝑞) is equivalent to (∼ 𝑝) ∧ (∼ 𝑞) , i.e.,

∼ (𝑝 ∨ 𝑞) ≡ (∼ 𝑝) ∧ (∼ 𝑞)

Proof.

(i) already done in the first example ;(ii) can be proved likewise.

Theorem

𝑝 → 𝑞 ≡ (∼ 𝑝) ∨ 𝑞.

Proof.Can easily be proved by the use of a truth table.

Ioan Despi – Web Programming 24 of 24

Page 25: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Logical Equivalences

A number of logical equivalences are summarised in the following theorem.Proofs are left as exercises.

Theorem

Let 𝑝, 𝑞, 𝑟 be propositions and denote by ⊤ and ⊥ tautology, respectivelycontradiction. Then the following logical equivalences hold.

1. Commutative laws 𝑝 ∧ 𝑞 ≡ 𝑞 ∧ 𝑝 𝑝 ∨ 𝑞 ≡ 𝑞 ∨ 𝑝2. Associative laws (𝑝 ∧ 𝑞) ∧ 𝑟 ≡ 𝑝 ∧ (𝑞 ∧ 𝑟) (𝑝 ∨ 𝑝) ∨ 𝑟 ≡ 𝑝 ∨ (𝑞 ∨ 𝑟)3. Distributive laws 𝑝 ∧ (𝑞 ∨ 𝑟) ≡ (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟) 𝑝 ∨ (𝑞 ∧ 𝑟) ≡ (𝑝 ∨ 𝑞) ∧ (𝑝 ∨ 𝑟)4. Identity laws 𝑝 ∧ ⊤ ≡ 𝑝 𝑝 ∨ ⊥ ≡ 𝑝5. Negation laws 𝑝∧ ∼ 𝑝 ≡ ⊥ 𝑝∨ ∼ 𝑝 ≡ ⊤6. Double Negation law ∼ (∼ 𝑝) ≡ 𝑝7. Idempotent laws 𝑝 ∧ 𝑝 ≡ 𝑝 𝑝 ∨ 𝑝 ≡ 𝑝8. Universal bound laws 𝑝 ∧ ⊥ ≡ ⊥ 𝑝 ∨ ⊤ ≡ ⊤9. De Morgan’s laws ∼ (𝑝 ∧ 𝑞) ≡ (∼ 𝑝) ∨ (∼ 𝑞) ∼ (𝑝 ∨ 𝑞) ≡ (∼ 𝑝) ∧ (∼ 𝑞)10. Absorption laws 𝑝 ∧ (𝑝 ∨ 𝑞) ≡ 𝑝 𝑝 ∨ (𝑝 ∧ 𝑞) ≡ 𝑝11. Negations of ⊤ and ⊥ ∼ ⊤ ≡ ⊥ ∼ ⊥ ≡ ⊤

Ioan Despi – Web Programming 25 of 24

Page 26: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Examples

Example

5. Use the laws of Theorem ?? to verify the logical equivalence

∼𝑝∧ ∼𝑞 ≡∼ (𝑝 ∨ (∼𝑝 ∧ 𝑞))

Solution. Starting with the most complex side, working toward the otherside:

∼ (𝑝 ∨ (∼ 𝑝 ∧ 𝑞)) ≡ ∼ ((𝑝∨ ∼ 𝑝) ∧ (𝑝 ∨ 𝑞)) Distributivity

≡ ∼ (⊤ ∧ (𝑝 ∨ 𝑞)) Identity

≡ ∼ (𝑝 ∨ 𝑞) De Morgan

≡ ∼ 𝑝∧ ∼ 𝑞

Ioan Despi – Web Programming 26 of 24

Page 27: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Conditional StatementsThe compound proposition implication

𝑝 → 𝑞

is a conditional statement, and can be read as“if 𝑝 then 𝑞” or “𝑝 implies 𝑞”, or “𝑞, if 𝑝”.Its precise definition is given by the following truth table

𝑝 𝑞 𝑝 → 𝑞𝑇 𝑇 𝑇𝑇 𝐹 𝐹𝐹 𝑇 𝑇𝐹 𝐹 𝑇 .

Let us briefly see why the above definition via the truth table is“reasonable” and is consistent with our day to day understanding of thenotion of implications.We observe that the only explicit contradiction to “if 𝑝 then 𝑞” comesfrom the case when 𝑝 is true but 𝑞 is false, and this explains the only “𝐹”entry in the 𝑝 → 𝑞 column.We also note that some people would never use “𝑝 implies 𝑞” to refer to𝑝 → 𝑞; they would instead use “𝑝 implies 𝑞” to exclusively refer to 𝑝 ⇒ 𝑞,i.e., 𝑝 → 𝑞 is a tautology. More details on “⇒” can be found in one of thelater lectures.Ioan Despi – Web Programming 27 of 24

Page 28: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Example

Example

6. Let 𝑝 denote “I buy shares” and 𝑞 denote “I’ll be rich”. Then 𝑝 → 𝑞means “If I buy shares then I’ll be rich”.

Solution. Let us check row by row the “reasonableness” of the truth tablefor 𝑝 → 𝑞 given shortly before.

Row 1: “I buy shares” (𝑝 true) and “I’ll be rich” (𝑞 true) is cer-tainly consistent with (𝑝 → 𝑞) being true.

Row 2: “I buy shares” and “I won’t be rich” means “If I buyshares then I’ll be rich” (i.e., 𝑝 → 𝑞) is false.

Row 3 and 4: “I don’t buy shares” won’t contradict our statement𝑝 → 𝑞, regardless of whether I’ll be rich, as obviouslythere are other ways to get rich.

Ioan Despi – Web Programming 28 of 24

Page 29: Ioan Despi - turing.une.edu.auturing.une.edu.au/~amth140/Lectures/Lecture_07/Lecture/lecture.pdf · Ioan Despi – Web Programming 6 of 24. Necessity in Logic The theories in the

Representation

Representation

𝑝 → 𝑞 ≡ (∼ 𝑝) ∨ 𝑞

This can easily be proved by the use of the truth table.

Note. Obviously a string like 𝑝)) ∧ ∧ → 𝑞𝑟 is not a legitimate logical

expression. In this unit, we always assume that all the concerned strings oflogical expressions are well-formed formulas, or wffs, i.e., the strings arelegitimate.

Ioan Despi – Web Programming 29 of 24