p and q - Govt. PG College Una (HP)

advertisement
An Introduction
 Logic
is the science of reasoning.
 Logic
is a process by which we arrive at a
conclusion from known statements with
the use of laws of logic.
 Mathematical
Logic.
logic is called Boolean
 Sentence: It
is sensible combination of
words.
 Statement or Proposition: A statement is a
sentence in the grammatical sense
conveying a situation which is neither
imperative, interrogative nor
exclamatory.
 It is a declarative sentence which is
either true or false but not both.
 The truth or falseness of a statement is
called its truth value.
 The
difference between an ordinary
sentence and logical statement is that
whereas it is not possible to say about
truth or otherwise of an ordinary
sentence.
 It is an essential requirement for a logical
statement.
 In logical statement or Proposition the
result is in true or false.
 In ordinary sentence the result is other
then true or false.
 “3+3=8”
Is this a statement or sentence?
 This is a statement.
 But is a false statement. Its false value will
be denoted by the letter F or 0.
 “Why are you going to Bangalore ?” Is
this a statement or sentence?
 This is a sentence.
 Because it is a interrogative sentence.
1.
2.
3.


“May God bless you with happiness !”
“(x-1) 2 =x2 - 2x + 1”
“x+5=10”
The truth of the sentence is open till we
are told what x stands for.
Such a sentence is called an open
sentence. An open sentence is, thus, not
a statement.
A
statement is any meaningful,
unambiguous sentence which is either
true or false but not both.
 A statement cannot be true and false at
the same time. This fact is known as the
“law of the excluded middle”
A
compound statement is a combination
or two or more simple statements.
 In order to make a statement compound
we have to use some connectives.
 Sentential Connectives: The phrases or
words which connect two simple
statements are called “sentential
Connectives”, ”logical operators” or
simply “connectives”.
 Some
of the basic connectives are “and”,
“or”, “not”, “if then”, “if and only if”.
 When simple statements are combined to
make compound statements, then simple
statements are called “Components”.
 Simple statements are generally denoted
by small letters p, q, r, s, t,…..
 Two
propositions (i.e. compound
statements) are said to be logically
equivalent (or equal) if they have
identical truth values.
 The symbol “= “ or “=” is used for logical
equivalence.
 Any
two statements can be combined by the
connective “and” to form compound
statement called the “conjunction” of the
original statements.
E.g.
1. He is practical.
2. He is sensitive.
The conjunction is “He is practical and
sensitive”
The conjunction is denoted by p^q and read as
”p and q”
p^q is true when both p and q are true.
 Any
two statements can be combined by the
connective “or” to form compound
statement called the “disjunction” of the
original statements.
E.g.
1. There is something wrong with the teacher
2. There is something wrong with the student
The disjunction is “there is something wrong
with the teacher or with the student”
The disjunction is denoted by pVq and read as
”p or q”
pVq is false when both p and q are false.
 Negation
refers to contradiction and not
to a contrary statement.
 We should be very careful while writing
the negation of the given statement.
 The best way is to put in the word ”not” at
the proper place. Or
 To put the phrase. ”it is not the case that”
in the beginning.
 E.g.
 If
p stands for “He is a good student”.
 Negation of p, denoted by ~p or ¬p is
either
 “He is not a good student” or
 “It is not the case that he is a good
student”
 Note that: We cannot say “He is a bad
student” is the negation of p.
 Any
statement of the form “if p then q”,
where p and q are statements, is called a
conditional statement.
 Here p is sufficient for q but not essential.
 There can be q even without p.
 Let p: you work hard.
 q: you will pass.
 Now it is possible that a student may pass
who has not worked had.
 Although p is not necessary for q, q is
necessary for p. q is necessary for p. It will
not happen that one who works hard will not
pass.
 The
conditional statement “if p then q” is
denoted by p q (to be read as p
conditional q) or (p implies q).
 The conditional statement p
q is also
read as “if p then q”, “p implies q”, “p
only if q”, ”p is sufficient for q”, “q is
necessary for p”, “q if p”.
 Rule: p
q is true in all cases except
when p is true and q is false.
p
q
p
q
T
T
T
T
F
F
F
T
T
F
F
T
 The
statement “p if and only if q” is called
a bi-conditional statement and is denoted
by p q .
The bi-conditional is also read as.
1. q if and only if p.
2. q implies q and q implies p.
3. p is necessary and sufficient for q.
4. q is necessary and sufficient for p.
5. p iff q.
6. q iff p.
 Rule: p
1.
2.
q
Truth if both p and q have the same
truth value i.e. either both are true or
both are false.
False if p and q have opposite truth
values.
p
q
p
q
T
T
T
T
F
F
F
T
F
F
F
T
Tautologies: A tautology is a proposition which
is true for all the truth value of its components.
 In a truth table of tautology there will be only T’s
in last column.
 Consider the proposition p V ~p.
 Its truth table is:

p
~p
p V ~q
T
F
T
F
T
T
The proposition is always true whatever be the
truth values of its components.
 It is a tautology.

 Contradictions: A
contradiction (or
fallacies) is proposition which is false for
all truth values of its components.
 In a truth table of contradictions there
will be only F’s in the last column.
 Consider the proposition p^~p
p
~p
p^~p
 Its truth table is:
 It
is a contradiction.
T
F
F
F
T
F
 If
1.
2.
3.
p q is a direct statement, then.
q p is called its converse.
~p
~q is called its inverse.
~q
~p is called its Contrapositive.
Since p q = ~q ~p
And q p = ~ p ~q
contrapositive = direct statement
And converse = inverse
 Give
1.
2.
3.
the truth table for the statement
(p q) (~p V q)
(p ^ q) (p V q)
(~p V q) ^ (~p ^ ~q)
Download