Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
66 views7 pages

Intro to Logical Statements

This document provides an overview of fundamental logical concepts in mathematics, including statements, logical operators, and truth tables. It defines statements as sentences that are either true or false, and introduces four types of compound statements formed using logical operators: negation (~p), disjunction (p∨q), conjunction (p∧q), and conditional (p→q). Examples are given to illustrate how to construct truth tables for these logical operators and combinations of statements. The concepts of equivalence (p≡q) and logical properties like idempotent, associative, commutative, and distributive laws are also covered.

Uploaded by

spsarathy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views7 pages

Intro to Logical Statements

This document provides an overview of fundamental logical concepts in mathematics, including statements, logical operators, and truth tables. It defines statements as sentences that are either true or false, and introduces four types of compound statements formed using logical operators: negation (~p), disjunction (p∨q), conjunction (p∧q), and conditional (p→q). Examples are given to illustrate how to construct truth tables for these logical operators and combinations of statements. The concepts of equivalence (p≡q) and logical properties like idempotent, associative, commutative, and distributive laws are also covered.

Uploaded by

spsarathy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Mathematical Database

LOGIC

One of the most important criteria in studying mathematics is having a logical mind. In the
following texts, some fundamental ideas will be presented here.

1. Statement

A statement, or proposition, is a sentence that is readable, and is either true or false, but not
both. For example, both Today is Sunday and 1+1=2 are statements. However, the sentences
Excuse me and What is a statement? are not statements since we cant say the sentences
themselves are true or false.

If a statement is true, we say its truth value is T or 1. If its false, its truth value is F or 0.

2. Composition of Statements

Very often, especially in mathematics, we need to combine two or more statements into one.
This is called a compound statement. Basically, there are four types of fundamental composition.
They are negation, disjunction, conjunction and conditional.

The negation of a statement p is a statement which has truth value T when p is false, and has
truth value F when p is true. It is denoted by ~p, read as not p.

Illustration. Let p = Today is Sunday, then ~p = Today is not Sunday.

In showing relations between statements, truth table is often used.

p ~p
T F
F T
Table 1: Truth table of ~p

In table 1, we first list out all the possible truth values of p in the first column, then write down
Page 1 of 7
Mathematical Database

the corresponding truth values of ~p in the second column.

The disjunction of two statements p and q is the statement which is true when at least one of p
and q is true, and is false when both p and q are false. It is denoted by p q , read as p or q.

Illustration. Let x be an integer. The disjunction of x is odd and x is even is always true.

p q pq
T T T
T F T
F T T
F F F
Table 2: Truth table of p q

The truth table of p q is shown in table 2. Since there are two possible truth values for each
of p and q, there are totally 22 = 4 possible combinations. As a result, there are 4 rows for truth
values of p and q, and the corresponding truth values of p q are listed in the third column.

The conjunction of two statements p and q is the statement which is true when both p and q is
true, and is false when either p or q is false. It is denoted by p q , read as p and q. The truth table
of p q is shown in table 3.

p q pq
T T T
T F F
F T F
F F F
Table 3: Truth table of p q

The conditional of two statements p and q is the statement which is false when p is true and q
is false, and is true otherwise. It is denoted by p q , read as if p, then q. The truth table of
p q is shown in table 4.

Page 2 of 7
Mathematical Database
p q pq
T T T
T F F
F T T
F F T
Table 4: Truth table of p q

~ , , and are called logical operators. It is worth noting that and


are commutative, while is not. That means p q and q p have the same truth
values, so do p q and q p , but p q may have different truth value with q p .

When the statement p q is always true, we will use the symbol implication instead,
and read as p implies q.

Illustration. Let x is a real number, p = x is a positive integer, q = x > 1 . Then p q is


always true, but q p may not be true. We may write p q .

Another common composition of statement is biconditional. The biconditional of two


statements p and q is the conjunction of the statements If p, then q and If q, then p. It is denoted
by p q , read as p if and only if q. The notation p iff q is also used. Symbolically, it is the
statement ( p q ) (q p ) . The truth table of p q is shown in table 5.

p q pq
T T T
T F F
F T F
F F T
Table 5: Truth table of p q

Readers may wonder why table 5 is the truth table of p q . We will illustrate it in example
2.1.

Example 2.1.
Construct the truth table of p q .

Page 3 of 7
Mathematical Database

Solution.
Since p q is the statement ( p q ) (q p ) , we add the columns p q and q p and
fill up them first. Once it is done, we can fill in the column ( p q ) (q p ) by the rules in
table 4. In this way, we make the table.

p q pq q p ( p q) (q p)
T T T T T
T F F T F
F T T F F
F F T T T

When the logical operators ~ , , are used together, we must be careful about the
order of operations. The precedence level follows in the order ~ , , , i.e. ~ p q
means (not p) or q instead of not (p or q). If we want to change the statement to the second one,
we can add a bracket to change it to ~ ( p q ) .

Similar to conditional, we write p q if the statement p q is always true.

From the table, we see that ( p q ) (q p ) is true when p and q have the same truth value,
and is false otherwise.

Example 2.2.
Construct the truth table of (~ p ~ q ) r .

Solution.
p q r ~p ~q ~ p ~ q (~ p ~ q ) r
T T T F F F T
T T F F F F T
T F T F T T T
T F F F T T F
F T T T F T T
F T F T F T F
F F T T T T T
F F F T T T F

Two statements, p and q are said to be equivalent if they share the same truth value. It is

Page 4 of 7
Mathematical Database
denoted by p q .

Example 2.3.
Prove that p q ~ p q .

Solution.
In dealing with this kind of questions, one of the ways is constructing a truth table.

p q ~p pq ~ pq
T T F T T
T F F F F
F T T T T
F F T T T

It can be seen that the last two columns have the same truth values, hence they are equivalent.

Theorem 2.1.
Let p, q, r be statements, then
1. p p p;
2. p p p;
3. ( p q) r p (q r ) ;
4. ( p q) r p (q r ) ;
5. pq q p;
6. pq q p;
7. ( p q) r ( p r ) (q r ) ;
8. ( p q) r ( p r ) (q r ) ;
9. ~ (~ p) p .

Proof. All of these can be easily proved by constructing truth tables, and is left as an exercise to the
readers.

In theorem 2.1, (1), (2) are known as idempotent laws, (3), (4) are called associative laws, (5),
(6) are commutative laws, and (7), (8) are called distributive laws.

Page 5 of 7
Mathematical Database

Theorem 2.2. (De Morgans Laws)


Let p, q be statements, then
1. ~ ( p q) ~ p ~ q ;
2. ~ ( p q) ~ p ~ q .

Proof. Exercise.

Example 2.4.
Prove that p q ~ q ~ p .

Solution.
It can be seen from the truth table below.

p q ~q ~p pq ~ q ~ p
T T F F T T
T F T F F F
F T F T T T
F F T T T T

The statement ~ q ~ p is called the contrapositive statement of p q . Instead of


proving a statement of the form p q directly, example 2.4 suggests that we may do it in the
backward direction, i.e. its contrapositive statement is true. We will illustrate it in example 2.5.

Example 2.5.
Let { a1 , a2 ,..., a10 } be a strictly increasing sequence of positive integers not exceeding 45. Prove that
there exist two distinct pairs such that the differences of the two numbers in each pair are the same.

Solution.
Let p be the statement a1 , a2 ,..., a10 be a strictly increasing sequence of positive integers not
exceeding 45 and q be there exist two distinct pairs such that the differences of the two numbers
in each pair are the same. Suppose ~ q is true, i.e. the difference of the two numbers in distinct
pairs are different. Then a10 = a1 + i =1 (ai +1 ai ) 1 + i =1 i = 46 , which implies ~ p . Hence we
9 9

have shown the contrapositive statement p q , which is equivalent to ~ q ~ p .

Page 6 of 7
Mathematical Database

Example 2.6.
Show that 2 is irrational, i.e. there doesnt exist integers p, q such that 2 = p q .

Solution.
Suppose there exists integers p, q such that 2 = p q . We may further assume that p, q are coprime,
i.e. their greatest common divisor is 1. Squaring the equation we get 2q 2 = p 2 , implying that p is
even and so we let p = 2m for some integer m. However, if we substitute it into 2q 2 = p 2 , it
would yield q 2 = 2m 2 , meaning q is even again. It contradicts to our assumption p, q are coprime,
so our first assumption, i.e. 2 is rational, is false.

The method used in example 2.5 and 2.6 is called proof by contradiction.

The logic behind the proof in example 2.5 and 2.6 is a little bit different. In example 2.5, we
show that the negation of the consequence leads to negation of the given conditions, while in
example 2.6 we have shown that the assumption contradicts to itself.

Exercise
1. Finish the proof of the remaining parts of theorem 2.1.

2. Prove theorem 2.2

Page 7 of 7

You might also like