Mathematicallogic Unit II
Mathematicallogic Unit II
Definition: A Proposition (or statement) is a declarative sentence which is either true or false but not both
Connectives
Definition: Connective is an operation which is used to connect two or more than two statements.
Simply it is called sentential connectives. It is also known as Local Connectives or Logical
Operators
Logical connectivity
Logical connectivity can be described as the operators that are used to connect one or more than one propositions or predicate logic. On the basis of the input
logic and connectivity, which is used to connect the propositions, we will get the resultant logic. The propositional logic is used to contain 5 basic connectives,
which are described as follows:
1. Negation
2. Conjunction
1
3. Disjunction
4. Conditional
5. Bi-conditional
Negation
The symbol ∼ is used to indicate the negation. If there is a proposition p, then the negation of p
will also be a proposition, which contains the following properties:
Truth table:
p ∼p
T F
F T
Example:
1. If p: I am a good student.
2. Then the negation of p will be:
3. ∼p: I am not a good student.
Conjunction
2
The conjunction is indicated by the symbol ∧. If there are two propositions, p and q, then the
conjunction of p and q will also be a proposition, which contains the following properties:
o When p and q are true, then the conjunction of them will be true.
o When p and q are false, then the conjunction of them will be false.
Truth table:
p q p∧q
T T T
T F F
F T F
F F F
Example:
Disjunction:
Disjunction is indicated by the symbol ∨. If there are two propositions, p and q, then the
disjunction of p and q will also be a proposition, which contains the following properties:
o When p and q are false, then the disjunction of them will be false.
o When either p or q or both are true, then the disjunction of them will be true
Truth table:
p q p∨q
T T T
T F T
F T T
F F F
Example:
3
4. Then the disjunction of p and q will be:
p ∨ q: I am a good student or I like my computer teacher.
Conditional:
The conditional propositional is also known as the implication proposition. It is indicated by the
symbol →. If there are two propositions, p and q, then the conditional of p and q will also be a
proposition, which contains the following properties:
o If there is a proposition that has the form "if p then q", then that type of proposition will be
known as the implication or conditional proposition.
o When p is false, or p and q are true, then the implication of them will be true.
o When p is true, and q is false, then the implication of them will be false.
Truth table:
P q p→q
T T T
T F F
F T T
F F T
Example
If x = y and y = z, then x = c.
If I learn very hard, then I will get good marks in the exam.
Bi-conditional:
The bi-conditional propositional is also known as the bi-implication proposition. It is indicated by the
symbol ↔. If there are two propositions, p and q, then the bi-conditional of p and q will also be a
proposition, which contains the following properties:
o If there is a proposition that has the form "p if and only if q", then that type of proposition will be
known as a bi-implication or bi-conditional proposition.
o When both p and q are true, or p and q both are false, then the bi-implication of them will be true.
o In all the other cases, then the bi-conditional of them will be false.
Truth table:
4
p q p↔q
T T T
T F F
F T F
F F T
Example:
Compound Propositions
The propositions will be known as compound propositions if they are formed by the combination of one
or more atomic propositions with the help of connectives. We can construct this proposition by the
combination of simple and atomic propositions with the help of parenthesis and logical connectives.
Compound propositions are indicated with the help of capital letters such as P, Q, R, S, etc.
Tautology
Definition : Let x and y are two given statements. As per the definition of tautology, the compound
statement should be true for every value.
x y x⇒y y⇒x Tautology = (x ⇒ y) ∨ (y ⇒ x) Contradiction = ~(x ⇒ y) ∨ (y ⇒ x)
T T T T T F
T F F T T F
F T T F T F
F F T T T F
5
Problem 1. Show that p⇒(p∨q) is a tautology.
Solution:
p q p∨q p⇒(p∨q)
T T T T
T F T T
F T T T
F F F T
Construct the truth table for a) ¬(P ^ Q) b) (¬ P ¿ V (¬Q) and check it is tautology or not
a) ¬(P ^ Q)
P Q P^Q ¬¿ P ^ Q)
T T T F
T F F T
F T F T
F F F T
It is not tautology
b) (¬ P ¿V (¬Q)
P Q ¬P ¬Q ¿P) V(¬Q)
T T F F F
T F F T T
F T T F T
F F T T T
It is not tautology
6
T T T F T
T F T T T
F T T F T
F F F T T
It is a tautology
Problem-3 : Construct the truth table for S :( P →Q ) ↔ (¬ P V Q) also check tautology or not
P Q P→Q ¬P ¬P V Q :( P →Q ) ↔ (¬ P V Q)
T T T F T T
T F F F F T
F T T T T T
F F T T T T
It is tautology
Contradiction :
Contigency :
Definition ||: A statement formula which is neither Tautology nor contradiction is called contingency
Eg. P ↔ Q is a Contigency
T T T F T F
T F F F F F
F T F T F F
F F F F T F
Show that the truth values of the formula 𝑃˄(𝑃 → 𝑄) → 𝑄 are independent of their
7
Component
Solution:
T T T T T
T F F F T
F T T F T
F F T F T
It Is tautology
Problem : Prove that 𝑷 → 𝑸 ˄ 𝑸 → 𝑹 → 𝑷 → 𝑹
Solution:
Let S: 𝑃 → 𝑄 ˄ 𝑄 → 𝑅 → 𝑃 → 𝑅
To prove: S is a tautology
P Q R 𝑃→𝑄 Q→R 𝑃→𝑅 (𝑃 → 𝑄) ˄ (𝑄 → 𝑅)
S
T T T T T T T T
T T F T F F F T
T F T F T T F T
T F F F T T T T
F T T T T T T T
F T F T F T F T
F F T T T T T T
F F F T T T T T
PROPOSITIONAL EQUIVALENCE:
Logical Equivalence:
Let p and q be two statements formulas, p is said to be logically equivalent to q if p & q have the
same set of truth values or equivalently p & q are logically equivalent if 𝑝 ↔ 𝑞 is tautology.
Hence, 𝑝 ⇔ 𝑞 if and only if 𝑝 ↔ 𝑞 is a tautology.
8
Logical Implication or Tautological Implication
A statement formula A logically implies another, statement formula B if and only if 𝐴 → 𝐵 is a
tautology.
∴ 𝐴 ⇒ 𝐵 [A logically iff 𝐴 → 𝐵 is tautology, implies B]
If 𝐴 ⇒ 𝐵 , then
B is called consequent.
Further 𝐴 ⇒ 𝐵 guarantees that B has the truth value T whenever A has the truth value T.
∴ In order to show any of the given implications, it is sufficient to show that an assignment of the truth
value T to the antecedent of the given conditional leads to the truth value T for the consequent.
Prove 𝑃 ⇒ (Q →P)
P Q Q→P 𝑃 → (𝑄 → P)
T T T T
T F T T
F T F T
F F T T
Home work P ^ (P → Q) ⇒ Q
Prove 𝑃 → 𝑄 ⇔ ¬𝑄 → ¬𝑃
P Q 𝑃→𝑄 ¬Q ¬𝑃 ¬𝑄 → ¬𝑃
T T T F F T
T F F T F F
F T T F T T
F F T T T T
Prove [ [ ( 𝑃 → 𝑄) → Q] ⇔ P V Q
P Q 𝑃→𝑄 PVQ [𝑃 → 𝑄) → Q]
T T T T T
T F F T T
9
F T T T T
F F T F F
Predicates Calculus :
Other Examples
1. “ x is a man”.
Here Predicate is is a man “ and it is denoted by M. Subject is “x” and it is denoted
by x.
Therefore the given statement “x isa a man” can be denoted by M(x).
2. “ Rani is a girl”
Here again, Predicate is “is a girl” and it is denoted by G and subject is “Rani” and it
is denoted by v
3. “Sam is poor and Ram is intelligent”
The statement “Sam is poor” can be represented by P(s) where P represents
predicate “is poor” and s represents subject “Sam”.
The statement “Ram is intelligent” can be represented by I(r ) where I
represents predicate “is intelligent” and r represents subject “ Ram”
The given statement “Sam is poor and Ram is intelligent” can be symbolized
as P(s) ʌ I (r)
Quantifiers :
Quantifiers is one which is used to quantify the nature of variables.
There are two important quantifiers which are for “all” and for “some “ where “some” means
“atleast one”.
1. Universal Quantifier 2. Existential Quantifier
Defnition : Universal Quantifier : The quantifier “for all x “ is called the Universal quantifier. It is
denoted by the symbol “(∀ x∨( x )) ”. The universal quantifier is equivalent each of the following phrases.
1. For all x
2. For every x
3. For each x
4. Every thing x is such that
5. Each thing x is such that
Example -1.
“Every apple is red”
The above statement can be restated as
For all x if x is an apple then x is red.
Then symbolic form using universal quantifier as
10
A(x) : x is an apple
R(x) : x is read
We write to the symbolic form as
( ∀ x ¿ (A ( x ) → R ( x ) )
Example -2
“Everything is yellow”
For all statement it into symbolic form using universal quantifier as
Y(x) : x is yellow
Symbolic form as
(∀ x ¿
2.Existential Quantifier
Definition : The quantifier for “ some x “ is called the Existential Quantifier . It is denoted by the
symbol “(∃ x )”. The existential quantifier is also equivalent each of the following phrases.
1. For some x
2. Some x such that
3. There exists an x such that
4. There is an x such that
5. There is atleast one x such that
Example :
“Some men are clever”
The above statement as
“there is an x such that x is a man and x is clever “
Symbolic form using Existential quantifier as
Let Mx() : x is a man
and C(x) : x is clever
Symbolic form as
(∃ x ¿( M ( x ) ʌ C ( x ) )
11
Let P(x) : x is a person
L(x) : x is a lover
R(x, y) : x loves y
The given statement can be restated as
“For all x if x is a person than for all y, if y is a person and y is a lover than x loves
y“
∴n It’s symbolic form :
( ∀ x ¿ ¿ ^ L(y) → R(x, y) )
Solution :
Choose the element 6 in A
Let x = 6
Implies ( x 2 = 36)
Obviosuly 36 > 25
Truth value of (∃ x ∈ A ¿( x 2 >25) istrue .
2. Method of contrapositive :
¿ H
In order to prove H ¿ .m ⇒ C, if we prove
¿ H
¬ C ⇒ ¬ ( H ¿ .m ¿ . This method is called contrapositive method.
Function :
Defintion: IIn mathematics, a function is a set of inputs with a single output in each case. Every
function has a domain and range. The domain is the set of independent values of the variable x
for a relation or a function is defined. In simple words, the domain is a set of x-values that
generate the real values of y when substituted in the function. Eg. { (1,1), (2,4), (3, 9), (4,16) }
Here domain is 1,2,3,4 and range is 1,2, 4, 9 and 16 the function is x 2
12
Eg.
13
One to One Function
A one-to-one function is defined by f: A → B such that every element of set A is connected to a distinct
element in set B. The one-to-one function is also called an injective function. Here every element of the
domain has a distinct image or co-domain element for the given function .
A many to one function is defined by the function f: A → B, such that more than one element of the set A
are connected to the same element in the set B. In a many to one function, more than one element has the
same image. In a many-to-one function, if there is only a single value in the codomain which is mapped
with all the elements of the domain, then it becomes a constant function.
Onto Function
In an onto function, every codomain element is related to the domain element. i.e., In an onto function, no
element of codomain is left without being mapped.For a function defined by f: A → B, such that every
element in set B has a pre-image in set A. The onto function is also called a subjective function.
A function that is both a one and onto function is called a bijective function. Here every element of the
domain is connected to a distinct element in the codomain and every element of the codomain has a pre-
image. Also in other words every element of set A is connected to a distinct element in set B, and there is
not a single element in set B which has been left out.
Into Function
Into function is exactly opposite in properties to an onto function. Here there are certain elements in the
co-domain that do not have any pre-image. The elements in set B are excess and are not connected to any
elements in set A.
The order of function is an important thing while dealing with the composition of functions since (f ∘ g)
(x) is not equal to (g ∘ f) (x).
14
Example: If f(x) = 3x+1 and g(x) = x2 , then f of g of x, f(g(x)) = f(x2) = 3x2+1.
15
= f ∘ g(3x)
= f(2(3x))
= f(6x)
= 6x
If x = -1, then;
[f ∘ (g ∘ h)] (-1) = 6(-1) = -6
Section – B
11.a) i) Explain the various types of connectives with an example [10]
ii) Construct the truth table for a) ¬(P ^ Q) b) (¬ P ¿V (¬Q) and check it is tautology or not
[06]
12.a) i) Construct the truth table for S :( P →Q ) ↔ (¬ P V Q) also check tautology or not
[08]
ii) Show that the truth values of the formula 𝑃˄(𝑃 → 𝑄) → 𝑄 are independent of their
Component [08]
16
17