Set Theory and Logic
Set theory and logic form the foundation of modern mathematics. It is important to understand these topics, as they introduce many concepts you will find in various branches of mathematics. We will start with set theory and then move into the fundamentals of logic.
Set theory
Set theory is the study of sets, which are essentially collections of objects. Sets can be anything: numbers, people, other sets, and more. There are a few basic concepts that form the basis of set theory.
Basic definitions
A set is usually represented using curly braces. For example, the set containing the numbers 1, 2, and 3 is written like this:
{1, 2, 3}
Each object in a set is called an element or member of the set. We use a special symbol to indicate that an object is an element of a set. If 1 is in the set A
, we write:
1 ∈ A
Normal set
Some standard groupings frequently used in mathematics are:
- Natural numbers:
ℕ = {0, 1, 2, 3, ...}
- Integers:
ℤ = {..., -3, -2, -1, 0, 1, 2, 3, ...}
- Rational numbers:
ℚ
, numbers that can be expressed as a fraction of two integers - Real numbers:
ℝ
, all numbers on the continuous number line
Let's visualize a set using a simple diagram:
In this visual example, set A contains the numbers 1, 2, and 3.
Subsets
If every element of a set B
is also a subset of a set A
, then B
is called a subset of A
. We use the ⊆ symbol to represent this. For example, if:
B = {1, 2}
Then:
B ⊆ A
An important special subset is the empty set, denoted by ∅
or {}
, which has no elements.
Set up operations
Sets can be combined and modified using a variety of operations. Here are the most common operations:
Milan
The combination of two sets A
and B
is a new set that contains all the elements of both sets. It is represented as A ∪ B
A = {1, 2, 3}, B = {3, 4, 5}
A ∪ B = {1, 2, 3, 4, 5}
In the above visualization, the regions covered by circles A and B represent all the elements of A ∪ B
Crossroad
The intersection of two sets A
and B
is the elements that are in both sets. It is represented by A ∩ B
A ∩ B = {3}
In this diagram, only the overlapping portion between the circles represents A ∩ B
Difference
The difference between a set A
and a set B
, denoted A - B
or A B
, refers to the elements in A
that are not in B
A - B = {1, 2}
In the above figure, only the section covered by circle A shows A - B
Logic
Logic is the systematic study of valid rules of inference. It allows us to draw conclusions from premises. Logic is important in mathematical proofs, programming, and philosophical laws, among other things.
Basic logical concepts
A proposition is a declarative statement that is either true or false. Examples include:
- "The world is round."
- "5 is greater than 3"
Propositions are often represented by letters such as p
, q
, and r
. Logical operations applied to these propositions help to build more complex expressions.
Logical operators
Let's look at the basic logical operators:
Denial
The negation of a proposition p
is "not p
", and is denoted as ¬p
. If p
is true, then ¬p is false, and vice versa.
Coordinator
The conjunction of p
and q
is "p and q", denoted by p ∧ q
. It is true only if both p
and q
are true.
Isolation
The disjunction is "p or q", denoted by p ∨ q
. It is true if at least one of p
or q
is true.
Implications
An implication is a logical "if-then" statement, denoted p → q
. It is true unless p
is true and q
is false.
Binary option
A biconditional is a logical "if and only if" statement, denoted by p ↔ q
. It is true only if p
and q
are both true or both false.
Truth tables
Truth tables are a useful tool for determining the truth values of logical expressions based on their individual components. For example, a truth table for p ∧ q
would look like this:
| p | q | p ∧ q | |-------|-------|-------| | true | true | true | | true | false | false | | false | true | false | | false | false | false |
Logical equivalences
Two propositions are logically equivalent if they always have the same truth value. Some notable logical equivalences are as follows:
- De Morgan's laws: These link conjunction and disjunction through negation.
¬(p ∧ q) ≡ ¬p ∨ ¬q
¬(p ∨ q) ≡ ¬p ∧ ¬q
- Double negation: This states that the double negation cancels out.
¬(¬P) ≡ P
- Equivalence rule: Repeating an operation does not change the result.
P ∧ P ≡ P
P ∨ P ≡ P
- Distribution rules:
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
Predicates and quantifiers
Predicates extend propositions by including variables. An example is "x
is greater than 0", where x
is the variable. Adding quantifiers such as "for all" or "there exists" specifies how the variables relate to truth.
Universal quantifiers
Represented by ∀, it states that a proposition is true for all elements in the domain. For example, "Every real number has a square" can be written as:
∀x, x² ≥ 0
Existential quantifier
Denoted by ∃, it states that there is at least one element for which the proposition is true. For example, "There exists a number whose square is 4" can be written as:
∃x, x² = 4
Conclusion
Set theory and logic are fundamental to understanding mathematical reasoning. Understanding these concepts helps to delve further into more complex areas of mathematics and enhances logical thinking abilities. Whether you are solving a math problem, writing a computer program, or creating an argument, knowledge of set theory and logic provides indispensable intellectual tools.