SlideShare a Scribd company logo
1 of 48
R. Johnsonbaugh, 
Discrete Mathematics 
5th edition, 2001 
Chapter 1 
Logic and proofs
Logic 
 Logic = the study of correct reasoning 
 Use of logic 
 In mathematics: 
 to prove theorems 
 In computer science: 
 to prove that programs do what they are 
supposed to do
Section 1.1 Propositions 
 A proposition is a statement or sentence 
that can be determined to be either true or 
false. 
 Examples: 
 “John is a programmer" is a proposition 
 “I wish I were wise” is not a proposition
Connectives 
If p and q are propositions, new compound 
propositions can be formed by using 
connectives 
 Most common connectives: 
 Conjunction AND. Symbol ^ 
 Inclusive disjunction OR Symbol v 
 Exclusive disjunction OR Symbol v 
 Negation Symbol ~ 
 Implication Symbol ® 
 Double implication Symbol «
Truth table of conjunction 
 The truth values of compound propositions 
can be described by truth tables. 
 Truth table of conjunction 
p q p ^ q 
T T T 
T F F 
F T F 
F F F 
 p ^ q is true only when both p and q are true.
Example 
 Let p = “Tigers are wild animals” 
 Let q = “Chicago is the capital of Illinois” 
 p ^ q = "Tigers are wild animals and 
Chicago is the capital of Illinois" 
 p ^ q is false. Why?
Truth table of disjunction 
 The truth table of (inclusive) disjunction is 
p q p v q 
T T T 
T F T 
F T T 
F F F 
 p Ú q is false only when both p and q are false 
 Example: p = "John is a programmer", q = "Mary is a lawyer" 
 p v q = "John is a programmer or Mary is a lawyer"
Exclusive disjunction 
 “Either p or q” (but not both), in symbols p Ú q 
p q p v q 
T T F 
T F T 
F T T 
F F F 
 p Ú q is true only when p is true and q is false, 
or p is false and q is true. 
 Example: p = "John is programmer, q = "Mary is a lawyer" 
 p v q = "Either John is a programmer or Mary is a lawyer"
Negation 
 Negation of p: in symbols ~p 
p ~p 
T F 
F T 
 ~p is false when p is true, ~p is true when p is 
false 
 Example: p = "John is a programmer" 
 ~p = "It is not true that John is a programmer"
More compound statements 
 Let p, q, r be simple statements 
 We can form other compound statements, 
such as 
 (pÚq)^r 
 pÚ(q^r) 
 (~p)Ú(~q) 
 (pÚq)^(~r) 
 and many others…
Example: truth table of (pÚq)^r 
p q r (p Ú q) ^ r 
T T T T 
T T F F 
T F T T 
T F F F 
F T T T 
F T F F 
F F T F 
F F F F
1.2 Conditional propositions 
and logical equivalence 
 A conditional proposition is of the form 
“If p then q” 
 In symbols: p ® q 
 Example: 
 p = " John is a programmer" 
 q = " Mary is a lawyer " 
 p ® q = “If John is a programmer then Mary is 
a lawyer"
Truth table of p ® q 
p q p ® q 
T T T 
T F F 
F T T 
F F T 
 p ® q is true when both p and q are true 
or when p is false
Hypothesis and conclusion 
 In a conditional proposition p ® q, 
p is called the antecedent or hypothesis 
q is called the consequent or conclusion 
 If "p then q" is considered logically the 
same as "p only if q"
Necessary and sufficient 
 A necessary condition is expressed by the 
conclusion. 
 A sufficient condition is expressed by the 
hypothesis. 
 Example: 
If John is a programmer then Mary is a lawyer" 
 Necessary condition: “Mary is a lawyer” 
 Sufficient condition: “John is a programmer”
Logical equivalence 
 Two propositions are said to be logically 
equivalent if their truth tables are identical. 
p q ~p Ú q p ® q 
T T T T 
T F F F 
F T T T 
F F T T 
 Example: ~p Ú q is logically equivalent to p ® q
Converse 
 The converse of p ® q is q ® p 
p 
q p ® q q ® p 
T T T T 
T F F T 
F T T F 
F F T T 
These two propositions 
are not logically equivalent
Contrapositive 
 The contrapositive of the proposition p ® q is 
~q ® ~p. 
p q p ® q ~q ® ~p 
T T T T 
T F F F 
F T T T 
F F T T 
They are logically equivalent.
Double implication 
 The double implication “p if and only if q” is 
defined in symbols as p « q 
p q p « q (p ® q) ^ (q ® p) 
T T T T 
T F F F 
F T F F 
F F T T 
p « q is logically equivalent to (p ® q)^(q ® p)
Tautology 
 A proposition is a tautology if its truth table 
contains only true values for every case 
 Example: p ® p v q 
p q p ® p v q 
T T T 
T F T 
F T T 
F F T
Contradiction 
 A proposition is a tautology if its truth table 
contains only false values for every case 
 Example: p ^ ~p 
p p ^ (~p) 
T F 
F F
De Morgan’s laws for logic 
 The following pairs of propositions are 
logically equivalent: 
 ~ (p Ú q) and (~p)^(~q) 
 ~ (p ^ q) and (~p) Ú (~q)
1.3 Quantifiers 
 A propositional function P(x) is a statement 
involving a variable x 
 For example: 
 P(x): 2x is an even integer 
 x is an element of a set D 
 For example, x is an element of the set of integers 
 D is called the domain of P(x)
Domain of a propositional function 
 In the propositional function 
P(x): “2x is an even integer”, 
the domain D of P(x) must be defined, for 
instance D = {integers}. 
 D is the set where the x's come from.
For every and for some 
 Most statements in mathematics and 
computer science use terms such as for 
every and for some. 
 For example: 
 For every triangle T, the sum of the angles of T 
is 180 degrees. 
 For every integer n, n is less than p, for some 
prime number p.
Universal quantifier 
 One can write P(x) for every x in a domain D 
 In symbols: "x P(x) 
 " is called the universal quantifier
Truth of as propositional function 
 The statement "x P(x) is 
 True if P(x) is true for every x Î D 
 False if P(x) is not true for some x Î D 
 Example: Let P(n) be the propositional 
function n2 + 2n is an odd integer 
"n Î D = {all integers} 
 P(n) is true only when n is an odd integer, 
false if n is an even integer.
Existential quantifier 
 For some x Î D, P(x) is true if there exists 
an element x in the domain D for which P(x) is 
true. In symbols: $x, P(x) 
 The symbol $ is called the existential 
quantifier.
Counterexample 
 The universal statement "x P(x) is false if 
$x Î D such that P(x) is false. 
 The value x that makes P(x) false is called a 
counterexample to the statement "x P(x). 
 Example: P(x) = "every x is a prime number", for 
every integer x. 
 But if x = 4 (an integer) this x is not a primer 
number. Then 4 is a counterexample to P(x) 
being true.
Generalized De Morgan’s 
laws for Logic 
 If P(x) is a propositional function, then each 
pair of propositions in a) and b) below have 
the same truth values: 
a) ~("x P(x)) and $x: ~P(x) 
"It is not true that for every x, P(x) holds" is equivalent 
to "There exists an x for which P(x) is not true" 
b) ~($x P(x)) and "x: ~P(x) 
"It is not true that there exists an x for which P(x) is 
true" is equivalent to "For all x, P(x) is not true"
Summary of propositional logic 
 In order to prove the 
universally quantified 
statement "x P(x) is 
true 
 It is not enough to 
show P(x) true for 
some x Î D 
 You must show P(x) is 
true for every x Î D 
 In order to prove the 
universally quantified 
statement "x P(x) is 
false 
 It is enough to exhibit 
some x Î D for which 
P(x) is false 
 This x is called the 
counterexample to 
the statement "x P(x) 
is true
1.4 Proofs 
 A mathematical system consists of 
 Undefined terms 
 Definitions 
 Axioms
Undefined terms 
 Undefined terms are the basic building blocks of 
a mathematical system. These are words that 
are accepted as starting concepts of a 
mathematical system. 
 Example: in Euclidean geometry we have undefined 
terms such as 
Point 
Line
Definitions 
 A definition is a proposition constructed from 
undefined terms and previously accepted 
concepts in order to create a new concept. 
 Example. In Euclidean geometry the following 
are definitions: 
 Two triangles are congruent if their vertices can 
be paired so that the corresponding sides are 
equal and so are the corresponding angles. 
 Two angles are supplementary if the sum of their 
measures is 180 degrees.
Axioms 
 An axiom is a proposition accepted as true 
without proof within the mathematical system. 
 There are many examples of axioms in 
mathematics: 
 Example: In Euclidean geometry the following are 
axioms 
 Given two distinct points, there is exactly one line that 
contains them. 
 Given a line and a point not on the line, there is exactly one 
line through the point which is parallel to the line.
Theorems 
 A theorem is a proposition of the form p ® q 
which must be shown to be true by a 
sequence of logical steps that assume that p 
is true, and use definitions, axioms and 
previously proven theorems.
Lemmas and corollaries 
 A lemma is a small theorem which is 
used to prove a bigger theorem. 
 A corollary is a theorem that can be 
proven to be a logical consequence of 
another theorem. 
 Example from Euclidean geometry: "If the 
three sides of a triangle have equal length, 
then its angles also have equal measure."
Types of proof 
 A proof is a logical argument that consists of a 
series of steps using propositions in such a 
way that the truth of the theorem is 
established. 
 Direct proof: p ® q 
 A direct method of attack that assumes the truth of 
proposition p, axioms and proven theorems so that 
the truth of proposition q is obtained.
Indirect proof 
The method of proof by contradiction of a 
theorem p ® q consists of the following 
steps: 
1. Assume p is true and q is false 
2. Show that ~p is also true. 
3. Then we have that p ^ (~p) is true. 
4. But this is impossible, since the statement p ^ (~p) is 
always false. There is a contradiction! 
5. So, q cannot be false and therefore it is true. 
OR: show that the contrapositive (~q)®(~p) 
is true. 
 Since (~q) ® (~p) is logically equivalent to p ® q, then the 
theorem is proved.
Valid arguments 
 Deductive reasoning: the process of reaching a 
conclusion q from a sequence of propositions p1, 
p2, …, pn. 
 The propositions p1, p2, …, pn are called premises 
or hypothesis. 
 The proposition q that is logically obtained 
through the process is called the conclusion.
Rules of inference (1) 
1. Law of detachment or 
modus ponens 
 p ® q 
 p 
 Therefore, q 
2. Modus tollens 
 p ® q 
 ~q 
 Therefore, ~p
Rules of inference (2) 
3. Rule of Addition 
 p 
 Therefore, p Ú q 
4. Rule of simplification 
 p ^ q 
 Therefore, p 
5. Rule of conjunction 
 p 
 q 
 Therefore, p ^ q
Rules of inference (3) 
6. Rule of hypothetical syllogism 
 p ® q 
 q ® r 
 Therefore, p ® r 
7. Rule of disjunctive syllogism 
 p Ú q 
 ~p 
 Therefore, q
Rules of inference for 
quantified statements 
1. Universal instantiation 
 " xÎD, P(x) 
 d Î D 
 Therefore P(d) 
2. Universal generalization 
 P(d) for any d Î D 
 Therefore "x, P(x) 
3. Existential instantiation 
 $ x Î D, P(x) 
 Therefore P(d) for some 
d ÎD 
4. Existential generalization 
 P(d) for some d ÎD 
 Therefore $ x, P(x)
1.5 Resolution proofs 
 Due to J. A. Robinson (1965) 
 A clause is a compound statement with terms separated 
by “or”, and each term is a single variable or the 
negation of a single variable 
 Example: p Ú q Ú (~r) is a clause 
(p ^ q) Ú r Ú (~s) is not a clause 
 Hypothesis and conclusion are written as clauses 
 Only one rule: 
 p Ú q 
 ~p Ú r 
 Therefore, q Ú r
1.6 Mathematical induction 
 Useful for proving statements of the form 
" n Î A S(n) 
where N is the set of positive integers or natural 
numbers, 
A is an infinite subset of N 
S(n) is a propositional function
Mathematical Induction: 
strong form 
 Suppose we want to show that for each positive 
integer n the statement S(n) is either true or 
false. 
 1. Verify that S(1) is true. 
 2. Let n be an arbitrary positive integer. Let i be a 
positive integer such that i < n. 
 3. Show that S(i) true implies that S(i+1) is true, i.e. 
show S(i) ® S(i+1). 
 4. Then conclude that S(n) is true for all positive 
integers n.
Mathematical induction: 
terminology 
 Basis step: Verify that S(1) is true. 
 Inductive step: Assume S(i) is true. 
Prove S(i) ® S(i+1). 
 Conclusion: Therefore S(n) is true for all 
positive integers n.

More Related Content

What's hot

Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1blaircomp2003
 
Truth tables
Truth tablesTruth tables
Truth tableswalkerlj
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical inductionKriti Varshney
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical LogicJoey Valdriz
 
Rules of inference
Rules of inferenceRules of inference
Rules of inferenceharman kaur
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategyallyn joy calcaben
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
mathematical induction
mathematical inductionmathematical induction
mathematical inductionankush_kumar
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical InductionEdelyn Cagas
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inferenceraksharao
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional LogicJanet Stemwedel
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1 Ali Usman
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematicsasad faraz
 

What's hot (20)

Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
Set in discrete mathematics
Set in discrete mathematicsSet in discrete mathematics
Set in discrete mathematics
 
Truth tables
Truth tablesTruth tables
Truth tables
 
Truth table
Truth tableTruth table
Truth table
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Rules of inference
Rules of inferenceRules of inference
Rules of inference
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
 
Conditional Probability
Conditional ProbabilityConditional Probability
Conditional Probability
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
mathematical induction
mathematical inductionmathematical induction
mathematical induction
 
Mathematical Induction
Mathematical InductionMathematical Induction
Mathematical Induction
 
Unit 1 rules of inference
Unit 1  rules of inferenceUnit 1  rules of inference
Unit 1 rules of inference
 
Logic
LogicLogic
Logic
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional Logic
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
 

Viewers also liked

Unit 5 Geometry Logic Vocabulary
Unit 5 Geometry Logic VocabularyUnit 5 Geometry Logic Vocabulary
Unit 5 Geometry Logic Vocabularyrrmwpease
 
IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014
IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014
IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014Joseph Biron
 
Limits of Computation
Limits of ComputationLimits of Computation
Limits of ComputationJoshua Reuben
 
The logic of informal proofs
The logic of informal proofsThe logic of informal proofs
The logic of informal proofsBrendan Larvor
 
Five Mill Tree Method 1208
Five Mill Tree Method 1208Five Mill Tree Method 1208
Five Mill Tree Method 1208David Szetela
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2blaircomp2003
 
Understanding arguments
Understanding argumentsUnderstanding arguments
Understanding argumentsMclavin Love
 
8 chapter eightpowerpoint
8 chapter eightpowerpoint8 chapter eightpowerpoint
8 chapter eightpowerpointsagebennet
 
Abbreviated Truth Tables
Abbreviated Truth TablesAbbreviated Truth Tables
Abbreviated Truth Tablesdyeakel
 
Chapter 8 induction
Chapter 8 inductionChapter 8 induction
Chapter 8 inductionscrasnow
 
6.4 Truth Tables For Arguments
6.4   Truth Tables For Arguments6.4   Truth Tables For Arguments
6.4 Truth Tables For ArgumentsNicholas Lykins
 
Inductive reasoning & logic
Inductive reasoning & logicInductive reasoning & logic
Inductive reasoning & logictommy34g
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic#4 formal methods – predicate logic
#4 formal methods – predicate logicSharif Omar Salem
 
5.1 Standard Form Mood And Figure
5.1   Standard Form Mood And Figure5.1   Standard Form Mood And Figure
5.1 Standard Form Mood And FigureNicholas Lykins
 
Deductive logic
Deductive logicDeductive logic
Deductive logicWordpandit
 
4.3 Venn Diagrams And The Modern Square Of Opposition
4.3   Venn Diagrams And The Modern Square Of Opposition4.3   Venn Diagrams And The Modern Square Of Opposition
4.3 Venn Diagrams And The Modern Square Of OppositionNicholas Lykins
 
Truth tables presentation
Truth tables presentationTruth tables presentation
Truth tables presentationMujtaBa Khan
 

Viewers also liked (20)

Unit 5 Geometry Logic Vocabulary
Unit 5 Geometry Logic VocabularyUnit 5 Geometry Logic Vocabulary
Unit 5 Geometry Logic Vocabulary
 
IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014
IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014
IoT, Zeno's Paradox, Reductio Ad Absurdum, and Driving Fast 04092014
 
Limits of Computation
Limits of ComputationLimits of Computation
Limits of Computation
 
The logic of informal proofs
The logic of informal proofsThe logic of informal proofs
The logic of informal proofs
 
Five Mill Tree Method 1208
Five Mill Tree Method 1208Five Mill Tree Method 1208
Five Mill Tree Method 1208
 
Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
 
John stuart Mill on Reference and Meaning
John stuart Mill on Reference and MeaningJohn stuart Mill on Reference and Meaning
John stuart Mill on Reference and Meaning
 
Understanding arguments
Understanding argumentsUnderstanding arguments
Understanding arguments
 
8 chapter eightpowerpoint
8 chapter eightpowerpoint8 chapter eightpowerpoint
8 chapter eightpowerpoint
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
 
Abbreviated Truth Tables
Abbreviated Truth TablesAbbreviated Truth Tables
Abbreviated Truth Tables
 
3 computing truth tables
3   computing truth tables3   computing truth tables
3 computing truth tables
 
Chapter 8 induction
Chapter 8 inductionChapter 8 induction
Chapter 8 induction
 
6.4 Truth Tables For Arguments
6.4   Truth Tables For Arguments6.4   Truth Tables For Arguments
6.4 Truth Tables For Arguments
 
Inductive reasoning & logic
Inductive reasoning & logicInductive reasoning & logic
Inductive reasoning & logic
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic#4 formal methods – predicate logic
#4 formal methods – predicate logic
 
5.1 Standard Form Mood And Figure
5.1   Standard Form Mood And Figure5.1   Standard Form Mood And Figure
5.1 Standard Form Mood And Figure
 
Deductive logic
Deductive logicDeductive logic
Deductive logic
 
4.3 Venn Diagrams And The Modern Square Of Opposition
4.3   Venn Diagrams And The Modern Square Of Opposition4.3   Venn Diagrams And The Modern Square Of Opposition
4.3 Venn Diagrams And The Modern Square Of Opposition
 
Truth tables presentation
Truth tables presentationTruth tables presentation
Truth tables presentation
 

Similar to Logic&proof

logicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdflogicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdfPradeeshSAI
 
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptxssuser92109d
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptxRavind8
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptNandiniSR2
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]DIwakar Rajput
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdfsmarwaneid
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxPriyalMayurManvar
 
Propositional logic
Propositional logicPropositional logic
Propositional logicMamta Pandey
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly LanguageRaquel Mulles
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1taimoor iftikhar
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdfjayarao21
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptsamalaramesh4
 

Similar to Logic&proof (20)

Per3 logika&amp;pembuktian
Per3 logika&amp;pembuktianPer3 logika&amp;pembuktian
Per3 logika&amp;pembuktian
 
logicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdflogicproof-141212042039-conversion-gate01.pdf
logicproof-141212042039-conversion-gate01.pdf
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
 
Discrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.pptDiscrete mathematics Chapter1 presentation.ppt
Discrete mathematics Chapter1 presentation.ppt
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
UGC NET Computer Science & Application book.pdf [Sample]
UGC NET Computer Science & Application book.pdf  [Sample]UGC NET Computer Science & Application book.pdf  [Sample]
UGC NET Computer Science & Application book.pdf [Sample]
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
dm-logic.pdf
dm-logic.pdfdm-logic.pdf
dm-logic.pdf
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Language
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
 
L01.ppt
L01.pptL01.ppt
L01.ppt
 
Bab 1 proposisi
Bab 1 proposisiBab 1 proposisi
Bab 1 proposisi
 
Basic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.pptBasic Connectives and Truth Tables.ppt
Basic Connectives and Truth Tables.ppt
 

More from Fathan Hakim

01 intro taylor_series
01 intro taylor_series01 intro taylor_series
01 intro taylor_seriesFathan Hakim
 
Medan Elektromagnetik 2-9
Medan Elektromagnetik 2-9Medan Elektromagnetik 2-9
Medan Elektromagnetik 2-9Fathan Hakim
 
Medan Elektromagnetik 2-8
Medan Elektromagnetik 2-8Medan Elektromagnetik 2-8
Medan Elektromagnetik 2-8Fathan Hakim
 
Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...
Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...
Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...Fathan Hakim
 
Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...
Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...
Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...Fathan Hakim
 
Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )
Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )
Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )Fathan Hakim
 
Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...
Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...
Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...Fathan Hakim
 
Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...
Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...
Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...Fathan Hakim
 
Lecture 2 algoritma-dan_flowchart
Lecture 2 algoritma-dan_flowchartLecture 2 algoritma-dan_flowchart
Lecture 2 algoritma-dan_flowchartFathan Hakim
 
Lecture 1 pendahuluan Bahasa Python
Lecture 1 pendahuluan Bahasa PythonLecture 1 pendahuluan Bahasa Python
Lecture 1 pendahuluan Bahasa PythonFathan Hakim
 
Lecture 3 : (Physic Layer) Outline
Lecture 3 : (Physic Layer) OutlineLecture 3 : (Physic Layer) Outline
Lecture 3 : (Physic Layer) OutlineFathan Hakim
 
Dasar sistem telekomunikasi (modulasi)
Dasar sistem telekomunikasi (modulasi)Dasar sistem telekomunikasi (modulasi)
Dasar sistem telekomunikasi (modulasi)Fathan Hakim
 
Te 09-1313 #07 - sistem antena&proagasi (ver1)
Te 09-1313 #07 - sistem antena&proagasi (ver1)Te 09-1313 #07 - sistem antena&proagasi (ver1)
Te 09-1313 #07 - sistem antena&proagasi (ver1)Fathan Hakim
 

More from Fathan Hakim (19)

01 intro taylor_series
01 intro taylor_series01 intro taylor_series
01 intro taylor_series
 
Medan Elektromagnetik 2-9
Medan Elektromagnetik 2-9Medan Elektromagnetik 2-9
Medan Elektromagnetik 2-9
 
Medan Elektromagnetik 2-8
Medan Elektromagnetik 2-8Medan Elektromagnetik 2-8
Medan Elektromagnetik 2-8
 
Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...
Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...
Kuliah 5 Dasar Sistem Tenaga Listrik ( Segitiga Konversi Energi, Rangkaian Sa...
 
Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...
Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...
Kuliah 4 Dasar Sistem Tenaga Listrik ( Konsep Awal Penghitungan, Tips Menghin...
 
Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )
Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )
Kuliah 3 Dasar Sistem Tenaga Listrik ( Sistem Transmisi dan Distribusi )
 
Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...
Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...
Kuliah 2 Dasar Sistem Tenaga Listrik (Pengembangan Energi Alternatif, Bagan K...
 
Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...
Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...
Kuliah 1 Dasar Sistem Tenaga Listrik ( Pengantar, Kelistrikan di Indonesia, P...
 
Graph
GraphGraph
Graph
 
Lecture 2 algoritma-dan_flowchart
Lecture 2 algoritma-dan_flowchartLecture 2 algoritma-dan_flowchart
Lecture 2 algoritma-dan_flowchart
 
Lecture 1 pendahuluan Bahasa Python
Lecture 1 pendahuluan Bahasa PythonLecture 1 pendahuluan Bahasa Python
Lecture 1 pendahuluan Bahasa Python
 
Lecture 3 : (Physic Layer) Outline
Lecture 3 : (Physic Layer) OutlineLecture 3 : (Physic Layer) Outline
Lecture 3 : (Physic Layer) Outline
 
Dasar sistem telekomunikasi (modulasi)
Dasar sistem telekomunikasi (modulasi)Dasar sistem telekomunikasi (modulasi)
Dasar sistem telekomunikasi (modulasi)
 
Te 09-1313 #07 - sistem antena&proagasi (ver1)
Te 09-1313 #07 - sistem antena&proagasi (ver1)Te 09-1313 #07 - sistem antena&proagasi (ver1)
Te 09-1313 #07 - sistem antena&proagasi (ver1)
 
PPT Teleponi
PPT Teleponi PPT Teleponi
PPT Teleponi
 
Logarithma
LogarithmaLogarithma
Logarithma
 
Perpangkatan
PerpangkatanPerpangkatan
Perpangkatan
 
Persentasi vaksin
Persentasi vaksinPersentasi vaksin
Persentasi vaksin
 
Otot
OtotOtot
Otot
 

Recently uploaded

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 

Recently uploaded (20)

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 

Logic&proof

  • 1. R. Johnsonbaugh, Discrete Mathematics 5th edition, 2001 Chapter 1 Logic and proofs
  • 2. Logic  Logic = the study of correct reasoning  Use of logic  In mathematics:  to prove theorems  In computer science:  to prove that programs do what they are supposed to do
  • 3. Section 1.1 Propositions  A proposition is a statement or sentence that can be determined to be either true or false.  Examples:  “John is a programmer" is a proposition  “I wish I were wise” is not a proposition
  • 4. Connectives If p and q are propositions, new compound propositions can be formed by using connectives  Most common connectives:  Conjunction AND. Symbol ^  Inclusive disjunction OR Symbol v  Exclusive disjunction OR Symbol v  Negation Symbol ~  Implication Symbol ®  Double implication Symbol «
  • 5. Truth table of conjunction  The truth values of compound propositions can be described by truth tables.  Truth table of conjunction p q p ^ q T T T T F F F T F F F F  p ^ q is true only when both p and q are true.
  • 6. Example  Let p = “Tigers are wild animals”  Let q = “Chicago is the capital of Illinois”  p ^ q = "Tigers are wild animals and Chicago is the capital of Illinois"  p ^ q is false. Why?
  • 7. Truth table of disjunction  The truth table of (inclusive) disjunction is p q p v q T T T T F T F T T F F F  p Ú q is false only when both p and q are false  Example: p = "John is a programmer", q = "Mary is a lawyer"  p v q = "John is a programmer or Mary is a lawyer"
  • 8. Exclusive disjunction  “Either p or q” (but not both), in symbols p Ú q p q p v q T T F T F T F T T F F F  p Ú q is true only when p is true and q is false, or p is false and q is true.  Example: p = "John is programmer, q = "Mary is a lawyer"  p v q = "Either John is a programmer or Mary is a lawyer"
  • 9. Negation  Negation of p: in symbols ~p p ~p T F F T  ~p is false when p is true, ~p is true when p is false  Example: p = "John is a programmer"  ~p = "It is not true that John is a programmer"
  • 10. More compound statements  Let p, q, r be simple statements  We can form other compound statements, such as  (pÚq)^r  pÚ(q^r)  (~p)Ú(~q)  (pÚq)^(~r)  and many others…
  • 11. Example: truth table of (pÚq)^r p q r (p Ú q) ^ r T T T T T T F F T F T T T F F F F T T T F T F F F F T F F F F F
  • 12. 1.2 Conditional propositions and logical equivalence  A conditional proposition is of the form “If p then q”  In symbols: p ® q  Example:  p = " John is a programmer"  q = " Mary is a lawyer "  p ® q = “If John is a programmer then Mary is a lawyer"
  • 13. Truth table of p ® q p q p ® q T T T T F F F T T F F T  p ® q is true when both p and q are true or when p is false
  • 14. Hypothesis and conclusion  In a conditional proposition p ® q, p is called the antecedent or hypothesis q is called the consequent or conclusion  If "p then q" is considered logically the same as "p only if q"
  • 15. Necessary and sufficient  A necessary condition is expressed by the conclusion.  A sufficient condition is expressed by the hypothesis.  Example: If John is a programmer then Mary is a lawyer"  Necessary condition: “Mary is a lawyer”  Sufficient condition: “John is a programmer”
  • 16. Logical equivalence  Two propositions are said to be logically equivalent if their truth tables are identical. p q ~p Ú q p ® q T T T T T F F F F T T T F F T T  Example: ~p Ú q is logically equivalent to p ® q
  • 17. Converse  The converse of p ® q is q ® p p q p ® q q ® p T T T T T F F T F T T F F F T T These two propositions are not logically equivalent
  • 18. Contrapositive  The contrapositive of the proposition p ® q is ~q ® ~p. p q p ® q ~q ® ~p T T T T T F F F F T T T F F T T They are logically equivalent.
  • 19. Double implication  The double implication “p if and only if q” is defined in symbols as p « q p q p « q (p ® q) ^ (q ® p) T T T T T F F F F T F F F F T T p « q is logically equivalent to (p ® q)^(q ® p)
  • 20. Tautology  A proposition is a tautology if its truth table contains only true values for every case  Example: p ® p v q p q p ® p v q T T T T F T F T T F F T
  • 21. Contradiction  A proposition is a tautology if its truth table contains only false values for every case  Example: p ^ ~p p p ^ (~p) T F F F
  • 22. De Morgan’s laws for logic  The following pairs of propositions are logically equivalent:  ~ (p Ú q) and (~p)^(~q)  ~ (p ^ q) and (~p) Ú (~q)
  • 23. 1.3 Quantifiers  A propositional function P(x) is a statement involving a variable x  For example:  P(x): 2x is an even integer  x is an element of a set D  For example, x is an element of the set of integers  D is called the domain of P(x)
  • 24. Domain of a propositional function  In the propositional function P(x): “2x is an even integer”, the domain D of P(x) must be defined, for instance D = {integers}.  D is the set where the x's come from.
  • 25. For every and for some  Most statements in mathematics and computer science use terms such as for every and for some.  For example:  For every triangle T, the sum of the angles of T is 180 degrees.  For every integer n, n is less than p, for some prime number p.
  • 26. Universal quantifier  One can write P(x) for every x in a domain D  In symbols: "x P(x)  " is called the universal quantifier
  • 27. Truth of as propositional function  The statement "x P(x) is  True if P(x) is true for every x Î D  False if P(x) is not true for some x Î D  Example: Let P(n) be the propositional function n2 + 2n is an odd integer "n Î D = {all integers}  P(n) is true only when n is an odd integer, false if n is an even integer.
  • 28. Existential quantifier  For some x Î D, P(x) is true if there exists an element x in the domain D for which P(x) is true. In symbols: $x, P(x)  The symbol $ is called the existential quantifier.
  • 29. Counterexample  The universal statement "x P(x) is false if $x Î D such that P(x) is false.  The value x that makes P(x) false is called a counterexample to the statement "x P(x).  Example: P(x) = "every x is a prime number", for every integer x.  But if x = 4 (an integer) this x is not a primer number. Then 4 is a counterexample to P(x) being true.
  • 30. Generalized De Morgan’s laws for Logic  If P(x) is a propositional function, then each pair of propositions in a) and b) below have the same truth values: a) ~("x P(x)) and $x: ~P(x) "It is not true that for every x, P(x) holds" is equivalent to "There exists an x for which P(x) is not true" b) ~($x P(x)) and "x: ~P(x) "It is not true that there exists an x for which P(x) is true" is equivalent to "For all x, P(x) is not true"
  • 31. Summary of propositional logic  In order to prove the universally quantified statement "x P(x) is true  It is not enough to show P(x) true for some x Î D  You must show P(x) is true for every x Î D  In order to prove the universally quantified statement "x P(x) is false  It is enough to exhibit some x Î D for which P(x) is false  This x is called the counterexample to the statement "x P(x) is true
  • 32. 1.4 Proofs  A mathematical system consists of  Undefined terms  Definitions  Axioms
  • 33. Undefined terms  Undefined terms are the basic building blocks of a mathematical system. These are words that are accepted as starting concepts of a mathematical system.  Example: in Euclidean geometry we have undefined terms such as Point Line
  • 34. Definitions  A definition is a proposition constructed from undefined terms and previously accepted concepts in order to create a new concept.  Example. In Euclidean geometry the following are definitions:  Two triangles are congruent if their vertices can be paired so that the corresponding sides are equal and so are the corresponding angles.  Two angles are supplementary if the sum of their measures is 180 degrees.
  • 35. Axioms  An axiom is a proposition accepted as true without proof within the mathematical system.  There are many examples of axioms in mathematics:  Example: In Euclidean geometry the following are axioms  Given two distinct points, there is exactly one line that contains them.  Given a line and a point not on the line, there is exactly one line through the point which is parallel to the line.
  • 36. Theorems  A theorem is a proposition of the form p ® q which must be shown to be true by a sequence of logical steps that assume that p is true, and use definitions, axioms and previously proven theorems.
  • 37. Lemmas and corollaries  A lemma is a small theorem which is used to prove a bigger theorem.  A corollary is a theorem that can be proven to be a logical consequence of another theorem.  Example from Euclidean geometry: "If the three sides of a triangle have equal length, then its angles also have equal measure."
  • 38. Types of proof  A proof is a logical argument that consists of a series of steps using propositions in such a way that the truth of the theorem is established.  Direct proof: p ® q  A direct method of attack that assumes the truth of proposition p, axioms and proven theorems so that the truth of proposition q is obtained.
  • 39. Indirect proof The method of proof by contradiction of a theorem p ® q consists of the following steps: 1. Assume p is true and q is false 2. Show that ~p is also true. 3. Then we have that p ^ (~p) is true. 4. But this is impossible, since the statement p ^ (~p) is always false. There is a contradiction! 5. So, q cannot be false and therefore it is true. OR: show that the contrapositive (~q)®(~p) is true.  Since (~q) ® (~p) is logically equivalent to p ® q, then the theorem is proved.
  • 40. Valid arguments  Deductive reasoning: the process of reaching a conclusion q from a sequence of propositions p1, p2, …, pn.  The propositions p1, p2, …, pn are called premises or hypothesis.  The proposition q that is logically obtained through the process is called the conclusion.
  • 41. Rules of inference (1) 1. Law of detachment or modus ponens  p ® q  p  Therefore, q 2. Modus tollens  p ® q  ~q  Therefore, ~p
  • 42. Rules of inference (2) 3. Rule of Addition  p  Therefore, p Ú q 4. Rule of simplification  p ^ q  Therefore, p 5. Rule of conjunction  p  q  Therefore, p ^ q
  • 43. Rules of inference (3) 6. Rule of hypothetical syllogism  p ® q  q ® r  Therefore, p ® r 7. Rule of disjunctive syllogism  p Ú q  ~p  Therefore, q
  • 44. Rules of inference for quantified statements 1. Universal instantiation  " xÎD, P(x)  d Î D  Therefore P(d) 2. Universal generalization  P(d) for any d Î D  Therefore "x, P(x) 3. Existential instantiation  $ x Î D, P(x)  Therefore P(d) for some d ÎD 4. Existential generalization  P(d) for some d ÎD  Therefore $ x, P(x)
  • 45. 1.5 Resolution proofs  Due to J. A. Robinson (1965)  A clause is a compound statement with terms separated by “or”, and each term is a single variable or the negation of a single variable  Example: p Ú q Ú (~r) is a clause (p ^ q) Ú r Ú (~s) is not a clause  Hypothesis and conclusion are written as clauses  Only one rule:  p Ú q  ~p Ú r  Therefore, q Ú r
  • 46. 1.6 Mathematical induction  Useful for proving statements of the form " n Î A S(n) where N is the set of positive integers or natural numbers, A is an infinite subset of N S(n) is a propositional function
  • 47. Mathematical Induction: strong form  Suppose we want to show that for each positive integer n the statement S(n) is either true or false.  1. Verify that S(1) is true.  2. Let n be an arbitrary positive integer. Let i be a positive integer such that i < n.  3. Show that S(i) true implies that S(i+1) is true, i.e. show S(i) ® S(i+1).  4. Then conclude that S(n) is true for all positive integers n.
  • 48. Mathematical induction: terminology  Basis step: Verify that S(1) is true.  Inductive step: Assume S(i) is true. Prove S(i) ® S(i+1).  Conclusion: Therefore S(n) is true for all positive integers n.