7.2. Logical Predicates - JulTob/Mathematics GitHub Wiki
Propositions
A $\color{Silver}Proposition$ is a declarative sentence that is either $\color{Lime}true$ or $\color{Tomato}false$
To put it simply, ambiguous sentences that produce different reactions depending on whom you ask are not propositions.
Implication
In situations where we know that βif P then Qβ is true, but don't know anything about its converse βif Q then Pβ
we say that βP entails Qβ and that βQ could entail P.β
\color{Gold}
PβQ
flowchart LR
P --> |True|Q
Q --> |Not necessarily True|P
Equivalence
\color{Goldenrod}
PβQ
flowchart LR
P --> |True|Q
Q --> |True|P
Predicate Logic in Set Theory
Predicate logic extends the exploration of sets by introducing predicates
$π·(π₯)$, $πΈ(π₯)$, β¦
that describe properties of elements within a Universal set $π$. These predicates facilitate the formation of sub-sets based on logical conditions, illustrating the nuanced relationships within and between sets.
Negation
The negation of a predicate defines a set excluding elements that satisfy $π·(π₯)$.
\color{tomato}
Β¬π·(π₯)
Conjunction
The logical OR combines sets under predicates $P$ and $Q$.
\color{gold}
π·(π₯) β¨ πΈ(π₯)
Implication
Implies a logical progression from $P$ to $Q$
\color{violet}
π·(π₯) β πΈ(π₯)
A set $πΉ$ defined by
\color{cyan}
πΉ = ο½ π₯ β πΈ β£ π·β¨π₯β© β§ Β¬π·β¨π₯β© ο½= β
illustrates the application of predicates to determine membership based on specified properties.
Natural Numbers and the Axioms of Peano
Natural numbers
\color{gold}
βΒΊ=ο½0,1,2,3,4,5,.,.ο½
\color{silver}
ββΊ=ο½1,2,3,4,5,.,.ο½
are foundational in mathematics, described by the Axioms of Peano:
Axioms of Peano
- Zero is a natural number: $0={}=β
$
- Zero is the First Element
- Every natural number $π$ has a successor $π+1$
- $\color{salmon} 1 = ο½β ο½ = ο½0ο½$
- $\color{salmon} 2 = ο½β , ο½β ο½ ο½ = ο½0,1ο½$
- $\color{salmon} π+1 = ο½0,1,2.,.nο½$
- Is Orderly:
- If $\color{tomato} n+1 = m+1 β n = m$
- Induction
- If a property holds for zero.
- If it holds for $n$, then implies it holds for $n+1$
- β΄ Then it holds for all Natural Numbers.
Mathematical Induction
Mathematical induction allows the proof of properties across natural numbers.
The structure of induction follows this steps:
- π·β
- π·βοΏ«π·βββ
- β π·β
\color{silver}
\begin{align}
\text{Step} && \text{Formula} && \text{Description} \\
1 && \sum \frac{n}{2^n} = 2 - \frac{(n+2)}{2^n} && \text{Sum formula for series}\\
2 && n=0 && \text{Base case evaluation }\\
2.1 && \frac{0}{2^0} = 2 - \frac{(0+2)}{2^0} && \text{Substituting 0 into the formula}\\
2.2 && 0 = 2 - \frac{2}{1} = 0 && \text{Simplifying the expression }\\
3 && \sum \frac{n+1}{2^{n+1}} = 2 - \frac{(n+3)}{2^{n+1}} && \text{Sum formula for } (n+1) \\
3.1 && \sum \frac{n}{2^n} + \frac{n+1}{2^{n+1}} && \text{Separating} (\frac{n+1}{2^{n+1}}) \text{from the series for n} \\
3.2 && 2 - \frac{(n+2)}{2^n}) + \frac{n+1}{2^{n+1}} && \text{Utilizing the original sum formula} \\
3.3 && 2 - \frac{ 2 (n+2) - n - 1 }{ 2^{n+1}} && \text{Combining terms under a common denominator} \\
3.4 && 2 - \frac{ 2n + 4 - n -1 }{ 2^{n+1} } && \text{Simplifying the numerator} \\
3.5 && 2 - \frac{ n + 3 }{ 2^{n+1} } && \text{Further simplification} \\
3.6 && 2 - \frac{ (n + 1) + 2}{2^{n+1}} && \text{Final form of the expression} \\
4 && \text{Quod erat demonstrandum} && \text{Conclusion} \\
\end{align}
Quantifiers in Set Theory
In the realm of mathematics, particularly within the universe of set theory, quantifiers act as the bridge between the abstract and the specific. They are the mathematical equivalent of existential ponderings and universal truths.
We consider a Set $πΈ$, with element $π₯$, with a predicate $π·$ :
- When we say an element ($π₯$) belongs to a set ($πΈ$), we're describing a relationship where ($π₯$) is one of the objects that make up the set ($πΈ$), denoted as ($π₯βπΈ$).
- A predicate ($π·$) in this context is a condition or property that elements of the set may or may not satisfy. Predicates are functions that return a boolean value, true or false, depending on whether the element in question satisfies the given condition. For instance, a predicate might be defined to test whether numbers in a set are even, prime, greater than a certain value, and so on.
Universal Quantifier: $β$
Imagine walking into a vast library, each book representing an element of set ($πΈ$). The statement ($βπ₯βπΈ:π·(π₯)$) is akin to declaring, "Every single book in this library is a masterpiece." The universal quantifier $β$ speaks to every element without exception, imposing a blanket statement of truth across the entire set.
βπ₯ β πΈ : π·(π₯)
This can be interpreted as "For every element ($π₯$) within set ($πΈ$), property ( $π·(π₯)$ ) holds true."
- All ($π₯$) in ($πΈ$) is ($ π·(π₯) $)
- For all π₯ in πΈ, π·(π₯)
βπ₯ : π·(π₯)
All π₯ is π·
For All π₯, property π· holds
β πΈ = {βπ₯ : π·(π₯) }
β π·(π₯β) β§ π·(π₯β) .β§. π·(π₯β) β¦
This statement asserts that every element ($π₯$) in the domain under consideration satisfies the property ($π·$). It's a universal claim about the elements in question, implying a broad applicability of ($π·$).
Existential Quantifier: $β$
Contrast this with the existential quantifier ($β$), which takes a more nuanced approach. It suggests the presence of at least one element within the set that satisfies a given property. Using the library analogy, ($βπ₯ β πΈ : π·(π₯)$) is like saying, "Within this vast collection, there exists at least one book that will change your life."
βπ₯ β πΈ : π·(π₯)
- There exists an $π₯$ in $πΈ$ that is $π·(π₯)$
This translates to "There exists an element ($π₯$) within set ($πΈ$) for which property ($π·$) is true."
Imagine searching for a book written by an author born on February 29. Finding just one such book confirms the existence statement: ($βbook : \text{author was born on a leap day}$) .
βπ₯ : π·(π₯)
- "There exists an ($π₯$) such that $π·(π₯)$ is true."
- "Some ($π₯$) is $π·(π₯)$."
- "It exists an ($π₯$) such as $π·(π₯)$."
This statement asserts that there is at least one element ($π₯$) within the domain under consideration for which the property ($π·$) holds. It does not claim that ($π·$) holds for all elements, just that at least one such element exists.
βπ₯ β πΈ : π·(π₯)
- Let ($πΈ$) be any set for which there exists an ($π₯$) such as ( $π·(π₯)$ )
π·{πΈ}β β
- The subset of πΈ that satisfies π· is not empty
π·π₯β β¨ π·π₯β .β¨. π·π₯β β¦
- At least one element's existence proves the statement.
Example: Even Numbers (πβ)
\begin{aligned}
\text{Pares:} && πβ & \\
&& = & \{ π₯ββ β£ βπ β β : π₯ = ππ \} \\
&& = & \{ ππ β£ πββ \}
\end{aligned}
This defines the set of all even natural numbers. An even number is any number that can be expressed as ($ππ$) where ($π$) is a natural number ($β$). This definition uses the concept of existential quantification ($β$) to express that for any even number ($π₯$), there exists a natural number ($π$) such that ($π₯ = ππ$).
\begin{aligned}
βπ₯ββ : && \\
&& π₯Β²-1 = (π₯+1)(π₯-1)
\end{aligned}
This statement says that for all real numbers $π₯$ ($β$), the expression ($x^2β1$) can be factored into ($(x+1)(xβ1)$). It demonstrates a universally true algebraic identity, applying universally across the real numbers ($β$).
Example: Solution to a Linear Equation
\begin{aligned}
βπ₯ββ: & \\
& π₯+5=3 \\
\end{aligned}
This example states that there exists a real number ($π₯$) that solves the equation ($π₯+5=3$). The implication is that such an ($π₯$) exists, and solving the equation yields ($π₯ = 2$) satisfying the existential quantifier ($β$) by showing at least one solution exists within the real numbers.
\begin{aligned}
βx β \text{Crows},Black(x) && \text{All crows are black} \\
\{βSwans\}Black && \text{Some swans are black} \\
\end{aligned}
π·π₯=πΈπ₯ βΊ βπ₯βπΈ: π·π₯β·πΈπ₯
Negaciones
Β¬(βπ₯: π·π₯) β βπ₯ : Β¬π·π₯
Β¬({βπ₯}π·π₯) β {βπ₯}Β¬π·π₯
Β¬(βπ₯: π·π₯) β βπ₯: Β¬π·π₯
Β¬({βπ₯}π·π₯) β {βπ₯}Β¬π·π₯
DemostraciΓ³n por contraejemplo
Complemento
πβπΈ
Β¬πΈ =πΈΝ = π-πΈ
= { π₯βπ β£ π₯βπΈ }
= { π₯βπ: Β¬π·π₯}
Ej: Impares:
π = Β¬β = Β¬πβ
= { π₯ββ β£ βπββ : Β¬(π₯=ππ) }
= { π₯ββ β£ βπββ : π₯=ππ+π }
Particiones
πβ¨πΈβ©
={βπΉ: πΉβπΈ}
β
βπβ¨πΈβ©
πΈβπβ¨πΈβ©
Ejemplo:
πΈ={1,2}
β πβ¨πΈβ© = {β
,{1},{2},{1,2} }
Sentential Logic
all and every
some, there is, and there exists
an intersection. For example, when you say, βSome of my teachers are nice,β you mean that thereβs an intersection between the set of your teachers and the set of nice things.
no, there is no, and none
if...then and but or
not unless though every
all every each there is
there exists some there is no none
Argument
The premises are the facts of the matter: The statements that you know (or strongly believe) to be true. In many situations, writing down a set of premises is a great first step to problem solving.
an argument also includes intermediate steps that show how the premises lead incrementally to that conclusion.
The conclusion is the outcome of your argument.
After youβve built an argument, you need to be able to decide whether itβs valid, which is to say itβs a good argument.
hidden premise called an enthymeme
Uncovering hidden premises in real-world arguments is more related to rhetoric, which is the study of how to make cogent and convincing arguments.
The law of identity states that every individual thing is identical to itself.
x is x
x=x
The law of the excluded middle The law of the excluded middle states that every statement is either true or false. Rather, in logic, every statement is either completely true or completely false.
π : {0,1} = {False,True} : Boolean
type Boolean is (False, True);
------
Flag : Boolean := True
and
or
not
xor
/=
=
and then --Stops when a false is found
or else --Stops when a true is found
in -- Belongs to a set type
The law of non-contradiction states that given a statement and its opposite, one is true and the other is false.
p and not p = false
Other Logics
Boolean logic Modern logic Quantifier logic Classical logic Multi-valued logic Quantum logic Formal logic Non-classical logic Sentential logic Fuzzy logic Predicate logic Syllogistic logic Informal logic Propositional logic Symbolic logic