22 lines
930 B
Markdown
22 lines
930 B
Markdown
|
# Logic
|
||
|
|
||
|
> *Definition*: a statement is a sentence that is either true or false, never both.
|
||
|
|
||
|
> *Definition* **- Logical operators**: let $A$ and $B$ be assertions.
|
||
|
> * The assertion $A$ and $B$ ($A \land B$) is true, iff both $A$ and $B$ are true.
|
||
|
> * The assertion $A$ or $B$ ($A \lor B$) is true, iff at least one of $A$ and $B$ is true.
|
||
|
> * The negation of $A$ ($\neg A$) is true iff $A$ is false.
|
||
|
|
||
|
> *Definition* **- Implies**: if $A$ and $B$ are assertions then the assertion if $A$ then $B$ ($A \implies B$) is true iff
|
||
|
> * $A$ is true and $B$ is true,
|
||
|
> * $A$ is false and $B$ is true,
|
||
|
> * $A$ is false and $B$ is false.
|
||
|
>
|
||
|
> This also works the opposite way, if $B$ then $A$ ($A \Longleftarrow B$)
|
||
|
|
||
|
> *Definition* **- If and only if**: if $A$ and $B$ are assertions then the assertion $A$ if and only if $B$ (A \iff B) is true iff
|
||
|
> * $(A \Longleftarrow B) \land (a \implies B)$.
|
||
|
>
|
||
|
> This leads to the following table.
|
||
|
|