Logic and Proofs Quantifiers and Validity
Logic and Proofs Quantifiers and Validity
Propositional Equivalences
Two logical expressions are said to be equivalent if they have the same truth value in all
cases.
Note: for logical equivalences, please see Table 6, 7, and 8(pages 27-28)
Propositional Satisfiability
A compound proposition is satisfiable if there is an assignment of truth values to its
variables that makes it true. When the compound proposition is false for all assignments
of truth values to its variables, the compound proposition is unsatisfiable.
When we find a particular assignment of truth values that makes a compound
proposition true, we have shown that it is satisfiable; such an assignment is called a
solution of this particular satisfiability problem.
p q pvq pʌq
T T T T
T F T F
F T T F
F F F F
Example:
Determine whether the compound proposition is satisfiable :
(p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q)
Solution
p q pv ~q ~pvq ~pv~ (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q)
q
T T T T F F
T F T F T F
F T F T T F
F F T T T T
It is satisfiable
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
Predicates and Quantifiers
Predicate Logic
It is an extension of Propositional logic.
It deals with predicates, which are propositions containing variables.
Predicates
It is an expression of one or more variables determined on some specific domain.
A predicate with variables can be made a proposition by either authorizing a value to
the variable or by quantifying the variable.
It refers to a property that the subject of the statement can have.
Note:
1. The above statement can be written as P(x) where P is the predicate “is greater than 3”
and x is the variable.
2. The predicate P can be considered as a function. It tells the truth value of P(x) at x.
In math : f(x) = x+1 ; f(2) = 2+1
3. Once a value has been assigned to the variable x, the statement P(x) becomes a proposition.
4. In general, a statement involving n variables x1, x2, x,.. , xn can be denoted by P(x1, x2, x,.. , xn).
Here P is also referred to as n-place predicate or a n-ary predicate.
Definition:
Let P(x) be a statement involving the variable x and let D be a set. We call P a propositional
function(with respect to D) if for each x in D, P(x) is a proposition. We call D the domain of
discourse of P.
Examples of predicates:
1. Let P(x, y) denote "x = y"
2. Let P(a, b, c) denote "a + b + c = 0"
3. Let P(x, y) denote "x is married to y"
Exercise 1:
1. Let P(n) denote the statement “n is an odd number″ and let D be the set of positive integers.
Find the truth value of P(1) and P(2). P(1) – T ; P(2) - F
2.Let P(x) denote the statement “x > 10″. What are the truth values of P(11) and P(5)?
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
3. Let R(x,y) denote the statement “x = y + 1“. What is the truth value of the propositions
R(1,3) and R(2,1)?
4. Let P(x, y, z) denote that x + y = z and the domain of discourse D be the integers for all three
variables. Find the truth value of the propositional function.
a. P(−4, 6, 2) - T
b. P(5, 2, 10) - F
c. P(5, W, 7) - NOT A PROPOSITION
5. Let Q(x, y, z) denote that x − y = z and D be integers.
a. P(1, 2, 3) ∧ Q(5, 4, 1) - T
b. P(1, 2, 4) → Q(5, 4, 0) - T
c. P(1, 2, 3) → Q(5, 4, 0) - F
d. P(1, 2, 4) → Q(x, 4, 0) - NOT A PROPOSITION
Quantifiers
The variable of predicates is quantified by quantifiers.
We need quantifiers to formally express the meaning of the words
“all” and “some”.
https://tutorialspoint.dev/computer-science/engineering-mathematics/mathematic-logic-predicates-quantifiers
Example:
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
1. Let P(x) denote x < 0.
If D are integers then ∃x P(x) is true.
If D are positive integers then ∃x P(x) is false.
Exercise 2 :
Note: D – set of all real numbers
1. Let P(x) be the statement “x + 2 > x“. What is the truth value of the statement ∀xP(x)?
X = -5 -5+2 > -5 T
2. Let P(x) be the statement “x > 5″. What is the truth value of the statement ∃xP(x) ?
X = 2 – F, x = 7 - T
3. Let P(x) be the statement x2 – 1 > 0. What is the truth value of the statement ∀xP(x)?
x 2
4. Let P(x) be the statement = . What is the truth value of the statement ∃xP(x) ?
x +1 5
2
Uniqueness Quantifier
∃!x P(x) means that there exists one and only one x in the domain such that P(x) is true.
∃1x P(x) is an alternative notation for ∃!x P(x).
This is read as “there is one and only one x such that P(x).
Examples:
1. Let P(x) denote x + 1 = 0 and D are the integers then ∃!x P(x) is true.
2. Let P(x) denote x > 0 and D are the integers. Then ∃!x P(x) is false.
Variables in the scope of some quantifier are called bound variables. All other variables
in the expression are called free variables.
The scope of the quantifier is the part of a logical expression to which the quantifier is
applied.
Examples:
1. The statement ∃x(x + y = 1):
- variable x is bound by the existential quantification ∃x,
- variable y is free because it is not bound by a quantifier and no value is assigned to
this variable.
2. The statement ∃x(P (x) ∧ Q(x)) ∨ ∀xR(x):
- all variables are bound.
- the scope of ∃x is P (x) ∧ Q(x) because ∃x is applied only to P (x) ∧ Q(x)
- the scope of ∀x, is the expression R(x)
A propositional function that does not contain any free variables is a proposition and has
a truth value.
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
Precedence of Quantifiers
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
Quantifiers ∀ and ∃ have higher precedence then all logical operators.
∀x P(x) ∧ Q(x) means (∀x P(x)) ∧ Q(x). In particular, this expression contains a free
variable. ∀x (P(x) ∧ Q(x)) means something different.
Quantifiers as Conjunctions/Disjunctions
If the domain is finite then universal/existential quantifiers can be expressed by
conjunctions/disjunctions.
Example:
If D consists of the integers 1,2, and 3, then
∀x P(x) ≡ P(1) ∧ P(2) ∧ P(3)
∃x P(x) ≡ P(1) ∨ P(2) ∨ P(3)
There are two very important equivalences involving quantifiers, given below:
https://www.geeksforgeeks.org/mathematical-logic-predicates-quantifiers-set-2/
Symbolically:
¬∀x J(x) and ∃x¬J(x) are equivalent
Consider
∃x J(x) - “There is a student in class IT who has taken a course in Java.
Where : J(x) - “x has taken a course in Java.”
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
Symbolically
¬∃x J(x) and ∀x ¬J(x) are equivalent
¬∃x J(x) ≡ ∀x ¬J(x)
Examples :
1. What are the negations of the statements:
A. “There is an honest politician” D – ALL POLITICIANS
H(x) – “x is honest” - ∃xH(x)
ANS:
Negation : ~∃x H(x) or ∀x~H(x)
C. ∀x(x2 > x)
Negation : -∀x(x2 >x) or
D. ∃x(x2 = 2)
Negation : ~∃x(x2=2)
Nested Quantifiers
Two quantifiers are nested if one is within the scope of the other.
Example:
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
Example:
1. Translate the following statement into English.
a. ∀x ∀y (x + y = y + x) Domain: real numbers
English : For all x and y, x plus y is equal to y plus x
2. let L(x,y) be the propositional function “x loves y”, D – set of all living people
Write each proposition symbolically.
a. Someone loves everybody - Ǝx∀yL(x, y)
Order of Quantifiers
The order of nested universal quantifiers in a statement without other quantifiers
can be changed without changing the meaning of the quantified statement.
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
https://i.stack.imgur.com/XWi0V.png
Example:
1. Assume P(x,y) is (xy = yx). Translate the following statement into English.
∀x ∀y P(x,y) domain: real numbers
If this module has errors, please do not hesitate to report such errors.
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/
References:
1. https://www.geeksforgeeks.org/mathematic-logic-predicates-quantifiers/
2.https://www.tutorialspoint.com/discrete_mathematics/discrete_mathematics_predicate_logic.htm
This study source was downloaded by 100000889212900 from CourseHero.com on 04-14-2025 05:20:01 GMT -05:00
https://www.coursehero.com/file/108511753/LOGIC-AND-PROOFS-QUANTIFIERS-AND-VALIDITY-ITD-1docx/