- [[Wason four-card selection task]], [[biconditional implication|bidirectional implication]], [[ex falso quodlibet]], [[necessity and sufficiency propositional logic]], [[logical implication examples - translating language to logic]]
# Idea
A logical implication is a concept in [[propositional logic systems]] that describes the relationship between two propositions, where one statement (the *antecedent*) implies the truth of the other statement (the *consequent*). We use the [[implication operator]]:
$p \rightarrow q$
If the antecedent $p$ is true, the consequent $q$ must be true.
$q$ logically follows from $p$.
Note that propositions can be valid without being meaningful/reasonable.
Valid but not meaningful: If I eat cake $p$, then I like cats $q$.
Examples
- If I win the lottery ($p$), then I will retire ($q$).
- If it is raining, then I will take a coat to work.
Note $p \rightarrow q$ says only the following: If I win the lottery $p$, then I will definitely retire $q$. It says **nothing** about what happens on the condition that I don't win the lottery ($\neg p$). It also does not say that the **only** condition for me to retire is when I win the lottery.
- also valid: $\neg p \rightarrow q$, $\neg p \rightarrow r$, $\neg p \rightarrow s$
- I did not win the lottery $\neg p$, and I retired $q$.
- I did not win the lottery $\neg p$, and I traveled $r$.
- also valid: $a \rightarrow q$, $b \rightarrow q$
- I'm tired $a$, I retired $q$.
- I'm old $b$, I retired $q$.
## Antecedent and consequent
The consequent $q$ logically follows from the antecedent $p$.
$\neg p$: If the antecedent $p$ is false, the consequent $q$ is considered to be true because a false antecedent $p$ cannot prove or disprove the truth of the consequent $q$.
If it is sunny outside $p$, then the temperature is warm $q$.
- If $\neg p$, we cannot infer anything about the temperature $q$, so $q$ is considered to be true.
If we get a null result $\neg p$, we cannot infer anything about the observed effect.
### Classical logic and truth table
In classical logic, the implication statement $p \rightarrow q$ is defined as being *false only when $p$ is true and $q$ is false* (row 3 in table below). This definition aligns with the principle that *a false statement cannot imply a true statement*. See [[ex falso quodlibet]].
Below is a [[truth table]] representing [[logical implication]]. Each column reflects the possible truth values for proposition $p$ (0 or 1), $q$ (0 or 1), and $p \rightarrow q$.
To interpret the truth table below, ask, if I observe a particular truth value (0 or 1) for $p$ (or for $q$), what does it say about the implication statement $p \rightarrow q$? Do the truth values of $p$ and $q$ affirm or refute the implication statement $p \rightarrow q$?
The truth table for this proposition would display all possible combinations of the truth values of $p$ and $q$, along with the resulting truth value of the proposition $p \rightarrow q$ .
Note that only the conditions in row 3 falsify $p \rightarrow q$.
| $p$ | $q$ | $p \rightarrow q$ (truth value of the compound proposition) |
| ---- | ---- | ---- |
| 0 | 0 | 1 ($p \rightarrow q$ is true: $\neg p$, a false antecedent, does not promise or imply anything about the truth of $p \rightarrow q$) |
| 0 | 1 | 1 ($p \rightarrow q$ is true: $\neg p$, a false antecedent, does not promise or imply anything about the truth of $p \rightarrow q$) |
| 1 | 0 | **0** ($p \rightarrow q$ is **false**: a true statement $p$ led to a false statement $q$) |
| 1 | 1 | 1 ($p \rightarrow q$ is true: both $p$ and $q$ are true, the promise of the implication satisfied) |
Take the implication statement, $p \rightarrow q$: If it is sunny outside, then the temperature is warm. The only way to falsify the implication statement $p \rightarrow q$, is to find a case where $p$ is true and $q$ is false (row 3).
- It's sunny outside $p$, but the temperature is not warm, $\neg q$, so $\neg (p \rightarrow q)$. See row 3 in truth table above.
- It's not sunny $\neg p$ and it's not warm $\neg q$, so we can't falsify $p \rightarrow q$, so we consider it to be true. See row 1.
- It's not sunny $\neg p$ and it's warm $q$, so we can't falsify $p \rightarrow q$, so we consider it to be true. See row 2.
- It's sunny $p$ and it's warm $q$, so we observed $p \rightarrow q$ but also cannot falsify it, so we consider it to be true. See row 4.
## English
All the following are equivalent to $p \rightarrow q$.
- if $p$, then $q$
- $p$ implies $q$
- if $p, q$
- $q$ if $p$
- $q$ whenever $p$
- $q$ when $p$
- $q$ follows from $p$
- $q$ unless $\neg p$
Importantly, $p \rightarrow q$ is also the following:
- $p$ is *sufficient* for $q$
- $p$ being true guarantees that $q$ is true
- a sufficient condition for $q$ is $p$
- $q$ is *necessary* for $p$
- For $q$ to be true, $p$ must also/always be true. $q$ cannot be true unless $p$ is true.
- $p$ only if $q$ (or $q$ is necessary for $p$)
See [[necessity and sufficiency propositional logic]].
### Trickier example
Consider $p$ only if $q$.
If $q$ is false, what is $p$? It says that $p$ can be true only if $q$ is true, which is to say that when $q$ is false, $p$ must also be false.
If $q$ is true, what is $p$? This does not say anything about $p$ if $q$ is true.
Consider the following example: The shower is on $p$ only if the tap is open $q$.
If the shower is on, then the tap must be open, since if the tap is not open $\neg q$ then no water will flow and the shower is not on $\neg p$.
However, if the tap is open $q$ it does mean the shower is on as there could be some other plumbing issue (not necessarily $p$).
# References
- [Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera](https://www.coursera.org/learn/an-introduction-to-logic-in-computer-science/supplement/nxMZ7/implication-operator)