Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Lecture Notes 3

The document discusses various types of quantifiers in logic, including existential and uniqueness quantifiers, and their implications in mathematical statements. It also covers rules of inference, such as modus ponens and modus tollens, which are used to derive conclusions from premises. Additionally, it introduces concepts related to proofs, including theorems, axioms, and the process of direct proofs.

Uploaded by

kaanaydin1441
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture Notes 3

The document discusses various types of quantifiers in logic, including existential and uniqueness quantifiers, and their implications in mathematical statements. It also covers rules of inference, such as modus ponens and modus tollens, which are used to derive conclusions from premises. Additionally, it introduces concepts related to proofs, including theorems, axioms, and the process of direct proofs.

Uploaded by

kaanaydin1441
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Existential quantifier 

• “There exists an element x in the domain such


that p(x) (is true)”
• Denote that as x p(x) where is the
existential quantifier,
• In English, “for some”, “for at least one”, or
“there is” can be used for 
• Read as “There is an x such that p(x)”, “There is
at least one x such that p(x)”, or “For some x,
p(x)”
1
Example

2
Uniqueness quantifier ! 1

• There exists a unique x such that p(x) is true


! p ( x)

• “There is exactly one”, “There is one and only


one”
• If there are two x values for which p(x) is tru
then those x s are equal to each other.

3
Quantifiers with restricted
domains

x  0, x 2  0 same as x( x  0  x 2  0)
3 3
y 0, y 0 same as y ( y 0  y 0)
2 2
z  0, z 2 same as z ( z  0  z 2)

Be careful about → and ˄ in these statements

4
Precedence of quantifiers
•  and  have higher precedence than all
logical operators from propositional calculus
x p ( x)  q ( x) (x p ( x))  q ( x) rather than x ( p ( x)  q ( x))

5
Binding variables
• When a quantifier is used on the variable x, this
occurrence of variable is bound
• If a variable is not bound, then it is free
• All variables occur in propositional function of
predicate calculus must be bound or set to a
particular value to turn it into a proposition
• The part of a logical expression to which a quantifier
is applied is the scope of this quantifier

6
Example
What are the scope of these expressions?
Are all the variables bound?

x( x  y 1)
x( p ( x)  q ( x))  xR( x)
x( p ( x)  q ( x))  yR( y )
The same letter is often used to represent variables
bound by different quantifiers with scopes
that do not overlap

7
Negating Quantified Expressions

8
Negating Quantified Expressions

9
Rules of Inference
• Proof: valid arguments that establish the truth
of a mathematical statement
• Argument: a sequence of statements that end
with a conclusion
• Valid: the conclusion or final statement of the
argument must follow the truth of proceeding
statements or premise of the argument

10
Argument and inference
• An argument is valid if and only if it is
impossible for all the premises to be true and
the conclusion to be false
• Rules of inference: we use them to deduce
(construct) new statements from statements
that we already have
• Rules of inference are basic tools for
establishing the truth of statements

11
Valid arguments in propositional
logic
• Consider the following arguments involving
propositions :
“If you have a correct password, then you can
log onto the network”
“You have a correct password” premises
therefore,
“You can log onto the network” conclusion
p q
p
q 12
Valid arguments
• (( p  q)  p)  q is tautology
• When ((p→q)˄p) is true, both p→q and p are
true, and thus q must be also be true
• This form of argument is true because when
the premises are true, the conclusion must be
true

13
Rules of inference for propositional
logic
• We can always use truth table to show an
argument form is valid
• For an argument with 10 propositional
variables, the truth table requires 210 rows
• The tautology (( p  q)  p)  q is the rule of
inference called modus ponens (mode that
affirms), or the law of detachment
p
p q
q
14
Modus Ponens
• "P implies Q. P is true. Therefore Q must also
be true.“

• If today is Tuesday, then John will go to work.


• Today is Tuesday.
• Therefore, John will go to work.

15
Example
• If the statements
"If it rains today, then we will have movie night "
and
"It is indeed raining today "
are both true,
• By modus ponens, we can conclude that
" we will have movie night "
is true.
16
Example
3 3 3
If 2 then ( 2 ) 2  ( ) 2 . We know that 2 
2 2 2
3 9
Consequently, ( 2 ) 2 2  ( ) 2 
2 4
Is it a valid argument? Is conclusion true?

• The premises of the argument are p→q and p,


and q is the conclusion
• This argument is valid by using modus ponens
• But one of the premises is false, consequently we
cannot conclude the conclusion is true
• Furthermore, the conclusion is not true
17
18
19
Modus Tollens
Modus Tollens (method of removing by taking away)

If the dog detects a cat, the dog will bark.


The dog did not bark.
Therefore, no cat was detected by the dog.

This is a valid argument since it is not possible for the


conclusion to be false if the premises are true. (It is
conceivable that there may have been a cat that the dog did
not detect, but that does not invalidate the argument; the first
premise is "if the dog detects a cat". The thing of importance
is that the dog detects or does not detect a cat, not whether
there is one.
20
Modus Tollens
• Every use of modus tollens can be converted to a use
of modus ponens.
If P, then Q. (premise)
If not Q, then not P.
Not Q . (premise)
Therefore, not P. (derived by modus ponens)

• Likewise, every use of modus ponens can be


converted to a use of modus tollens.
21
Disjunctive Syllogism
• Disjunctive syllogism (modus tollendo ponens
(MTP), mode that affirms by denying)

It is red or it is blue.
It is not blue.
Therefore, it is red.

22
Modus ponendo tollens
• Mode that denies by affirming
Not both A and B
A
Therefore, not B

• Ann and Bill cannot both win the race.


• Ann won the race.
• Therefore, Bill cannot have won the race.

23
Example
– “It is not sunny this
afternoon and it is colder
than yesterday”  p  q 1) p  q hypothesis
– “We will go swimming only if 2) p simplication using (1)
it is sunny” r p 3)r  p hypothesis
– “If we do not go swimming, 4) r modus tollens using (2) and (3)
then we will take a canoe 5) r  s hypothesis
trip”  r  s 6) s modus ponens using (4)
– “If we take a canoe trip, then 7) s  t hypothesis
we will be home by sunset”
8)t modus ponens using (6) and (7)
s t
Can we conclude
“We will be home byt sunset”?

24
Example
– “If you send me an email
message, then I will finish
my program” p  q
– “If you do not send me an 1) p  q hypothesis
email message, then I will 2) q   p contrapositive of (1)
go to sleep early”  p  r 3) p  r hypothesis
– “If I go to sleep early, then I 4)  q  r hypotheical syllogism using (2) and (3)
will wake up feeling 5)r  s hypothesis
refreshed” r  s 6)  q  s hypothetical syllogism using (4) and (5)

– “If I do not finish writing the


program, then I will wake
up feeling refreshed”q  s
25
Resolution
• Based on the tautology (( p  q)  ( p  r ))  (q  r )
• Resolvent: q  r
• Let q=r, we have ( p  q)  ( p  q)  q
• Let r=F, we have ( p  q)   p  q
• Important in logic programming, AI, etc.

26
Example
• “Jasmine is running or it
is not snowing” q  p
• “It is snowing or Bart is p r
playing soccer” q r
imply
• “Jasmine is running or
Bart is playing soccer”

27
Inference with quantified
statements
Instantiation:
c is one particular member
of the domain

Generalization:
for an arbitrary member c

“Everyone in this discrete mathematics has taken a course in calculus”


and “John is a student in this class”
imply “John has taken a course in calculus”

28
Universal modus ponens
• Use universal instantiation and modus ponens
to derive new rule
x( p ( x)  q ( x))
p (a ), where a is a particular element in the domain
 q(a)

• Assume “For all positive integers n, if n is


greater than 4, then n2 is less than 2n” is true.
Show 1002<2100
29
1.7 Introduction to proofs
• Proof: valid argument that establishes the truth of a
mathematical statement, e.g., theorem
• A proof can use hypotheses, axioms, and previously
proven theorems
• Formal proofs: can be extremely long and difficult to
follow
• Informal proofs: easier to understand and some of
the steps may be skipped, or axioms are not
explicitly stated

30
Some terminology
• Theorem: a mathematical statement that can be shown to be
true
• Proposition: less important theorem
• Axiom (postulate): a statement that is assumed to be true
• Lemma: less important theorem that is helpful in the proof of
other results
• Corollary: a theorem that can be established directly from a
theorem that has been proved
• Conjecture: a statement proposed to be true, but not proven
yet

31
Direct proofs of p→q
• First assume p is true
• Then show q must be true (using axioms,
definitions, and previously proven theorems)
• So the combination of p is true and q is false
never occurs
• Thus p→q is true
• A direct proof shows that a conditional statement p → q is
true by showing that if p is true, then q must also be true, so
that the combination p true and q false never occurs.
32
Example
• Definition:
– The integer n is even if there exists an integer k
such that n=2k, and
– n is odd if there exists an integer k such that
n=2k+1
– Note that an integer is either even or odd
• Show “If n is an odd integer, then n2 is odd”

33
Example
• Note the theorem states n( p(n)  q(n))
• By definition of odd integer, n=2k+1, where k
is some integer
• n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1
• By definition of odd integer, we conclude n2 is
an odd integer
• Consequently, we prove that if n is an odd
integer, then n2 is odd
34
Example
• “If m and n are both perfect squares, then nm is
also a perfect square (an integer a is a perfect
square if there is an integer b such that a=b2)
• By definition, there are integers s and t such
that m=s2, and n=t2
• Thus, mn=s2t2=(st)2 (using commutativity and
associativity of multiplication)
• We conclude mn is also a perfect square

35

You might also like