LOGIC
Logic
▪ is a branch of mathematics and logic that focuses on the application of formal
logical principles to mathematical reasoning.
▪ is the study of correct reasoning, especially regarding making inferences. It
provides rules and techniques for distinguishing good arguments from bad ones.
In mathematics, logic forms the foundation for constructing proofs and solving
problems.
Statements
A statement is a declarative sentence that is either true or false, but not both.
Examples: Determine whether each is a statement or not.
1. Most scientist agree that global warming is a threat to the environment.
2. Is that your laptop?
3. Man , that hurts!
4. 234-7 = 100
5. Math is fun.
6. History is interesting.
Types of Statement
1. Simple Statement- it is a single idea or proposition (proposition is a specific type of
statement, it's a mathematical or logical statement. It is typically used when referring to
a key idea, claim, or theorem precursor in mathematics and logic. ) whose truth value is
of interest that conveys a complete thought.
Examples:
1. The students are noisy.
2. I went to Davao City last Sunday.
3. Davao del Sur is a province in Davao Region.
4. The sky is blue.
5. 3 is a prime number.
2. Compound Statement – it is formed by combining two or more simple statements
using logical connectives such as “and “, “or”, “if-then”, and “if and only if ”.
Examples:
1. The sky is blue and the grass is green.
2. If it rains, then the ground gets wet.
3. 3 is a prime number or 4 is an odd number.
4. Dion studied for 5 hours and she got 95 score in math.
5. They will win the game if and only if they will score more points than the other.
6. If you study your lesson, then you will pass the quiz.
7. I will give you quiz next meeting or I will give you and exercise to practice.
Negation of a Statement
Negation is the opposite of a given statement. It is formed by inserting the word 'not' or
changing the statement to its opposite meaning.
Example:
Statement: Zia attended her math class yesterday.
Negation: Zia did not attend her math class yesterday.
Quantifiers
Quantifiers are used in logic to indicate the quantity of specimens in the domain of
discourse for which a predicate is true. It involve terms such as all, each, every, none,
some, there exists, and at least one.
Types of Quantifiers
1. Universal Quantifier (∀)
▪ States that a property applies to all elements.
▪ A type of quantifier which either include or exclude every element of the
set. These are : all, each , every, no, none .
2. Existential Quantifier (∃)
▪ States that there exists at least one element for which the property holds.
▪ a type of quantifier, which claim the existence of something but don’t include
the entire universal set . These are : Some , There exist , at least one.
Examples of Mathematical Statements using Quantifiers
1. ∀x ∈ ℝ, x² ≥ 0. (All real numbers squared are non-negative.)
2. ∃x ∈ ℤ such that x² = 4. (There exists an integer whose square is 4.)
3. ∀x ∈ ℕ, x + 1 > x. (For all natural numbers, adding 1 results in a larger number.)
4. ∃x ∈ ℚ such that x < 0. (There exists a rational number that is less than 0.)
5. ∀x ∈ ℤ, x + 0 = x. (Zero is the additive identity for integers.)
Example of Statements and its Negation using Quantifiers
Statement contains Example Negation Example
All do All of my meals are Some do not, Some of my meals
low in fat Not all do are not low in fat
Some do Some students All do, None do All the students
failed in the GEC passed the GEC
Midterm Exam Midterm Exam
None of the
students failed in
the GEC 604
Midterm Exam
Some do not Some instructors of All do All instructors of
DSSC are PhD None do DSSC are not PhD
graduates. graduates.
None of the
instructors of DSSC
are PhD graduates.
None do No airlines include Some do Some airline allow
checked bag for checked bag for
free. There exists free.
There is an airline
that allow checked
b ag for free.
MORE EXAMPLES
A. Real-Life Examples of Statements USING Quantifiers
1. Students and Homework
Statement: All students in the class submitted their assignment on time.
Negation: There is at least one student in the class who did not submit their assignment
on time.
2. People and Vaccination
Statement: There is at least one person in the city who received the COVID-19 vaccine.
Negation: No one in the city received the COVID-19 vaccine.
3. Employees and Punctuality
Statement: Every employee in DSSC arrives before 8:00 AM.
Negation: There is at least one employee in DSSC who does not arrive before 8:00 AM.
4. Households and Internet Access
Statement: At least one household in the barangay Matti has no internet connection.
Negation: Every household in the barangay Matti has internet connection.
B. More Examples of Mathematical Statements and Its Negation Using Quantifiers
1. Statement: ∀x ∈ ℝ, x² ≥ 0.
Negation: ∃x ∈ ℝ such that x² < 0.
2. Statement: ∃x ∈ ℤ such that x² = 4.
Negation: ∀x ∈ ℤ, x² ≠ 4.
3. Statement: ∀x ∈ ℕ, x + 1 > x.
Negation: ∃x ∈ ℕ such that x + 1 ≤ x.
4. Statement: ∃x ∈ ℚ such that x < 0.
Negation: ∀x ∈ ℚ, x ≥ 0.
5. Statement: ∀x ∈ ℤ, x + 0 = x.
Negation: ∃x ∈ ℤ such that x + 0 ≠ x.
6. Statement: ∃x ∈ ℝ such that x³ = 8.
Negation: ∀x ∈ ℝ, x³ ≠ 8.
7. Statement: ∀x ∈ ℝ, x + 2 > x.
Negation: ∃x ∈ ℝ such that x + 2 ≤ x.
8. Statement: ∃x ∈ ℕ such that x is even and x > 10.
Negation: ∀x ∈ ℕ, x is not even or x ≤ 10.
Exercise. Write the negation of each statement:
1. Every student if GEC 604 passed the exam.
2. There are professors in DSSC who reside from Davao City.
3. Some students hate mathematics.
4. All smartphones have cameras.
5. There is at least one student under BS Math program who hates
mathematics.
6. None of the parents are happy about the free tuition fee in the higher
education.
TRANSLATING STATEMENTS FROM SYMBOLS TO WORDS
Example:
Write each in words Let p= “” My dog is a golden retriever” and q= “My dog is husky”
a) ¬p
b) ¬p v q
c) P⋀q
d) q↔p
e) ¬p →q
Writing Statements in Symbols
Example: Let p be the statement “ I will buy coke “ and
q be the statement “ I will buy popcorn” .
Write the following in symbols:
1. I will buy coke and I will buy popcorn.
2. I will not buy coke and I will buy popcorn
3. If I will buy coke, then I will buy popcorn.
4. I will buy coke if and only if I will buy popcorn
5. I will buy coke or I will buy popcorn.
LOGICAL OPERATIONS
Logical operations are used to combine or modify statements.
Logical Operations
1. Conjunction (AND, ∧): True if both statements are true.
Example: It is raining AND it is cold. (True only if both are true)
2. Disjunction (OR, ∨): True if at least one statement is true.
Example: It is raining OR it is sunny. (True if either or both are true)
3. Conditional (IF...THEN, →): False only if the first statement is true and the
second is false.
Example: If it rains, then the ground gets wet.
4. Biconditional (IF AND ONLY IF, ↔): True if both statements are either true or
false.
Example: The light is on if and only if the switch is up.
TRUTH TABLE
A truth table is diagram in table form that is used to show when a compound statement
is true or false based on the truth values of the simple statements that make up that
compound statement.
BASIC LOGICAL OPERATIONS
1. Conjunction
Any two propositions can be combined by the word “ and “ to form a compound
proposition called the conjunction. In symbol, we have, p∧q.
Let “p” and “q” be propositions.
Remark 1. If p and q are true, then p∧q is true; otherwise is false.
The truth value of p^q :
p q p ∧q
T T T
T F F
F T F
F F F
Note: It is true only if both propositions are true.
2. Disjunction
It consist of 2 proposition joined by the connective “or” and denoted by “p∨q“
Let “p” and “q” be 2 statements.
The truth value of p^q :
p q p ∨q
T T T
T F T
F T T
F F F
Note: It is false only if both propositions are false or true if at least one is true.
3. Conditional
A conditional Statement is a compound statement which consists of 2
statements joined by the connective “If p, then q”, denoted p → q.
Let “p” and “q” be 2 statements.
Truth Table of p → q:
P Q p→q
T T T
T F F
F T T
F F T
4. Biconditional
A Biconditional statement is a compound statement which consists of 2 statements
joined by the connective “ p if and only if q”, denoted p → q.
Let “p” and “q” be 2 statements.
The Truth Table of p ↔ q:
p q p↔q
T T T
T F F
F T F
F F T
Tautology and Contradiction
Some propositions P (p, q, …) contain only T in the last column of the truth tables or, in
other words, they are true for any truth values of their variables. Such propositions are
called tautologies. Analogously , a proposition P (p, q, …) is called a contradiction if it
contains only F in the last column of its truth table, or in other words, if it is false for
any truth values of the variables.
Example 5. Consider the propositions p∨¬p and p ∧¬p in Tables shown in Fig. 1 and Fig.
2.
p ¬p 𝑝 ∨ ¬p p ¬p 𝑝 ∧ ¬p
T F T T F F
F T T F T F
Example 1. Construct a truth table for ¬(𝒑 ∧ ¬𝒒).
The truth table for the truth value of ¬(𝒑 ∧ ¬𝒒) is shown below.
p q ¬q 𝒑 ∧ ¬𝒒 ¬(𝒑 ∧ ¬𝒒)
T T F F T
T F T T F
F T F F T
F F T F T