True and False

True and false denoted by $$ T,F$$ respectively are distinct symbols ( $$ T\ne F$$ ).

Predicate

Logical And

We define the function $$ \vee :\{T,F\}\times \{T,F\}\to \{T,F\}$$ by the following table:
$$$\overline{)\begin{array}{ccc}T& T& T\\ T& F& F\\ F& T& F\\ F& F& F\end{array}}$$$
note that we use infix notation for this function.

Logical Negation

We define the function $$ \mathrm{\neg}:\{T,F\}\to \{T,F\}$$ by the following table:
$$$\overline{)\begin{array}{cc}p& \mathrm{\neg}p\\ T& F\\ F& T\end{array}}$$$

When working with the negation, we almost never include the parenthesis unless it is really necessary, so you'll see $$ \mathrm{\neg}T=F$$ rather than the standard function notation: $$ \mathrm{\neg}\left(T\right)=F$$

Logical Or

We define $$ \vee :\{T,F\}\times \{T,F\}\to \{T,F\}$$ as
$$$p\vee q:=\mathrm{\neg}(\mathrm{\neg}p\wedge \mathrm{\neg}q)$$$

Rightward Logical Implication

We define $$ \phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}:\{T,F\}\times \{T,F\}\to \{T,F\}$$
as $$$p\phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}q:=\mathrm{\neg}p\vee q$$$

Note that even though the above doesn't seem intuitive, it exactly matches your intuition, we know that the only time an implication can be false is when we have the antecdent to be true, but the result false, which is exactly the case for the above definition.

Usually $$ p$$ is called the "antecedent" and $$ q$$ the "consequent".

Leftward Logical Implication

We define $$ \phantom{\rule{thickmathspace}{0ex}}\u27f8\phantom{\rule{thickmathspace}{0ex}}:\{T,F\}\times \{T,F\}\to \{T,F\}$$ as $$$p\phantom{\rule{thickmathspace}{0ex}}\u27f8\phantom{\rule{thickmathspace}{0ex}}q:=q\phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}p$$$

Logical Bi-Implication

We define $$ \phantom{\rule{thickmathspace}{0ex}}\u27fa\phantom{\rule{thickmathspace}{0ex}}:\{T,F\}\times \{T,F\}\to \{T,F\}$$ as
$$$p\phantom{\rule{thickmathspace}{0ex}}\u27fa\phantom{\rule{thickmathspace}{0ex}}q:=(p\phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}q)\wedge (p\phantom{\rule{thickmathspace}{0ex}}\u27f8\phantom{\rule{thickmathspace}{0ex}}q)$$$

Note that in writing mathematicians will use the word "iff" as short-hand for if and only if, which represents the bi-implication.

Logical And True iff both Arguments are True

$$$p\wedge q=T\phantom{\rule{thickmathspace}{0ex}}\u27fa\phantom{\rule{thickmathspace}{0ex}}p=T\wedge q=T$$$

TODO

The above proof might feel a bit meta, indeed, we are using the definition of "iff" that we just defined on this page. The "metaness" is coming from the fact that the "iff" we use in english language is actually the bi-implication which we formally define a bit later in the page (which in-turn is then defined in terms of logical and eventually).

Logical Exclusive Or

We define $$ \oplus :\{T,F\}\times \{T,F\}\to \{T,F\}$$
as $$$p\oplus q:=(\mathrm{\neg}p\wedge q)\vee (p\wedge \mathrm{\neg}q)$$$

"XOR" is sometimes used in place of it's regular name.

Addition Mod 2 is Associative

Suppose that we have the function $$ p:\{0,1\}\to \{0,1\}$$ defined such that

- $$ p(0,0)=p(1,1)=0$$
- $$ p(0,1)=p(1,0)=1$$

Let $$ a,b,c\in \{0,1\}$$, and consider the equation
$$$p(p(a,b),c)=p(a,p(b,c))$$$
when all of $$ a,b,c=0$$ we have $$ (p(0,0)=p(0,0))$$, when exactly one of them is zero, then without loss of generality we get the equation $$ p(1,0)=p(0,1)$$, if exactly two of them are ones then we either get an equation of the form $$ p(0,0)=p(1,1)$$ which holds, or one of the form $$ p(1,1)=p(1,1)=0$$, finally if all are 1 then we get $$ p(0,1)=p(1,0)$$, since all equations hold true from the definition then $$ p$$ is associative.

Exclusive Or is Associative

For any $$ {x}_{1},{x}_{2},{x}_{3}\in \{T,F\}$$ we have that
$$$({x}_{1}\oplus {x}_{2})\oplus {x}_{3}={x}_{1}\oplus ({x}_{2}\oplus {x}_{3})$$$

Consider the bijective mapping $$ f\left(T\right)=1$$ and $$ f\left(F\right)=0$$ we can see that $$ f(a\oplus b)=p(f\left(a\right),f\left(b\right))$$, the it follows that $$ f(\cdot \oplus \cdot )$$ is associative, therefore so is $$ \oplus $$

Sum of Ones Mod 2 becomes 0 iff Even

Since $$ p$$ is associative let's use it as a binary operation and temporarily label it as $$ +$$ then consider a sequence $$ \left({a}_{n}\right):{\mathbb{N}}_{0}\to \{0,1\}$$
$$$\sum _{i=0}^{k}{a}_{n}=0$$$
if and only if $$ |\{{a}_{j}:{a}_{j}=1\}|$$ is even.

Induction I believe on even numbers + 2 each time.

Exclusive Or Evaluates to True iff an odd number of arguments are True

$$${x}_{1}\oplus {x}_{2}\oplus \cdots \oplus {x}_{k}=T$$$
if and only if
$$$\sum _{i=1}^{k}{x}_{i}$$$
is odd.

Tautology

We say that a predicate $$ P:X\to \{T,F\}$$ is
a tautology iff for every $$ x\in A,P\left(x\right)=T$$.

In mathematics, when we prove a statement, we are actually showing that it is a tautology.

Contrapositive

The following is a tautology
$$$(p\phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}q)\phantom{\rule{thickmathspace}{0ex}}\u27fa\phantom{\rule{thickmathspace}{0ex}}(\mathrm{\neg}q\phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}\mathrm{\neg}p)$$$

Forced Consequence

The following is a tautology
$$$(T\phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}p)\phantom{\rule{thickmathspace}{0ex}}\u27fa\phantom{\rule{thickmathspace}{0ex}}p=T$$$

Arbitrary And

For any $$ n\in {\mathbb{N}}_{0}$$ we define **arbitrary and** as the predicate $$ \bigwedge :{\{T,F\}}^{n}\to \{T,F\}$$ such that for any $$ X=({x}_{1},\dots ,{x}_{n})\in {\{T,F\}}^{n}$$.
$$$\bigwedge X=T$$$
if and only if the following statement holds true
$$$\mathrm{\forall}i\in \{1,\dots ,n\},{x}_{i}=T$$$

Empty And is True

Suppose that $$ X=\left(\right)$$ (the empty tuple), then
$$$\bigwedge X=T$$$
where we've used the the arbitrary and

It holds vacuously true.

Arbitrary And Indexed Notation

Suppose that, $$ a,b\in \mathbb{Z}$$ and $$ {p}_{a},\dots {p}_{b}\in \{T,F\}$$ then we define
$$$\underset{i=a}{\overset{b}{\bigwedge}}{p}_{i}:=\bigwedge ({p}_{a},\dots ,{p}_{b})$$$
where we've used the the arbitrary and

Arbitrary And Indexed Notation with Reversed Integers is True

Suppose $$ a>b\in \mathbb{Z}$$ and
$$$\underset{i=a}{\overset{b}{\bigwedge}}{p}_{i}=T$$$

Recall that
$$$\underset{i=a}{\overset{b}{\bigwedge}}{p}_{i}=\bigwedge ({p}_{a},\dots ,{p}_{b})$$$
But at the same time $$ ({p}_{a},\dots ,{p}_{b})=\left(\right)$$ because $$ a>b$$ therefore $$ \bigwedge ({p}_{a},\dots ,{p}_{b})=\bigwedge \left(\right)$$ and therefore evaluates to true.

Arbitrary And Expanded Notation

Suppose that $$ {p}_{1},\dots {p}_{n}\in \{T,F\}$$ then we define
$$${p}_{1}\wedge \cdots \wedge {p}_{n}:=\underset{i=1}{\overset{n}{\bigwedge}}{p}_{i}$$$
where we've used the previous definition

Arbitrary Or

Uniqueness

Suppose that $$ P:X\to \{T,F\}$$ is a predicate, then we say that there is a unique element which satisfies $$ P$$ over the set $$ S\subseteq X$$ when
$$$\mathrm{\exists}s\in S,P\left(s\right)\wedge \mathrm{\forall}t\in S,P\left(t\right)\phantom{\rule{thickmathspace}{0ex}}\u27f9\phantom{\rule{thickmathspace}{0ex}}t=s$$$

For Every, There Exists is a Function

The statement
$$$\mathrm{\forall}x\in X,\mathrm{\exists}y\in Y,P(x,y)$$$
is equivalent to
$$$\mathrm{\exists}f:X\to Y,\mathrm{\forall}x\in X,P(x,f\left(x\right))$$$