DMC-chap 1
DMC-chap 1
Examples:
a. : 4 + 5 is less than 6. Answer:
b. : it is not cold.
c. : Addis Ababa is the capital city of Ethiopia.
Page 1
2. Conjunction (⋀):we say that the sentence ⋀ is true if both and are true, otherwise
false.
⋀
T T T
T F F
F T F
F F F
Examples: Find the truth value for the following
a) 2+2=4 and 2+3=5
b) 2+4=6 and is rational
c) 3 is even and 4 is prime
3. Disjunction (⋁):we say that the sentence ⋁ is false if both and are false, otherwise
true.
⋁
T T T
T F T
F T T
F F F
Page 2
F F F
Examples:
a. Applicant for this post must be over 25 or at least 3 years of relevant experience
(inclusive or)
b. Tomorrow at 3:00 i will go swimming or play golf (exclusive or)
5. Conditional(→): we say that the sentence → (if then ) is false if p is true and q is
false , otherwise true.
→
T T T
T F F
F T T
F F T
Page 3
"if it's not Sunday, then the supermarket is open until midnight".
6. Bi-Conditional(↔): we say that the sentence ↔ ( if and only if ) is true if p and q
are both true or false , otherwise false.
↔
T T T
T F F
F T F
F F T
Page 4
Two propositions are said to be Logically Equivalent if they have identical truth values for
every set of truth values of their components. Compound propositions are denoted by capital
letters. ≡ Read as and are logically equivalent.
Example: Show
a. (¬ ⋁ ¬ ) ≡ ¬( ⋀ ) c. (¬ ⋀ )⋁ ¬( ⋁ ) ≡ ¬
b. → ≡ ¬ ⋁ d. ¬[ ⋁(¬ ⋀ )] ≡ ¬ ⋀¬
Page 5
denoted by , , ,…, ⊢ . The argument is valid if the conjunction of the premises
logically implies the conclusion, otherwise invalid. That is, the argument is valid if
( … ) → is tautology.
Predicate: Describes the property of one or several objects or individual subject.
Example:......... is red and ...........is greater than 3. Predicate is represented by capital letter
: is red and : is greater than 3. The individual or object is represented by small letters.
The Propositional function P of x is a statement which contains both individual and predicate.
( ): is red and ( ): is greater than 3.
To change the propositional function to proposition:
Substitute individual value to the subject or individual. if ( ): > 3,then (4) is a true
proposition and (2) is a false proposition
1.6.2. QUANTIFIERS
When the variables in a propositional function are assigned values, the resulting statement
becomes a proposition with a certain truth value. However, there is another important way,
called quantification, to create a proposition from a propositional function. Quantification
expressesthe extent to which a predicate is true over a range of elements. In English, the words
all, some,many, none, and few are used in quantifications. We will focus on two types of
quantification here: universal quantification, which tells us that a predicate is true for every
element under consideration, and existential quantification, which tells us that there is one or
more element under consideration for which the predicate is true. The area of logic that deals
with predicates and quantifiers is called the predicate calculus.
A. THE UNIVERSAL QUANTIFIER
The universal quantification of ( ) is the statement “ ( ) for all values of in the domain.”
The notation ∀ ( ) denotes the universal quantification of ( ). Here ∀ is called the
universal quantifier. We read ∀ ( ) as “for all ( )” or “for every ( ).” An element for
which ( ) is false is called a counterexample of ∀ ( ).
EXAMPLE 1: Let ( ) be the statement + 1 > . What is the truth value of the
quantification ∀ ( ), where
the domain consists of all real numbers?
Solution: Because ( ) is true for all real numbers , the quantification ∀ ( ) is true.
Remark: Generally, an implicit assumption is made that all domains of discourse for quantifiers
Page 6
are nonempty. Note that if the domain is empty, then ∀ ( ) is true for any propositional
function ( ) because there are no elements x in the domain for which ( ) is false.
EXAMPLE 2: Let Q(x) be the statement x < 2. What is the truth value of the quantification
∀ ( ), wherethe domain consists of all real numbers?
Solution: ( ) is not true for every real number , because, for instance, (3) is false. That is,
= 3 is a counterexample for the statement ∀ ( ). Thus∀ ( )is false.
Exercise: Determine the truth value of
a. ∀ ( ) if ( ): < 10
b. ∀ ( ): ≥ if the domain consists of all real numbers?
c. ∀ ( ): ≥ if the domain consists of all integers?
B. THE EXISTENTIAL QUANTIFIER
The existential quantification of ( ) is the proposition : “There exists an element x in the
domain such that ( ).” We use the notation ∃ ( ) for the existential quantification of ( ).
Here ∃ is called the existential quantifier.
EXAMPLE 1: Let ( ) denote the statement “ > 3.” What is the truth value of the
quantification ∃ ( ), where the domain consists of all real numbers?
Solution: Because “ > 3” is sometimes true. For instance, when x = 4 the existential
quantificationof P(x), which is ∃ ( ), is true.Observe that the statement ∃ ( ) is false if and
only if there is no element x in the domain for which ( ) is true. That is, ∃ ( ) is false if and
only if ( ) is false for every element of the domain.
EXAMPLE 2: Let Q(x) denote the statement “ = + 1.”What is the truth value of the
quantification∃ ( ),where the domain consists of all real numbers?
Solution: Because ( ) is false for every real number , the existential quantification of ( ),
which is ∃ ( ), is false.
Exercise: Determine the truth value of
a. ∃ ( ) if ( ): > 10 if the domain consists of positive integers not exceeding 4?
b. ∃ ( ) if ( ): + 10 = 0 if the domain consists of all real number?
1.7. Mathematical proof
A proof is a valid argument that establishes the truth of a mathematical statement. A proof can
use the hypotheses of the theorem, if any, axioms assumed to be true, and previously proven
Page 7
theorems. Using these ingredients and rules of inference, the final step of the proof establishes
the truth of the statement being proved.
The methods of proof are important not only because they are used to prove mathematical
theorems, but also for their many applications to computer science. These applications include
verifying that computer programs are correct, establishing that operating systems are secure,
making inferences in artificial intelligence, showing that system specifications are consistent,
and so on. Consequently, understanding the techniques used in proofs is essential both in
mathematics and in computer science.
Statements in proof include:
Axioms or postulates: Which are the underlying assumptions about mathematical structures,the
hypothesis of the theorem to be proved, and previously proved theorem.
Rule of inference: Which are the means used to draw conclusion from other assertions, tie
together the steps of a proof.
Fallacies: Incorrect reasoning.
Lemma: A simple theorem used in the proof of other theorems.
Corollary: Is a proposition that can be established directly from a theorem that has been
proofed.
Conjecture: Is a statement whose truth value is unknown, when a proof of a conjecture is
found the conjecture becomes a theorem.
Methods of proof:
1. Direct Proofs:
A direct proof of a conditional statement → is constructed when the first step is
theassumption that p is true; subsequent steps are constructed using rules of inference, with
thefinal step showing that q must also be true. A direct proof shows that a conditional
statement → is true by showing that if p is true, then q must also be true, so that the
combinationp true and q false never occurs. In a direct proof, we assume that p is true and use
axioms,definitions, and previously proven theorems, together with rules of inference, to show
that qmust also be true.
EXAMPLE: Give a direct proof of the theorem “If is an odd integer, then is odd.”
Solution: Note that this theorem states ∀ (( ) → ( )), where ( )is “ is an odd
integer”and ( )is “ is odd.” As we have said, we will follow the usual convention in
Page 8
mathematicalproofs by showing that ( ) implies ( ), and not explicitly using universal
instantiation. Tobegin a direct proof of this theorem, we assume that the hypothesis of this
conditional statementis true, namely, we assume that n is odd. By the definition of an odd
integer, it follows that = 2 + 1, where is some integer. We want to show that is also
odd. We can squareboth sides of the equation = 2 + 1 to obtain a new equation that
expresses . When we dothis, we find that
= (2 + 1)2 = 4 2 + 4 + 1 = 2(2 2 + 2 ) + 1. By the definition of an
odd integer, we can conclude that is an odd integer (it is one more than twice an integer).
Consequently, we have proved that if is an odd integer, then is an odd integer.
Exercise: Prove that, for every integer , if n is even then is even.
2. Indirect proof(Proof by Contraposition)
Direct proofs lead from the premises of a theorem to the conclusion. They begin with the
premises, continue with a sequence of deductions, and end with the conclusion. However, we
will see that attempts at direct proofs often reach dead ends. We need other methods of proving
theorems of the form ∀ ( ( ) → ( )). Proofs of theorems of this type that are not direct
proofs, that is, that do not start with the premises and end with the conclusion, are called
indirect proofs.
An extremely useful type of indirect proof is known as proof by contraposition. Proofs
by contraposition make use of the fact that the conditional statement → is equivalent to its
contrapositive, ¬ → ¬ . This means that the conditional statement → can be proved by
showing that its contrapositive, ¬ → ¬ , is true. In a proof by contraposition of → , we
take ¬ as a premise, and using axioms, definitions, and previously proven theorems, together
with rules of inference, we show that¬ must follow.We will illustrate proof by contraposition
with two examples. These examples show that proof by contraposition can succeed when we
cannot easily find a direct proof.
EXAMPLE: Prove that if n is an integer and 3 + 2 is odd, then is odd.
Solution:We first attempt a direct proof. To construct a direct proof, we first assume that
3 + 2is an odd integer. This means that 3 + 2 = 2 + 1 for some integer . Can we use
this fact to show that is odd? We see that 3 + 1 = 2 , but there does not seem to be any
direct wayto conclude that n is odd. Because our attempt at a direct proof failed, we next try a
proof bycontraposition.
Page 9
The first step in a proof by contraposition is to assume that the conclusion of the conditional
statement “If3 + 2 is odd, then is odd” is false; namely, assume that n is even. Then, by
the definition of an even integer, = 2 for some integer . Substituting 2 for , we find
that 3 + 2 = 3(2 ) + 2 = 6 + 2 = 2(3 + 1). This tells us that 3 + 2 is even
(because itis a multiple of 2), and therefore not odd. This is the negation of the premise of the
theorem.Because the negation of the conclusion of the conditional statement implies that the
hypothesis
is false, the original conditional statement is true. Our proof by contraposition succeeded; we
have proved the theorem “If3 + 2 is odd, then is odd.”
3. Proofs by Contradiction
Suppose we want to prove that a statement p is true. Furthermore, suppose that we can find
a contradiction q such that ¬ → is true. Because is false, but ¬ → is true, we can
conclude that ¬ is false, which means that is true. How can we find a contradiction that
might help us prove that is true in this way?
Because the statement ∧ ¬ is a contradiction whenever is a proposition, we can prove
that is true if we can show that ¬ → ( ∧ ¬ )is true for some proposition . Proofs of this
type are called proofs by contradiction. Because a proof by contradiction does not prove a
resultdirectly, it is another type of indirect proof.
EXAMPLE:Give a proof by contradiction of the theorem “If 3 + 2 is odd, then is odd.”
Solution:Let be “3 + 2 is odd” and be “ is odd.” To construct a proof by
contradiction,assume that both and ¬ are true. That is, assume that 3 + 2 is odd and that is
not odd.Because is not odd, we know that it is even. Because is even, there is an integer
suchthat = 2 . This implies that 3 + 2 = 3(2 ) + 2 = 6 + 2 = 2(3 + 1).
Because 3 + 2 is2 , where = 3 + 1, 3 + 2 is even. Note that the statement “3 + 2
is even” is equivalent tothe statement ¬ , because an integer is even if and only if it is not odd.
Because both and¬ are true, we have a contradiction. This completes the proof by
contradiction, proving that if3 + 2 is odd, then is odd.
4. Counter Examples:
To show that a statement of the form∀ ( )is false, we need only find a counterexample, that
is, an example for which ( )is false. When presented with a statement of the form ∀ ( ),
Page 10
which we believe to be false orwhich has resisted all proof attempts, we look for a
counterexample.
EXAMPLE:Show that the statement “Every positive integer is the sum of the squares of two
integers” isfalse.
Solution:To showthat this statement is false, we look for a counterexample, which is a
particularinteger that is not the sum of the squares of two integers. It does not take long to find a
counterexample,because 3 cannot be written as the sum of the squares of two integers. To show
this is thecase, note that the only perfect squares not exceeding 3 are 0 = 0 and 1 = 1.
Furthermore,there is no way to get 3 as the sum of two terms each of which is 0 or 1.
Consequently, we haveshown that “Every positive integer is the sum of the squares of two
integers” is false.
Exercise: Show that “all prime numbers are odd” is false.
Page 11