Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Mathematical Foundations of Computer Science
I: Discrete Mathematics
Lecture 1
Mithilesh Kumar
Krea University
July 9, 2025
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Outline
Course Overview
Introduction
Statements and Predicates
Mathematical Logic
Proofs
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Course Overview
▶ Instructor: Mithilesh Kumar
▶ Course: Mathematical Foundations of Computer Science I:
Discrete Mathematics
▶ Course Code: COMP201
▶ Lectures: 4:30 PM Monday + 10:30 AM Thursday at JSW-3E
▶ Evaluation
1. Assignments: 35%
2. Quizzes: 35%
3. Final Exam: 30%
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Objectives
▶ Basic foundational vocabulary of mathematics.
▶ Ability to write logically rigorous proofs.
▶ Understanding of the properties of various kinds of discrete
mathematical objects, and ability to prove the same.
▶ Ability to use mathematical induction to prove theorems.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Reasoning process
▶ What is mathematical
thinking?
▶ What is logic?
▶ What is proof?
▶ What are mathematical
foundations of computer
science?
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
True or False?
1. The points (−1, 1), (2, −1) and (3, 0) lie on a line.
2. If x is an integer, then x 2 ≥ x.
3. If x is an integer, then x 3 ≥ x.
4. For all real numbers x, x 3 = x.
5. There exists a real number x such that x 3 = x.
√
6. 2 is an irrational number.
7. If x + y is odd and y + z is odd, then x + z is odd.
8. If x is an even integer, then x 2 is an even integer.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
More true or false
1. Every positive integer is the sum of distinct powers of two.
2. Every positive integer is the sum of distinct powers of three.
3. If x is an integer, then x is even or x is odd.
4. If x is an integer, then x cannot be both even and odd.
5. Every even integer greater than 2 can be expressed as the sum
of two prime numbers.
6. There are infinitely many prime numbers.
7. For any positive real number x there exists a positive real
number y such that y 2 = x.
8. Given three distinct points in space, there is one and only one
plane passing through them.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Statements
▶ A statement is a sentence that is either true or false, but not
ambiguous.
▶ P : This is a true statement. [Self-referential statement]
▶ Q : This is a false statement. [Self-referential statement]
▶ The truth assignment can be unknown but not ambigous.
▶ This is a beautiful painting. [X]
▶ You are a good question. [X]
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Predicates
▶ A sentence with a free variable in it that becomes a statement
when the free variable takes on a particular value is called a
predicate.
▶ P(x) : x > 0
▶ P(1) is true.
▶ P(−1) is false.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
More examples
▶ P(x, y ) : x 2y = 1 [A predicate with 2 variables]
▶ P(x1 , ..., xn , z) : i ai xi = z [A predicate with n + 1 variables.]
P
▶ One-by-one substitution of values for variables can convert a
predicate to a statement.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Quantification
▶ A predicate can be converted into a statement using
quantifiers like ”For all” and ”There exists...such that”.
▶ P(x) : There exists x such that x > 0.
▶ Q(x) : For all x > 0, 2x > 0.
▶ The process of using quantifiers to make statements out of
predicates is called quantification.
▶ ”For all” is called the universal quantifier and ”there
exists...such that” is called the existential quantifier.
▶ ”There exists” implies that there is at least one.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Quantifier notations
▶ ”For all” is denoted by ∀.
▶ P(x) : ∀x > 0, 2x > 0
▶ Q(x, y ) : ∀x, y ∈ R, y 2 = 2x
▶ ”There exists” is denoted by ∃ and ”such that” by ∋.
▶ P(x) : ∃x ∈ R ∋ x 2 − 1 = 0
▶ Q(x, y ) : ∃x, y ∈ R ∋ x 2 + y 2 = 1
▶ ∋ is not used as much.
▶ P(x) : ∃x ∈ R, x 2 − 1 = 0
▶ Q(x, y ) : ∃x, y ∈ R, x 2 + y 2 = 1
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Quantifier remarks
▶ Quantified variables are called bound variables.
▶ A sentence with only bound variables is a statement.
▶ P(x, y ) : x 2 + y 2 = 1 is a predicate with free variables x, y .
▶ Q(x, y ) : ∀x ∈ R, x 2 + y 2 = 1 is a predicate with bound
variable x and free variable y .
▶ R(x, y ) : ∀x ∈ R ∃y ∈ Z, x 2 + y 2 = 1 is a statement with
bound variables x, y .
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Quantifier remarks
▶ Order of quantifiers matters if they are different.
▶ P(x, y ) : ∀x∃y , y 2 = x [True]
▶ Q(x, y ) : ∃y ∀x, y 2 = x [False]
▶ There are six ways to quantify predicates of two variables.
▶ ”for all” = ”for any” = ”for every”
▶ ”there exists” = ”for some”
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Mathematical Implication
▶ On interprets ”If A, then B” as a statement by assuming
universal quantification over the variable(s).
Definition
A statement of the form ”If A, then B” where A and B are
statements or predicates, is called an implication. A is called the
hypothesis and B is called the conclusion.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Examples
▶ If x + y is odd and (y + z) is odd, then x + z is odd.
▶ If x is an integer, then x is either even or odd, but not both.
▶ If x 2 < 17, then x is a positive real number.
▶ If x is an integer, then x 2 ≥ x.
▶ If f is a polynomial of odd degree, then f has at least one real
root.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
General form of mathematical statements
▶ Most statements can either be written as implication or
quantified by existential operator.
√
▶ 2 is an irrational number. ≡ If x > 0 and x 2 = 2, then x is
irrational.
▶ For all real numbers x, x 3 = x ≡ If x is real number, then
x 3 = x.
▶ There exists a real number x, such that x 3 = x.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Truth of implication
▶ P(x): If x is even integer, then x is divisible by 3.
▶ A(x) : x is even integer. B(x) : x is divisible by 3.
▶ x = 6: A(6) is true, B(6) is true. : P(6) is true.
▶ x = 4: (A(4)) is true, B(4) is false. : P(4) is false.
▶ x = 9: A(9) is false, B(9) is true. : P(9) is true.
▶ x = 7: A(7) is false, B(7) is false. : P(7) is true.
▶ A value of x that makes the hypothesis A true and the
conclusion B false is called a counterexample.
▶ In implication in which the hypothesis is false is said to be
vacuously true.
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Truth of implication
A B If A, then B
T T T
T F F
F T T
F F T
▶ ”If A, then B” = ”A is sufficient for B” = ”B is necessary for
A” = ”B, if A” = ”A only if B”
Question
Can we redefine implication?
Question
What is the table for if not B, then not A?
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University
Course Overview Introduction Statements and Predicates Mathematical Logic Proofs
Compound Statements and Truth Tables
▶ Create compound statements using and, or, not and if
and only if.
A B A =⇒ B A∧B A∨B ¬A A ⇐⇒ B
A≤B A×B A+B ≥1 1−A A=B
1 1 1 1 1 0 1
1 0 0 0 1 0 0
0 1 1 0 1 1 0
0 0 1 0 0 1 1
Mathematical Foundations of Computer Science I: Discrete Mathematics Krea University