James B. Wilson
Professor of Mathematics
Colorado State University
Within Math we're having a ... crisis?
What should we know? trust? ask? do?
Epigram McBride-McKinna (Edinbrugh)
NuPrl, Constable (Cornell)
1980
1990
2000
2010
2020
System F, Girard
MLTT, Martin-L\(\"o\)f
Computation has been this capable for 5000 years.
So what's new? Speed & Volume.
What's our history? We adapt.
What is \(\mathsf{L}\exists\forall\mathsf{ N}\)?
native_decideLemma "Division Algorithm". For natural numbers \(m\) and \(n\neq 0\), \(m=qn+r\) for some \(q\) and \(r\lt n\).
Proof. If \(m\lt n\) then \(m=0\cdot n+m\) already. Otherwise, by induction on \(m-n\) we have \(m-n=qn+r\) with \(r<n\). So \[m=(1+q)n+r\] \(\Box\)
Proof or Program ?
Program avatar \(f: P \to \emptyset\)
Program avatar \(f: P \to Q\)
Program avatar \(x\in P\sqcup Q\)
Program avatar \((p,q) \in P \times Q\)
\[\begin{array}{lr} P & \Rightarrow Q\\ P \\ \hline Q\end{array}\]
\[\begin{array}{rl} f & : P\to Q\\ x & \in P \\ \hline f(x) &\in Q\end{array}\]
\(\forall x.P(x)\) Program avatar \(\prod_{x\in X} P_x\)
\(\exists x.P(x)\) Program avatar \(\bigsqcup_{x\in X} P_x\)
\(\mathbb{N}\)
\(F(\mathbb{N}):=\mathbb{N}^0\sqcup\mathbb{N}^1\)
\(\mathbb{N}^0\)
\(\mathbb{N}^1\)
Program avatar \(\omega:\mathbb{N}\sqcup\{\infty\}\to F(\mathbb{N}\sqcup\{\infty\})\). universal "F-coalgebra"
\(F(\mathbb{N}):=\mathbb{N}^0\sqcup\mathbb{N}^1\)
\(\mathbb{N}\)
\(\mathbb{N}^0\)
\(\mathbb{N}^1\)
reset
next
Program avatar \(\omega:F(\mathbb{N})\to \mathbb{N}\). "F-algebra"
\(F(\mathbb{N}):=\mathbb{N}^0\sqcup\mathbb{N}^1\)
\(\mathbb{N}\)
\(\mathbb{N}^0\)
\(\mathbb{N}^1\)
reset
next
Equality, real numbers, topologies etc. come from inductive and conductive constructions.
Flavors
before
Lemma "Division Algorithm". For natural numbers \(m\) and \(n\neq 0\), \(m=qn+r\) for some \(q\) and \(r\lt n\).
Proof. If \(m\lt n\) then \(m=0\cdot n+m\) already. Otherwise, by induction on \(m-n\) we have \(m-n=qn+r\) with \(r<n\). So \[m=(1+q)n+r\] \(\Box\)
\[proof:\prod_{m,n\in \mathbb{N}} \left((\text{Id}(n, 0)\to \emptyset)\to \bigsqcup_{q\in\mathbb{N}}\bigsqcup_{r\in \{1,\ldots,n-1\}} \text{Id}(m,q\cdot n+r)\times \text{LT}( r,n)\right)\]
Proposition / Data Type
Program / data of that type
*Predicate \(\dagger\) Only needed for uncountable stuff.
"Axiom (theorem)" of unique choice & "proof irrelevance" make sorry's and axioms possible and easy. Just put in \(\{*\}\).
Theorem (Gentzen). A first order sufficiently countable (\(\varepsilon_0\)) proof is unique up to replacing all modus ponens and reducing tautologies.
Coro. For proposition \(P\), if it "data" is its proofs \(p:P\) then by Gentzen \(P=\{p\}\). All singleton sets are equivalent. So proofs are irrelevant and such propositions are "mere propositions" (0-level).
Proof. A property \(P\) either begins with \(\forall ...\) in which case it is true of any subset. Otherwise, choose one \(r_P\in \mathbb{R}\) making \(P(r)=\exists r...\) true.
Now \(\mathbb{R}'=\{r_P\mid P\}\) is countable as properties are finite strings.
And every \(P\) true of \(\mathbb{R}\) is true of \(\mathbb{R}'\)
There is a countable subset \(\mathbb{R}'\subset\mathbb{R}\) where every property of \(\mathbb{R}\) is also a property of \(\mathbb{R}'\). So \(\mathbb{R}'\) is both countable and uncountable.
Proof.
1 = 3.1415...
2 = 0.10101...
3 = 9.99999...
...
So where is 4.20....?
There is no surjection \(f:\mathbb{N}\to \mathbb{R}\)
Goal:
E.g. for \(m,n:\mathbb{N}\), \(n+m=m+n\) infers that \(+:\mathbb{N}^2\to \mathbb{N}\) and \(=:\mathbb{N}^2\to \mathsf{Prop}\)
\(p: ?\)
\(?: P\)
Goal:
E.g. for \(m,n:\mathbb{N}\), \(n+m=m+n\) by rewriting steps
In June 26, IBM fit
100,000,000,000 transistors
Chips really do change their hardware, often within a year. Error correcting codes and redundancy can help.
...but it's not actually academic!
Code the self replicates;
so any compiler built from that compiler inherits this parasite.
theorem fermats_last_thm (n a b c : Nat) (h : n > 2) :
a^n + b^n ≠ c^n
:= by sorry
Irish: Feicim caora.
English: I see a sheep.
Natural language allows (and conventions prefer)...
Sharpened claim,
good!
theorem every_function_is_constant (f : Nat → Nat) : ∀ x, ∃ c, f x = c :=
fun x => ⟨f x, rfl⟩
Quiz: This is accepted by Lean, you ok with it?
/-- We show odd order groups have at least one proper nontrivial normal Hall subgroup. -/
theorem odd_order_thm (G : Type*) [Group G] [Finite G] (hG : Odd (Nat.card G)) :
∃ H : Subgroup G, H.Normal ∧ Nat.Coprime (Nat.card H) H.index :=
⟨⊤, inferInstance, by simp⟩
Checked by machine;
so my brain often glazes over...
Users (and AI) might read more from names and documentation that are possibly detached from the code's real meaning.
Thinko: the documentation promises a "proper nontrivial" but in the end only check normal and Hall. You may fail to notice within the notation.
structure Fraction where
num : Nat
den : Nat
/-- One half is not two quarters. -/
theorem half_ne_two_quarters : (⟨1, 2⟩ : Fraction) ≠ ⟨2, 4⟩ := by
intro h
cases h
Tactic: break into "cases" i.e. the two parts num, den created separately
theorem div_zero_harmless (n : Nat) : n / 0 = 0 :=
by simp
Valid proposition.
Right sized tactic
Accurate name
Sometimes Lean / MathLib / AI just defines things differently than you might.
\[m/ n := \begin{cases} q & n\gt 0, m=qn+r, r\lt n\\ 0 & \text{else}\end{cases}\]
Good reason? Makes \(\Box/\Box:\mathbb{N}^2\to \mathbb{N}\) total (required for type checker).
Include lots of examples! That does wonders to spotlight typos & thinkos, even when you still don't fully understand the code.
Review and refereeing of libraries and tactics towards a consensus.
Cautious people are making line-by-line publicly scrutinized alternative kernels.
Error correction, controlled failure probabilities, & syndromes. An error in hardware likely gets noticed.
Thm. "Ladner Ladders". Either \(P=NP\) or there are infinitely many intermediate complexities. More generally, given any oracle \(O\), there are infinitely many complexities between \(P^O\) and \(NP^O\).
In other words, if AI can do math \(O\) then there are infinitely many levels of difficulty for you to reach next.
Thm. Kleene. Turing machines are only universal in at the 1st level. 2nd, 3rd etc. Kleene algebra actions do not have a universal machine.
So perhaps we let Turing completeness, and for that matter Hilbert natural deduction, and ZFC, and classical logic pause our creativity too long.
Computation is the representation theory of partial combinatory algebras \(\langle S,K\mid Kxy=x, Sxyz=(xz)(yz)\rangle\).
A project ....