113 lines
3.2 KiB
Markdown
113 lines
3.2 KiB
Markdown
# ECE 108: Discrete Math 1
|
|
|
|
An **axiom** is a defined core assumption held to be true.
|
|
|
|
!!! example
|
|
True is not false.
|
|
|
|
A **theorem** is a true statement derived from axioms via logic or other theorems.
|
|
|
|
!!! example
|
|
True or false is true.
|
|
|
|
A **proposition/statement** must be able to have the property that it is exclusively true or false.
|
|
|
|
!!! example
|
|
The square root of 2 is a rational number.
|
|
|
|
An **open sentence** becomes a proposition if a value is assigned to the variable.
|
|
|
|
!!! example
|
|
$x^2-x\geq 0$
|
|
|
|
## Truth tables
|
|
|
|
A truth table lists all possible **truth values** of a proposition, containing independent **statement variables**.
|
|
|
|
!!! example
|
|
| p | q | p and q |
|
|
| --- | --- | --- |
|
|
| T | T | T |
|
|
| T | F | F |
|
|
| F | T | F |
|
|
| F | F | F |
|
|
|
|
## Logical operators
|
|
|
|
!!! definition
|
|
- A **compound statement** is composed of **component statements** joined by logical operators AND and OR.
|
|
|
|
The **negation** operator is equivalent to logical **NOT**.
|
|
|
|
$$\neg p$$
|
|
|
|
The **conjunction** operaetor is equivalent to logical **AND**.
|
|
|
|
$$p\wedge q$$
|
|
|
|
The **disjunction** operator is equivalent to logical **OR**.
|
|
|
|
$$p\vee q$$
|
|
|
|
### Proposation relations
|
|
|
|
!!! definition
|
|
A **tautology** is a statement that is always true, regardless of its statement variables.
|
|
|
|
The **implication** sign requires that if $p$ is true, $q$ is true, such that *$p$ implies $q$*. The first symbol is the **hypothesis** and the second symbol is the **conclusion**.
|
|
|
|
$$p\implies q$$
|
|
|
|
| $p$ | $q$ | $p\implies q$ |
|
|
| --- | --- | --- |
|
|
| T | T | T |
|
|
| T | F | F |
|
|
| F | T | T |
|
|
| F | F | F |
|
|
|
|
The **inference** sign represents the inverse of the implication sign, such that $p$ **is implied by** $q$. It is equivalent to $q\implies p$.
|
|
|
|
$$p\impliedby q$$
|
|
|
|
The **if and only if** sign requires that the two propositions imply each other — i.e., that the state of $p$ is the same as the state of $q$. It is equivalent to $(p\implies q)\wedge (p\impliedby q)$.
|
|
|
|
$$p\iff q$$
|
|
|
|
The **logical equivalence** sign represents if the truth values for both statements are **the same for all possible variables**, such that the two are **equivalent statements**.
|
|
|
|
$$p\equiv q$$
|
|
|
|
$p\equiv q$ can also be defined as true when $p\iff q$ is a tautology.
|
|
|
|
!!! warning
|
|
$p\equiv q$ is *not a proposition* itself but instead *describes* propositions. $p\iff q$ is the propositional equivalent.
|
|
|
|
## Common theorems
|
|
|
|
The **double negation rule** states that if $p$ is a proposition:
|
|
|
|
$$\neg(\neg p)\equiv p$$
|
|
|
|
!!! tip "Proof"
|
|
Note that:
|
|
| $p$ | $\neg p$ | $\neg(\neg p)$
|
|
| --- | --- | --- |
|
|
| T | F | T |
|
|
| F | T | F |
|
|
|
|
Because the truth values of $p$ and $\neg(\neg p)$ for all possible truth values are equal, by definition, it follows that $p\equiv\neg(\neg p)$.
|
|
|
|
!!! warning
|
|
Proofs must include the definition of what is being proven, and any relevant evidence must be used to describe why.
|
|
|
|
The two **De Morgan's Laws** allow distributing the negation operator in a dis/conjunction if the junction is inverted.
|
|
|
|
$$
|
|
\neg(p\vee q)\equiv(\neg p)\wedge(\neg q) \\
|
|
\neg(p\wedge q)\equiv(\neg p)\vee(\neg q)
|
|
$$
|
|
|
|
An implication can be expressed as a disjunction. As long as it is stated, it can used as its definition.
|
|
|
|
$$p\implies \equiv (\neg p)\vee q$$
|