You are on page 1of 26

Logic I

Basics of Propositional Logic

Torsten Hahmann

UMaine
A Logical Argument
Assume the following:
1. A is red or C is red. 2. B is not green.
Further, assume we know that
3. If A is red then B is green. 4. If C is red then D is green.

Torsten Hahmann Logic I 1 / 11


A Logical Argument
Assume the following:
1. A is red or C is red. 2. B is not green.
Further, assume we know that
3. If A is red then B is green. 4. If C is red then D is green.
How can we conclude “D is green”?
Because B is not green, A cannot be red.
Because A or C is red and A is not red, C must be red.
Because C is red, D must be green.
D is green.

Torsten Hahmann Logic I 1 / 11


A Logical Argument
Assume the following:
1. A is red or C is red. 2. B is not green.
Further, assume we know that
3. If A is red then B is green. 4. If C is red then D is green.
How can we conclude “D is green”?
Because B is not green, A cannot be red.
Because A or C is red and A is not red, C must be red.
Because C is red, D must be green.
D is green.

Why is this “reasonable”?

Torsten Hahmann Logic I 1 / 11


A Logical Argument
Assume the following:
1. A is red or C is red. 2. B is not green.
Further, assume we know that
3. If A is red then B is green. 4. If C is red then D is green.
How can we conclude “D is green”?
Because B is not green, A cannot be red.
Because A or C is red and A is not red, C must be red.
Because C is red, D must be green.
D is green.

Why is this “reasonable”? Two factors:


1 [Soundness] The premises are true, and
2 [Validity] Every step of the argument follows logically from our
premises.
This is what formal logic is about.
Torsten Hahmann Logic I 1 / 11
We Deal with Formal Logic (aka Symbolic Logic)
Logic is one of the oldest intellectual disciplines. dating back to
Aristotle (350 B.C.)
Formal Logic concerned with “mechanizing logical reasoning” by
using symbols
I Idea first attributed to Gottfried Leibniz at the end of 17th century
I George Boole (1854): algebraic method of dealing with logical
propositions and inference (birth of propositional/Boolean logic)
I Gottlob Frege (1879): invention of quantifiers for a rigorous logical
language as basis for formal treatise of other mathematics, such as
functions (birth of predicate logic)

Torsten Hahmann Logic I 2 / 11


We Deal with Formal Logic (aka Symbolic Logic)
Logic is one of the oldest intellectual disciplines. dating back to
Aristotle (350 B.C.)
Formal Logic concerned with “mechanizing logical reasoning” by
using symbols
I Idea first attributed to Gottfried Leibniz at the end of 17th century
I George Boole (1854): algebraic method of dealing with logical
propositions and inference (birth of propositional/Boolean logic)
I Gottlob Frege (1879): invention of quantifiers for a rigorous logical
language as basis for formal treatise of other mathematics, such as
functions (birth of predicate logic)
Three ingredients:
1 Propositional symbols to denote propositions
2 Ways of determining the truth of propositions
3 Rules for deriving logically equivalent but syntactically new propositions
Torsten Hahmann Logic I 2 / 11
Propositions

A proposition (statement) is a declarative expression that is either


true or false (even if you don’t know which one it is).

Every proposition has a truth value: true or false.

Torsten Hahmann Logic I 3 / 11


Propositions

A proposition (statement) is a declarative expression that is either


true or false (even if you don’t know which one it is).

Every proposition has a truth value: true or false.


Examples:
I You need to read a lot in COS 250.
I There is life on Mars.
I It is not snowing today.
I 2 times 4 equals 8.
I 2 times 3 equals 5.

Torsten Hahmann Logic I 3 / 11


Propositions

What are not propositions?


I Work on these exercises. Not declarative: Has no truth value.
I When does the library close? Not declarative: Has no truth value.
I He is taking COS250. Truth value depends on who “he” refers to.
I x plus 4 is greater than y . Depends on values of x and y .

But, for example, “For every integer x there is an integer k such that
x = 3k” is a proposition. Has truth value false because for x = 1
there is no such integer.

Torsten Hahmann Logic I 4 / 11


Compound Propositions

Atomic Propositions: cannot be broken down further


I Typically denoted by propositional variables

We can construct Compound Propositions from atomic ones using


logical connectives ∧, ∨, ¬, →, ↔

Torsten Hahmann Logic I 5 / 11


Compound Propositions

Let If p denote ”It is sunny.” and q denotes “It is warm.”


I Negation (not): ¬p denotes:
“It is not sunny.”
I Conjunction (and): p ∧ q denotes:
“It is sunny and it is warm.”
I Disjunction (or): p ∨ q denotes:
“It is sunny or it is warm.’ Could be both.

Torsten Hahmann Logic I 6 / 11


Compound Propositions

Let If p denote ”It is sunny.” and q denotes “It is warm.”


I Negation (not): ¬p denotes:
“It is not sunny.”
I Conjunction (and): p ∧ q denotes:
“It is sunny and it is warm.”
I Disjunction (or): p ∨ q denotes:
“It is sunny or it is warm.’ Could be both.
I Implication/Conditional (if . . . then . . . ): p → q denotes:
“If it is sunny, then it is warm.”

Torsten Hahmann Logic I 6 / 11


Compound Propositions

Let If p denote ”It is sunny.” and q denotes “It is warm.”


I Negation (not): ¬p denotes:
“It is not sunny.”
I Conjunction (and): p ∧ q denotes:
“It is sunny and it is warm.”
I Disjunction (or): p ∨ q denotes:
“It is sunny or it is warm.’ Could be both.
I Implication/Conditional (if . . . then . . . ): p → q denotes:
“If it is sunny, then it is warm.”
I Biconditional (. . . if, and only if, . . . ): p ↔ q denotes:
“It is sunny if, and only if, it is warm.”

Torsten Hahmann Logic I 6 / 11


Truth of Compound Propositions
Truth of compound propositions is defined in terms of its atomic ones
I Let If p denote ”It is sunny.” and q denotes “It is warm.”
I Assume p is true and q is false. Then

Torsten Hahmann Logic I 7 / 11


Truth of Compound Propositions
Truth of compound propositions is defined in terms of its atomic ones
I Let If p denote ”It is sunny.” and q denotes “It is warm.”
I Assume p is true and q is false. Then
I ¬p is
I p ∧ q is
I p ∨ q is

Torsten Hahmann Logic I 7 / 11


Truth of Compound Propositions
Truth of compound propositions is defined in terms of its atomic ones
I Let If p denote ”It is sunny.” and q denotes “It is warm.”
I Assume p is true and q is false. Then
I ¬p is
I p ∧ q is
I p ∨ q is
Truth can be computed as function of atomic propositions:
I ¬p is true iff p is false
I p ∧ q is true iff p is true and q is true
I p ∨ q is true iff ¬p ∧ ¬q is false

Torsten Hahmann Logic I 7 / 11


Truth of Compound Propositions
Truth of compound propositions is defined in terms of its atomic ones
I Let If p denote ”It is sunny.” and q denotes “It is warm.”
I Assume p is true and q is false. Then
I ¬p is
I p ∧ q is
I p ∨ q is
Truth can be computed as function of atomic propositions:
I ¬p is true iff p is false
I p ∧ q is true iff p is true and q is true
I p ∨ q is true iff ¬p ∧ ¬q is false

Truth tables show this computation


Example: q ∨ (¬q ∧ p)
Torsten Hahmann Logic I 7 / 11
Truth of Compound Propositions

p → q is true iff ¬p ∨ q is true

p → q is true iff p ∧ ¬q is false

Torsten Hahmann Logic I 8 / 11


Logical Equivalence
Truth tables can be used to check whether two propositional forms are
logically equivalent:
Definition
Two propositional forms are logically equivalent when they have identical
truth values for all combinations of truth value assignments to the
propositional variables they contain.

Torsten Hahmann Logic I 9 / 11


Logical Equivalence
Truth tables can be used to check whether two propositional forms are
logically equivalent:
Definition
Two propositional forms are logically equivalent when they have identical
truth values for all combinations of truth value assignments to the
propositional variables they contain.

Example; Verify that ¬p ∨ q and ¬(p ∧ ¬q) are logically equivalent.

Torsten Hahmann Logic I 9 / 11


Tautologies and Contradictions

Tautology: a propositional form that is always true


I True for any combination of truth values for its propositional variables
I True independent of what truth values its variables take on
I Example: p ∨ ¬p
I What is the simplest tautology?

Torsten Hahmann Logic I 10 / 11


Tautologies and Contradictions

Tautology: a propositional form that is always true


I True for any combination of truth values for its propositional variables
I True independent of what truth values its variables take on
I Example: p ∨ ¬p
I What is the simplest tautology?
I All tautologies are logically equivalent to T

Torsten Hahmann Logic I 10 / 11


Tautologies and Contradictions

Tautology: a propositional form that is always true


I True for any combination of truth values for its propositional variables
I True independent of what truth values its variables take on
I Example: p ∨ ¬p
I What is the simplest tautology?
I All tautologies are logically equivalent to T
Contradiction: a propositional form that is never true
I False for any combination of truth values for its propositional variables
I False no matter what truth values its propositional variables take on
I Example: p ∧ ¬p
I What is the simplest contradiction?

Torsten Hahmann Logic I 10 / 11


Tautologies and Contradictions

Tautology: a propositional form that is always true


I True for any combination of truth values for its propositional variables
I True independent of what truth values its variables take on
I Example: p ∨ ¬p
I What is the simplest tautology?
I All tautologies are logically equivalent to T
Contradiction: a propositional form that is never true
I False for any combination of truth values for its propositional variables
I False no matter what truth values its propositional variables take on
I Example: p ∧ ¬p
I What is the simplest contradiction?
I All contradictions are logically equivalent to F
Torsten Hahmann Logic I 10 / 11
Class Exercises
Use a truth table to verify that (p ∧ q) ∧ ¬p is a contradiction.

Expand the truth table for the implication p → q to show that ¬p ∨ q is


logically equivalent to p → q

Torsten Hahmann Logic I 11 / 11

You might also like