2020 James B. Wilson
Colorado State University
\(A=\{a\}\)
Operator \(a:A^0\to A\), i.e. a constant nullary operator.
Done.
You could have a bigger set, but if you want only the algebra, then one constant is all you will visit.
Boring!
Fix a type \(A\), and an operator
\[\#:A\to A\]
... could be silly if \(A\) were empty, so lets assume also a nullary (constant) operator \(\epsilon:A^0\to A\).
Still boring? Notation might give us an idea
\(\epsilon\),
\(a^1=a:=\#\epsilon\),
\(a^2=aa:=\#(a)\),
\(a^3=aaa=\#(aa),\ldots\)
This will for all the following terms in \(A\)
\[\epsilon, \#\epsilon, \#(\#\epsilon),\#(\#(\#(\epsilon))),\ldots\]
\[\vdash \mathbb{N}:type\quad (F_{\mathbb{N}})\]
\[\vdash 0:\mathbb{N}\quad(I_{\mathbb{N}}0)\qquad \frac{n:\mathbb{N}}{S(n):\mathbb{N}}(I_{\mathbb{N}}S)\]
Also summarized compactly in what is called "Backus-Naur Form (BNF) Grammar":
\[\mathbb{N} = 0 \mid S(n)\]
(Elimination etc. will come later.)
Evidently \(n\mapsto S(n)\) can be typed as \(\mathbb{N}\to \mathbb{N}\) by intro rule \((I_{\mathbb{N}}S)\).
\[\frac{n:\mathbb{N}}{S(n):\mathbb{N}}(I_{\mathbb{N}}S)\]
Name that function \(\texttt{++}\), i.e. \(\texttt{++}n:=S(n)\) of type \(\mathbb{N}\to \mathbb{N}\).
*Authors, including me, often reuse S to mean both introduction, and the subsequent function, but these are technically two different things.
This is counting (or "tally") algebra.
Given a type \(A\) and an \(n\)-operator \(A^n\to A\), written
\[\langle a_1,\ldots,a_n\rangle\]
and a type \(B\) with an \(n\)-operator \(B^n\to B\), written
\[[a_1,\ldots,a_n]\]
Then a function \(f:A\to B\) is a homomorphism if
\[f(\langle a_1,\ldots,a_n\rangle)=[f(a_1),\ldots,f(a_n)].\]
\[f(m+n)=e^{2\pi(m+n)}=e^{2\pi m}e^{2\pi n}=f(m)\cdot f(n).\]
\[\begin{array}{l} n\in \mathbb{N}\\ P(0)\\ (\forall k)(P(k)\Rightarrow P(S(k)))\\ \hline P(n)\end{array}\]
Logical Induction (Aristotle)
\[\begin{array}{l} n\in \mathbb{N}\\ base\in P(0)\\ (\forall k\in \mathbb{N})(ind_k:P(k)\to P(S(k)))\\ \hline f(n)\in P(n)\end{array}\]
Enhance with sets (Peano)
\[\begin{array}{rl} n &: \mathbb{N}\\ P& :\mathbb{N}\to type\\ base & : P(0)\\ ind &: \prod_{k:\mathbb{N}}(P(k)\to P(S(k)))\\ \hline r(n) & : P(n)\end{array}\]
Enhance with types (Martin-Lof)
\[\begin{array}{rl} n &: \mathbb{N}\\ P& :\mathbb{N}\to type\\ \epsilon & : P(0)\\ i &: \prod_{k:\mathbb{N}}(P(k)\to P(S(k)))\\ \hline \hat{\epsilon}(n) & : P(n)\end{array}\]
You end up with \(\hat{\epsilon}:\mathbb{N}\to Q\)
\[\hat{\epsilon}(0)=\epsilon\qquad \hat{\epsilon}(\texttt{++}n)=\hat{\epsilon}(n)^{\texttt{++}}\]
That is, we have a homomorphism.
Elimination rule (induction)
Trace path of base case,
\[\epsilon:P(0),\qquad a=i_0(\epsilon):P(1),\qquad a^2=i_1(a):P(2),\ldots \]
Set \(Q=\{\epsilon, a,a^2,\ldots\}\), and define
\[\texttt{++}:Q\to Q\qquad x^{\texttt{++}}:=\left\{\begin{array}{cc} a & x=\epsilon\\ a^{k+1} & x=a^k\end{array}\right.\]
For every [1,0]-algebra \(Q\) and each function \[\epsilon:\{0\}\to Q\] there is a unique homomorphism \[\hat{\epsilon}:\mathbb{N}\to B\] with
\[\hat{\epsilon}(0)=\epsilon(0).\]
A \(\sigma\)-algebraic structure that "uniquely covers" all other \(\sigma\)-algebraic structures following a chosen base case is called free.
A \(\sigma\)-algebraic structure that "uniquely covers" all other \(\sigma\)-algebraic structures following a chosen base case is called free.
\(\mathbb{N}\) is our first example of a free algebra, specifically a free [1,0]-algebra.
What happens next is we