COT3100: Propositional Logic
1
Logic and Proofs
Alper Üngör
Jan 2007
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
2
1 – Foundations of Logic
Mathematical Logic is a tool for working with complicated compound statements. It
includes:
A language for expressing them.
A concise notation for writing them.
A methodology for objectively reasoning about their truth or falsity.
It is the foundation for expressing formal proofs in all branches of mathematics.
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
3
☞ Propositional logic (1.1-1.2):
➳ Basic definitions. (1.1)
➳ Equivalence rules & derivations. (1.2)
☞ Predicate logic (1.3-1.4)
➳ Predicates.
➳ Quantified predicate expressions.
➳ Equivalences & derivations.
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
4
2 – Propositional Logic
Propositional Logic is the logic of compound statements built from simpler statements
using so-called Boolean connectives.
Some applications in computer science:
Design of digital electronic circuits.
Expressing conditions in programs.
Queries to databases & search engines.
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
5
A proposition is a declarative statement (i.e., a declares a fact) with a definite meaning,
having a truth value that is either true (T) or false (F) (never both, neither, or somewhere
in between).
(However, you might not know the actual truth value, and it might be
situation-dependent.)
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
6
Examples of Propositions:
•
•
•
•
”It is raining.” (In a given situation.)
”Beijing is the capital of China.”
”1 + 2 = 3”
”Iraq has Weapons of Mass Destruction.”
The following are NOT propositions:
•
•
•
•
•
”Are you kidding me?” (interrogative, question)
”La la la la la.” (meaningless interjection)
”Go Gators!” (imperative, command)
”Yeah, I sorta dunno, whatever...” (vague)
”1 + 2” (expression with a non-true/false value)
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
7
5 – Operators/Connectives
An operator or connective combines one or more operand expressions into a larger
expression. (e.g., ”+” in numeric exprs.)
• Unary operators take 1 operand (e.g., -3)
• Binary operators take 2 operands (eg 3 * 4).
Propositional or Boolean operators operate on propositions (truth values) instead of on
numbers.
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
Formal Name
Nickname
Arity
Symbol
Negation operator
not
unary
¬
Conjunction operator
and
binary
∧
Disjunction operator
or
binary
∨
Exclusive-OR operator
xor
binary
⊕
Implication operator
implies
binary
→
Biconditional operator
iff
binary
↔
COT3100: Applications of Discrete Structures
8
Jan 2007
Alper Üngör
COT3100: Propositional Logic
9
7 – Negation
The unary negation operator ”¬” (NOT) transforms a proposition into its logical negation.
E.g. If p = ”I have brown hair.” then ¬p = ”I do not have brown hair.”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
10
8 – Conjunction
The conjunction operator ∧ (AND) combines two propositions to form their logical
conjunction.
E XAMPLE .
p = ”I will have salad for lunch.”
q = ”I will have steak for dinner.”
p ∧ q = ”I will have salad for lunch and I will have steak for dinner.”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
11
9 – Disjunction
The disjunction operator ∨ (OR) combines two propositions to form their logical
disjunction.
E XAMPLE .
p = ”My car has a bad engine.”
q = ”My car has a bad carburetor.”
p ∨ q = ”Either my car has a bad engine, or my car has a bad carburetor.”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
12
10 – Exclusive-Or
The exclusive-or of p and q , denoted by p ⊕ q is the proposition that is true when
exactly on of p and q is true and is false otherwise.
E XAMPLE .
p = ”I will eat soup.”
q = ”I will eat salad.”
p ⊕ q = ”I will eat either a soup or a salad (but not both!)”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
13
11 – Implication
→ q is the proposition ”if p, then q ”.
It is false when p is true and q false, and true otherwise.
{hypothesis, antecedent, premise} → {conclusion, consequence}
The conditional statement p
E XAMPLE .
p = ”It is sunny today.”
q = ”I will go surfing.”
p → q = ”If it is sunny today, then I will go surfing.”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
14
12 – Implication
→ q is the proposition ”if p, then q ”.
It is false when p is true and q false, and true otherwise.
{hypothesis, antecedent, premise} → {conclusion, consequence}
The conditional statement p
E XAMPLE .
p = ”It is sunny today.”
q = ”1=2.”
p → q = ”If it is sunny today, then 1=2.”
E XAMPLE . (1=2) → ”turtles can fly”.
E XAMPLE . ”If the moon is made of green cheese, then I am richer than Bill Gates.”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
15
13 – Implication (alternative ways)
”p implies q”
”if p, then q”
”if p, q”
”when p, q”
”whenever p, q”
”q if p”
”q when p”
”q whenever p”
”p only if q”
”p is sufficient for q”
”q is necessary for p”
”q follows from p”
”q is implied by p”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
16
14 – Converse,Contrapositive,Inverse
For an implication p
E XAMPLE .
→ q , its converse is q → p,
its contrapositive is ¬q → ¬p
its inverse is ¬p → ¬q
p → q = ”The Gators win whenever the QB plays well”.
p → q = ”If the QB plays well, then the Gators win”.
q → p= ”If the Gators win, then the QB plays well”.
¬q → ¬p= ”If the Gators does not win, then the QB does not play well”
¬p → ¬q = If the QB does not play well, then the Gators does not win”.
Two compound propositions that always have the same truth value are equivalent.
An implication is equivalent to its contrapositive.
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
17
15 – BiConditional
The biconditional statement p
↔ q is the proposition ”p if and only iff q ”. It is true when
p and q have the same truth values, and is false otherwise.
p ↔ q has exactly the same truth value as (p → q) ∧ (q → p).
E XAMPLE. ”You can take the flight if and only if you buy a ticket.”
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
18
16 – Large Compound Propositions
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
19
17 – Precedence
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
COT3100: Propositional Logic
20
18 – Bit Operations
A bit is a symbol with two possible values, namely 0 and 1.
A variable is called a Boolean variable if its value is true or false.
Consequently, a Boolean variable can be represented using a bit. Computer bit
operations correspond to the logical connectives.
COT3100: Applications of Discrete Structures
Jan 2007
Alper Üngör
© Copyright 2026 Paperzz