# Logic The study of correct reasoning.

## Presentation on theme: "Logic The study of correct reasoning."— Presentation transcript:

Logic The study of correct reasoning

Propositions A proposition is a statement that is either true or false
Examples Today is Monday Jorge studies Spanish The sun orbits the earth All humans respire Joseph is 6 years old All flowers are pink 5 < 3 Joyce is sick is a rational number

Are the following propositions?
Get in the car This is a command and does not have a true or false response. What have you been doing? This is a question and therefore is not a proposition Mathematics is better than English This is an opinion and is not a proposition

We can represent propositions by using letters like p, q and r
For example p: There are elephants in Thailand True (T) q: Bangkok is in England False (F) We can write down the truthfulness or falsity of a proposition. This is called its truth value.

Consider the proposition
Negation (Not) The negation of a proposition can be stated by “not” or “it is not the case that...” Consider the proposition p: All lions are fierce The negation can be represented by It is not the case that all lions are fierce or Not all lions are fierce or Some lions are not fierce Note that the proposition ‘No lions are fierce’ is NOT the negation of ‘All lions are fierce’. As the proposition ‘All lions are fierce is false if only one lion is not fierce’.

Consider the proposition
p: The bottle of wine is full The negation is The bottle of wine is not full Note we might be tempted to write here that the ‘bottle of wine is empty’. However if it is not completely empty it is not full.

Negation (Not) can be represented by a truth table
If the proposition is true then the negation is false and if the proposition is false then the negation is true T F p Note that in logic and , the complement of A, in set theory are equivalent

Conjunction Two propositions p and q can be joined together by using the word ‘and’ between them. This is written as The resulting compound proposition is called a conjunction. Consider the following propositions p: Renzo likes Maths q: Rafael likes football Renzo likes Maths and Rafael likes football

Consider the following propositions
p: Paul is Tall q: Ploy is from Thailand Paul is tall and Ploy is from Thailand Consider the following propositions p: Mr Willis is a Mathematics teacher q: Mr Astill is a Mathematics teacher Mr Willis and Mr Astill are both Mathematics teachers

The truth table for a conjunction
q p When both individual propositions are true then the truth value of the conjunction is true, otherwise the conjunction value will be false. Note that in logic and , the intersection of sets, in set theory are equivalent

The resulting compound proposition is called a disjunction.
Two propositions p and q can be joined together by using the word ‘or’ between them. This is written as The resulting compound proposition is called a disjunction. Consider the following propositions p: Bangkok is the capital of Thailand q: Lima is the capital of England T F Bangkok is the capital of Thailand or Lima is the capital of England T Note the ‘or’ in the statement means only one of the propositions has to be true for the whole statement to be true

Consider the following propositions
p: Bangkok is the capital of Cambodia q: Lima is the capital of England F F Bangkok is the capital of Cambodia or Lima is the capital of England F Note since both propositions are false then the disjunction is false.

The truth table for a disjunction
q p The disjunction value will be true when either one or the other or both propositions are true. Note that in logic and , the union of sets, in set theory are equivalent

Implication ‘if ….. then …..’
Implication is written as and can be read as If p then q p implies q p only if q p is a sufficient condition for q q if p q whenever p q is a necessary condition for p

The truth table for an implication
q p In the formula p is the antecedent while q is referred as the consequent. The truth table needs some explaining.

Consider the following propositions p: It is raining
q: I carry an umbrella If it is raining then I carry an umbrella T F q p T T T p: It is raining q: I carry an umbrella If it is raining then I carry an umbrella T F F The implication is false as it is raining and I am not carrying an umbrella p: It is raining q: I carry an umbrella If it is raining then I carry an umbrella F T T The implication is true, as if it is not raining, I may still be carrying my umbrella. Maybe I think it will rain later, or maybe I am going to use it as a defensive weapon! p: It is raining q: I carry an umbrella If it is raining then I carry an umbrella F F T The implication is true, as if it is not raining, I am not carrying the umbrella

p: It is raining q: I carry an umbrella If it is raining then I carry an umbrella The converse is: If I carry an umbrella then it is raining The inverse is: If it is not raining then I will not carry an umbrella The contrapositive is: If I do not carry an umbrella then it is not raining

Equivalence ‘if and only if’
Equivalence is written as and can be read as It is raining if and only if I carry an umbrella Mathematicians abbreviate ‘if and only if’ as ‘iff’ p: We will play badminton q: The sports hall is not being used We will play badminton if and only if the sports hall is not being used. p: Andrea will pass maths q: The exam is easy Andrea will pass maths if and only if the exam is easy

The truth table for an equivalence
p The truth value of equivalence is true only when all the propositions have the same truth value

Consider the following propositions p: I will buy you a Mars bar
q: You win the game of Cray Pots I will buy you a Mars bar if and only if you win a game of Cray pots T F q p T T T p: I will buy you a Mars bar q: You win the game of Cray Pots I will buy you a Mars bar if and only if you win a game of Cray Pots T F F I brought you the Mars bar even though you didn’t win the game of Cray Pots I lied the equivalence statement is false. p: I will buy you a Mars bar q: You win the game of Cray Pots I will buy you a Mars bar if and only if you win a game of Cray Pots F T F I did not buy you the Mar bar so I lied and therefore the equivalence statement is false. F p: I will buy you a Mars bar q: You win the game of Cray Pots I will buy you a Mars bar if and only if you win a game of Cray Pots F T The equivalence is true as I did not buy you a Mars bar and you did not win Cray Pots

Tautology A tautology is a compound proposition that is always true regardless of the individual truth values of the individual propositions. A compound proposition is valid if it is a tautology Contradiction A contradiction is a compound proposition that is always false regardless of the individual truth values of the individual propositions

Creating longer propositions
Construct a truth table for Identify the propositions and connectives p, q, and as these become the headings of the table. F T q p F T q p F T q p F T q p F T q p

Create a truth table for
q p F T q p Create a truth table for F T r q p T T F F F F T T F F F T F T F T

Show that the statement is logically valid.
To show that a combined proposition is logically valid, you must demonstrate that it is a tautology. A tautology is a statement that always tells the truth

a tautology we must create a truth table p q T F
In order to show that is a tautology we must create a truth table p q T F F T T F F T T T T T T T The statement is true for all truth values given to p and q Therefore is logically valid.

Translating English Sentences
not p it is not the case that p p and q p or q if p then q p implies q if p, q p only if q p is a sufficient condition for q q if p q whenever p q is a necessary condition for p p if and only if q

It is not raining p: It is raining Renzo and Rafael both did the IB p: Renzo did the IB q: Rafael did the IB

If there is a thunderstorm then Sam cannot use the computer
p: There is a thunderstorm q: Sam uses the computer x is not an even number or a prime number p: x is a even number q: x is a prime number

If it is raining then I will stay at home. It is raining
If it is raining then I will stay at home. It is raining. Therefore I stayed at home. p: It is raining q: I stay at home If it is raining then I will stay at home If it is raining then I will stay at home. It is raining If it is raining then I will stay at home. It is raining. Therefore I stayed at home.

If I go to bed late then I feel tired. I feel tired
If I go to bed late then I feel tired. I feel tired. Therefore I went to bed late. p: I go to bed late q: I feel tired If I go to bed late then I feel tired. If I go to bed late then I feel tired. I feel tired. If I go to bed late then I feel tired. I feel tired. Therefore I went to bed late.

I earn money if and only if I go to work. I go to work
I earn money if and only if I go to work. I go to work. Therefore I earn money. p: I earn money q: I go to work I earn money if and only if I go to work. I earn money if and only if I go to work. I go to work. I earn money if and only if I go to work. I go to work. Therefore I earn money.

If I study then I will pass my IB Mathematics
If I study then I will pass my IB Mathematics. If I pass my IB Mathematics I will get my IB Diploma. I study. Therefore I will get my IB Diploma. p : I Study q : I will pass my IB Mathematics r : I will get my IB Diploma If I study then I will pass my IB Mathematics If I study then I will pass my IB Mathematics. If I pass my IB Mathematics I will get my IB Diploma If I study then I will pass my IB Mathematics. If I pass my IB Mathematics I will get my IB Diploma. I study. If I study then I will pass my IB Mathematics. If I pass my IB Mathematics I will get my IB Diploma. I study. Therefore I will get my IB Diploma.

Negation Conjunction Disjunction T F p F T q p F T q p Implication Equivalence T F q p T F q p