Logic

Can be summed up in The Laws of Logic.

Can be divided into:

It has: logical operators

Relationship to Set Theory

Union $\cup$ is very similar to logical or $\lor$. Intersection $\cap$ is very similar to logical and $\land$.

Logical Implication

If $p$ then $q$

Formally: $p \implies q$

$p$ is a tilstrekkelig betingelse for $q$ to be true

$q$ being true is a necessary condition for the truth of $p$

Note: $(p \implies q) \equiv (\lnot A \lor B)$

Whether the result is true does not matter unless the premise is also true in logical implications.

Logical Two-Way Implication

If $p$ then $q$ and if $q$ then $p$

Formally: $p \iff q \equiv (p \implies q) \land (q \implies p)$

But: $(p \iff q) \neq (p \equiv q)$ ()

Tautology and Contradiction

Tautology: $p \lor \lnot p$ (Always true)

Contradiction: $p \land \lnot p$ (Never true)

Demorgan

Fancy useful equivalences:

$\lnot(p \lor q) \equiv \lnot p \land \lnot q$

$\lnot(p \land q) \equiv \lnot p \lor \lnot q$

Distributivlover

$p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)$

$p \land (q \lor r) \equiv (p \land q) \lor (p \land r)$

Logical Independence

A formula $r$ is logically independent of the set of formulas $M$ if neither $r$ or $\lnot r$ is a logical consequence of $M$.

Logical Proof

Logical proofs reduce predicates to a tautologies.