Equivalences (part 1)
Propositional Equivalences:
Two given Formula A and B are equivalent if they have the SAME truth tables, this is denoted by the symbol: ≡
A ≡ B means that A and B always have the same truth values, regardless of how the variables are assigned. ≡ is NOT a connective, meaning it does not directly influence the outcomes of each of the given propositions, it is instead a relation
De Morgan’s Laws & Equivalence
De Morgan’s laws are pretty basic laws that basically follow the rules of common sense if you really think about it:
1. ¬(p ^ q) ≡ ¬p ∨ ¬q
This basically means that NOT p and q is the same thing as saying not q or not q. This makes sense if you really think about it because for an evaluation of p ^ q to be true, it means that both values have to be true, and so not true is false. So, you just make sure that both values in the or are also false.
This makes the sense on a deeper level as well, for any outcome these two propositions will have the same outcome, matter of fact here is the truth table for it:
| p | q | ¬(p ^ q) | ¬p V ¬q |
|---|---|---|---|
| 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 |
| 0 | 0 | 1 | 1 |
Basically given the fact that the inverse happens, you can see that the both of the expressions evaluate out to have the same values no matter what the input is. This is because a true value always gets flipped to a false value, and then a false one to a true
The second Law of De Morgan says:
2. ¬(p V q) ≡ ¬p ^ ¬q
This is basically the same thing as the other one, but just with reversed logic, it still has the same truth table for both of the sides of the relation
| p | q | ¬(p V q) | ¬p ^ ¬q |
|---|---|---|---|
| 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 |
It is the same logic, a truth becomes a false and a false becomes a truth. The thing is this is important because it tells how to distribute a ¬ symbol. You basically can distribute out the symbol and then flip the given sign from either an ^ to V or a V to ^
Example: Negate the following
- It is a Wednesday and it is not sunny;
p = it is a wednesdayandq = it is sunny- Current equation:
p ^ ¬q - Negated equation:
¬(p ∧ ¬q) ≡ ¬p ∨ q
This therefore becomes the statement of: “It is not a Wednesday, or it is sunny”
Another Important Equivalence:
(p → q) ≡ (¬p ∨ q)
How would you write the right hand side using conjunction? (the and operator)
Basically the way you would do this is to “factor out” the ¬ symbol, which lets you then also inverse the operator:
(¬p ∨ q) ≡ ¬(p ∧ ¬q)
Contrapositive: p → q ≡ ¬q → ¬p
Equivalences (part 2)
You can basically rewrite some different operators using different operators, you can for example change the disjunction / ∨ operator and rewrite it using negation / ¬ and conjunction / ∧
So, is it possible to convert ALL operators to conjunction and negation, not just disjunction.
For disjunction we know we can just use De Morgan’s law:
(p ∧ q) ≡ ¬p ∨ ¬q
For something like the implication or → operator, we know we can convert this to disjunction using the rules of Tautology, meaning we can also then prove it is equal to a given formula of conjunction and negation
p → q ≡ ¬p ∨ q (since they always give the same output)
(¬p ∨ q) using De Morgan's, make the disjunction a negation/conjunction
(¬p ∨ q) ≡ ¬(p ^ ¬q)
BAM: so basically this covers all of it, given that we can rewrite both a disjunction and an implication this means that we can actually rewrite ALL logical formulas using these two operators
Example Problem:
Rewrite the given equation using only conjunction and negation
p ∨ (q → r)
1. rewrite the righthand side as a disjunction
p ∨ (q → r) ≡ p ∨ (¬q ∨ r)
2. Now go ahead and negate everything to make it all conjunctions
p ∨ (¬q ∨ r) ≡ ¬¬(p ∨ (¬q ∨ r)) ≡ ¬(¬p ^ (q ^ ¬r))
So the double negation that is going on in the second step of this whole thing is because if you think about it p ∨ (¬q ∨ r) ≡ ¬(p ∨ (¬q ∨ r)) can never be true because it would always be the opposite of the left hand side, you have to cancel out the negation with another negation to maintain equivalence, so you end up needing to do ¬¬(p ∨ (¬q ∨ r)), and then you still need to distribute just one negation in order to go from dis junctions to conjunctions, and hence why one stays and one does not
Example:
Without using a truth table, show that the following statement is true:
¬(∃x[P(x)∧Q(x)]) ≡ ∀x[P(x)→¬Q(x)]
In English this God forsaken looking equation means that negation of exists an X such that P(X) and Q(x) equals to for all x P(x) implies not Q(x)
- The negation of
∃xis actually∀xso¬(∃x[P(x)∧Q(x)])can be rewritten as∀x¬[P(x)^Q(x)] - Then, using De Morgan’s law you can calculate the negation of the items inside of the brackets
¬[P(x) ^ Q(x)] ≡ [¬P(x) ∨ ¬Q(x)], and then you add in the original bit and get∀x[¬P(x) ∨ ¬Q(x)] - Using one of the important equivalences we know that this can basically be rewritten as well to become
∀x[P(x) → ¬Q(x)becausep → q ≡ p ∨ ¬q
First-Order Logic
Important Notions:
Predicates that describe properties of objects:
- An example would the Odd(3) means 3 is an odd number, here Odd is the predicate, and 3 is an object
- Equal(5, 6) means 5 and 6 are equal, Equal here is the predicate and 5 & 6 are the objects
Predicates take arguments and become propositions, which can either be true, or false, and then you can basically apply the connectives in the same way that you would for a regular proposition.
This basically means that you can have a shorthand way of representing some form of logic, so basically Equal(5, 6) would be false because the two are not equal, but its a shorthand way of saying “5 is equal to 6” as a proposition
- You can basically have something like Odd(3) ^ Prime(3), which means 3 is Odd and 3 is Prime, which are both true statements
Quanitifers
Quantifiers make reasoning on multiple different objects. The objects for the quantified statements are chosen from a Domain
The first one is the Existential Quantifier as denoted by ∃,
- it basically means hey, this thing exists, so something like
∃x "some formula"and this means that There is exists an X where some formula is true, or well, “for some X” or “there exists an X” which mean the same thing - Example:
∃x Odd(x), it means that for some X, the X is odd, or there exists an X where X is odd pretty much, which is true - It is enough to fine ONE element to make this formula true
The second one is the Universal Quantifier as denoted by ∀,
- It basically means that, for all given X, this formula is true
- Example:
∀x Odd(x) v Even(x), this means that for all exist, X is either odd or X is even, this is obviously true. - There is also something like
∀x (x < x+1)which means that for ALL exist, x is less than whenever you add one to X, which obviously is logically true. - It is not enough to find some elements fitting the formula, ALL elements must match the formula for it to be true
Translating from English to Math
- All Ps are Qs translates as
∀x(P(x) → Q(x))
There also exist things called counter examples which prove that a universally quantified statement is false. Take for example ∀x (Prime(x) → Odd(x)) this basically says that for all X that are prime, X is also odd. This can easily be disproven when we let X = 2, which is both a prime and an even number. Disproving the example.
It can be a lot more challenging to prove something is universal than it would to disprove the fact that something is not universal, this is very logical, and you can basically use the Existential Quantifier in order to disprove a Universal Quantifier, you basically just take the negation of whatever the Universal quantifier is trying to say, and prove there exists some value that satisfies the condition
So basically you can disprove ∀x (Prime(x) → Odd(x) by showing that ∃x (Prime(x)^¬Odd(x)), and notice this is basically the negation here right, and not odd is basically just Even()
How would you define Quantifier statements to connectives
∃x, P(x)and domain isD = {x1, x2, ... , xn}means that there exists some X on the domain of D that satisfies the condition of P(x), and is basically the same thing as saying thatP(x1) v P(x2) V ... V P(xn)
Counter to that:
∀x, P(x)on the domain ofD = {x1, x2, ... , xn}means that all of the given X values on the domain would all satisfy the condition of P(x), so basically the same thing as saying:P(x1) ∧ P(x2) ∧ ... ∧ P(xn)
Given the fact that you can now use a quantifier and basically make it logically sound with something like a conversion from a quanitifer to a proposition on a given domain, you can also actually apply De Morgan’s law to it:
P(x1) ∧ P(x2) ∧ ... ∧ P(xn) ≡ ¬P(x1) ∨ ¬P(x2) ∨ ... ∨ P(xn)
This basically means that you can end up negating a given value for each of the given quantifiers, which if you look at it also would basically let you understand what the negation values for each quantifier would be,
you can have something like ¬∀x P(x) actually then be equal to ∃x ¬P(x) and then conversely you can have something like ¬∃x P(x) be equal to ∀x ¬P(x) which is kind of like what De Morgan’s law had before hand, where you just distribute the negation and then flip the sign
Example:
Negate the Following:
∀x(p(x) → q(x))
Changing to a disjunction
¬∀x(p(x) → q(x)) ≡ ∃x ¬(p(x) → q(x))
Use De Morgan's
∃x ¬(p(x) → q(x)) ≡ ∃x ¬(¬p(x) v q(x))
∃x ¬(¬p(x) v q(x)) ≡ ∃x(p(x) ∧ ¬q(x))
So: ¬∀x(p(x) → q(x)) ≡ ∃x(p(x) ∧ ¬q(x))
Book Reading:
This essential reading covers the subjects that you have studied in Topic 1 (Weeks 1 and 2). There are detailed explanations along with a variety of examples to enable you to better understand concepts such as propositions, tautologies, De Morgan’s law, first-order logic and quantifiers. We strongly recommend that you to first watch the videos and then study the essential reading.
- Read Koshy, Chapter 1.3.
Notes on Chapter 1.3:
Look at this difference in Propositions:
- People are Mortal
- All People are Mortal
- Computers are a 16-bit Machine
- Some computers are a 16-bit Machine
The difference here is the words like all, every, none, some, and one, and these are called Quantifiers and they are basically giving you an idea of how many objects hold that property
There is really only two categories of quantifiers:
- universal quantifiers as denoted by
∀ - existential quantifiers as denoted by
∃
Universal quantifiers stand for “for all” or “for each”
Existential quantifiers stand for “there exists” or “at least one”
This means you can actually rewrite quantifier propositions as both words and as a numeric expressions, so All apples are green becomes ∀x(x is green) where x is obviously the apple or ∀x(P(x)) where P(x) = x is green
In the above example P(x) is called the predicate, and it states the property the object X has. Given that P(x) involves only one variable, it is called a unary predicate. Then the set of all values x can have is called the universe of discourse (UD)
For some ground rules here, P(x) is NOT A PROPOSITION as long as x does not have a given value. It is not defined because X itself is not bound to a given universe of discourse. However, as soon as you do bind it to a given universe of discourse, then P(x) is in fact a proposition, but not one with a fixed value yet, this is called a free variable because x can vary over the universe of discourse. However, as soon as you assign it to a quantifier, it becomes defined and has a set truth value, so something like ∀x(P(x)) now is no longer free to vary.
A given predicate may contain more than one variable so P(x, y) this is now a binary predicate, and can be something like P(x, y) = x is always green and y is always blue or P(x, y) = For each integer x, there exists an integer y such that x + y = 0.
The solution, or well at least how you would write it out symbolically for that second one is: (∀x)(∃y)(x+y = 0) Notice the use of two quantifiers, this is generally because given binary predicates would require the need for two different quantifiers.
The order of these matters to a given degree, if the quantifers are of different types then it does seem to matter, however if they are of the same type then it seems to not matter as much, but there is logical implications to this as well, here is the book excerpt for this:
De Morgan’s laws and the negation of quantifier propositions
This is pretty much it, I mean you just basically invert the sign (I think the actual smaller image here might have a typo in regard to that), but the negations are really logical, if you basically say that there exists a fact for all of something, you just need to disprove that once. Equally, if you say something is true for something else at least once, you just need to prove it is wrong every single time.
*THE ABOVE HAND IS ALL CALLED PREDICATE LOGIC, WEEK 1 FOCUSED ON SOMETHING CALLED PROPOSITIONAL LOGIC




