2020 James B. Wilson
Colorado State University
Eliminiation (induction) \[\begin{array}{rl} n & :\mathbb{N}\\ P & :\mathbb{N}\to type\\ base & P(0)\\ IH & :\prod_{k:\mathbb{N}} P(k)\to P(S(k))\\ \hline I(n) & :P(n) \end{array}\]
Formation \(\vdash\mathbb{N}:type\)
Introduction \(\vdash 0:\mathbb{N}\qquad \frac{n:\mathbb{N}}{S(n):\mathbb{N}}\)
\[\begin{array}{rl} S(m)&:\mathbb{N}\\ e & :P(0)\\ P & :\mathbb{N}\to type\\ IH & :\prod_{k:\mathbb{N}} P(k)\to P(S(k))\\ \hline refl&:I(S(m))=_{P(S(m))} IH(m) \end{array}\]
Computation (recursion) \[\begin{array}{rl} e & :P(0)\\ P & :\mathbb{N}\to type\\ IH & :\prod_{k:\mathbb{N}} P(k)\to P(S(k))\\ \hline refl&:I(0)=_{P(0)} e \end{array}\]
class Nat
case class Zero extends Nat
case class Succ(n:Nat) extends Nat
def elim(
n:Nat,
P:Nat -> Type,
base:P(0),
indHyp:(k:Nat)->P(k)->P(Succ(k))
) : P(n) =
n match {
case 0 => base
case Succ(k) => indHyp(k, e) where e = elim(k, P, base, indHyp)
}
class = formation
case class = introduction
elim = elimination
body of elim = computation rule
\[m+n=\left\{\begin{array}{cc} m & n=0\\ S(m+k) & n=S(k)\end{array}\right.\]
\[m\cdot n=\left\{\begin{array}{cc} 0 & n=0\\ (m\cdot k)+m & n=S(k)\end{array}\right.\]
\[m^n=\left\{\begin{array}{cc} 1 & n=0\\ (m^k)\cdot m & n=S(k)\end{array}\right.\]
Notation: \(1:=S(0), 2:=S(1),\ldots,9:=S(8), 10:=S(9)\)
Digits \(a_n\cdots a_0:=\sum_{i=0}^n a_i\cdot 10^i,\qquad a_i\in\{0,\ldots,9\}\)
def + ( m:Nat, n:Nat ) : Nat =
n match {
case 0 => m
case Succ(k) => Succ(m+k)
}
def * ( m:Nat, n:Nat ) : Nat =
n match {
case 0 => 0
case Succ(k) => (m*k)+m
}
def ^ ( m:Nat, n:Nat ) : Nat =
n match {
case 0 => Succ(0)
case Succ(k) => (m^k)*m
}
Under \(0,S\) congruences are "truncation" by \(n\).
E.g.
\[\begin{array}{c|cccc} & S \\ \hline 0 & 1 \\ 1 & 2 \\ 2 & 3 \\ 3 & 1 \end{array}\]
Truncation again, but interpreted on pairs
E.g.
\[\begin{array}{c|cccc} + & 0 & 1 & 2 & 3 \\ \hline 0 & 0 & 1 & 2 & 3\\ 1 & 1 & 2 & 3 & 1\\ 2 & 2 & 3 & 1 & 2 \\ 3 & 3 & 1 & 2 & 3 \end{array}\]
Elimination (induction) \[\begin{array}{rl} as & :List[A]\\ P & :List[A]\to type\\ base & :P(nil)\\ IH & :\prod_{b:A}\prod_{bs:List[A]} P(bs)\to P(cons(b,bs))\\ \hline I(as) & :P(as) \end{array}\]
Formation \(A:type \vdash List[A]:type\)
Introduction \[\vdash nil:List\qquad \frac{a:A\quad as:List[A]}{cons(a,as):List[A]}\]
\[\begin{array}{rl} S(m)&:\mathbb{N}\\ e & :P(0)\\ P & :\mathbb{N}\to type\\ IH & :\prod_{k:\mathbb{N}} P(k)\to P(S(k))\\ \hline refl&:I(S(m))=_{P(S(m))} IH(m) \end{array}\]
Computation (recursion) \[\begin{array}{rl} e & :P(0)\\ P & :\mathbb{N}\to type\\ IH & :\prod_{k:\mathbb{N}} P(k)\to P(S(k))\\ \hline refl&:I(0)=_{P(0)} e \end{array}\]
class List[A:type]
case class nil extends List[A]
case class cons(a:A, as:List[A]) extends List[A]
def elim(
as:List[A],
P:List[A] -> Type,
base:P(nil),
indHyp:(a:A)->(as:List[A])->P(as)->P(cons(a,as))
) : P(n) =
as match {
case nil => base
case cons(a,as) => indHyp(a, as, e) where e = elim(as, P, base, indHyp)
}
(nothing special)
S0
0
S0
SS0
0
SSS0
SS0
SSS0
Compact: repeat \(\mathbb{N}\) add a sign.
Lacks any algebra.
0
1=S0
2=SS0
3=SSS0
-1=-S0
-2=-SS0
-3=-SSS0
0
1
2
3
-1
-2
-3
4
Make \(\mathbb{Z}\) as quotient of \(\mathbb{N}\times \mathbb{N}\) as a power, product, sum successor, 0, 1 algebra!
And of course it gets also negatives and substraction.
Truncation of \(\mathbb{Z}\) but the requirement of negatives forces further constraints.
E.g.
\[\begin{array}{c|cccc} + & 0 & 1 & 2 & 3 \\ \hline 0 & 0 & 1 & 2 & 3\\ 1 & 1 & 2 & 3 & 0\\ 2 & 2 & 3 & 0 & 1 \\ 3 & 3 & 0 & 1 & 2 \end{array}\]
Why? \(x+(-x)=0\) so 0 in every row, \(S(x)=x+1\), so by induction you get back to 0 from x
\(\mathbb{Z}/6\) has a quotient to \(\mathbb{Z}/2\) and \(\mathbb{Z}/3\) but not \(\mathbb{Z}/5\)....
... a cycle within a cycle must be a faction, skip-counting.
...same was true in truncations of \(\mathbb{N}\) but only after you get past the stick of the lollypop.
...smallest nontrivial quotients \(\mathbb{Z}/p\) with \(p\) prime
(special case)
0
1/7
1/5
1/6
1/4
1/3
0
2/5
3/7
2/7
1
2
-1
-1/7
-2/7
-3/7
What Algebra? \(\mathbb{N}^+\) has only \(\cdot, +, 1\)
At best we get an algebra on those, 0, negative, etc. will need to be rebuilt!
1/3
1
\(a/b+c/d=(a+b)/(c+d)?\) NO!
Points are not collinear with origin!
(Not in one equivalence class.)
1/3
0
2
\(a/b+a/b=(a+a)/b?\) Yes!...why?
1/3+1/3=2/3
1/3
1
\(\frac{a}{b}+\frac{c}{d}=\frac{ad+bc}{bd}\)
Of course...
it keeps the
interior angles
fixed, so
collinear!
4/3
The only congruences on \(\mathbb{Q}\) as a \([\cdot,+,-,0]\)-algebra are "trivial"
Proof. Pick a congruence \(\equiv\) and suppose there are \(x\neq y\) with \(x\equiv y\) (not option 1). So \(z:=x-y\neq 0\) yet \(z\equiv 0\) and \(z^{-1}\equiv z^{-1}\) so \[1=z^{-1}z\equiv z^{-1}0=0\]
Hence in fact for any \(w\), \(w\equiv w\) and \(1\equiv 0\) implies \(w\equiv 0\) (option 2).
(nothing special)
A bit too fast?
Negatives numbers are just the equations that would be solved if it existed....
E.g. -2 = (x+2=0, x+3=1, x+4=2,...)
Fractions are just the equations that would be solved if it existed....
E.g. 1/3 = (3x=1, 6x=2, 9x=3,...)
Roots are just the coset of polynomials that would solved if it existed....
E.g. \(\sqrt[3]{5} = \{x^3=5, 7x^3=35, x^5-5x^2=0,...\}\)
Roots are just the coset of polynomials that would solved if it existed....
E.g. \(\sqrt[3]{5} = \{x^3=5, 7x^3=35, x^5-5x^2=0,...\}\)
These are... \(\{(x^3-5)a(x)\mid a(x)\in \mathbb{Q}[x]\}\)
To make a number system with \(\sqrt[3]{5}\) we just need to make cosets where one of them is the set of equations which would be solved is that solution existed!
Home Made Solutions:
(...hmmm... special? ...is it even algebra?)
(nothing special, but large)
The number \(x\) is a root of the polynomial \(a(x)\) in \(\mathbb{Q}[x]\) modulo \(a(x)=0\).
We write \(\mathbb{Q}[\alpha]=\mathbb{Q}[x]/(a(x))\) and think of \(\alpha\) as a root, but really \(\alpha\) is just the coset containg \(x\).
\[K_1=\mathbb{Q}[\alpha]=\mathbb{Q}[x]/(a(x))\]
So....
\[K_2=\mathbb{Q}[\alpha,\beta]=\mathbb{Q}[\alpha]/(b(x))\]
...and so on... but there is a catch...
\[\mathbb{Q}[x]/(x^2-1)\]
we already had 1, -1 in this, so now we have 2 copies! It will turn out to be 2 copies of \(\mathbb{Q}\).
In \(\mathbb{C}[x]\), \[x^n+a_{n-1}x^{n-1}\cdots+a_0x^0=(x-\alpha_1)\cdots (x-\alpha_n).\]
No, you don't need calculus to get an algebraically closed field, but it really is the stuff of dreams to make a number system for algebra, analysis, geometry, and more.