Combinators: functions without variables
2021 James B. Wilson, Colorado State University
then even simpler functions...
...turtles all the way down or are some functions atoms?
mov dx, 0
mov ax, 7048 ; load n = 7048
mov bx, 541 ; load m = 541
div bx ; now bx=13 (q) AND dx=15 (r)
But x86 is an industry choice.
Math like this came before...and probably will out last x86.
Atomic functions need
Combinators do not need input variables.
Hence have no domains and codomains.
TLDR: Variables are symbols outside the alphabet; so, the following are technically rubish
"\(x:=5\)", "if \(y=2\) then ..."
Variables are never assigned, never equal any thing. They only locate substitution.
\(y=x\)
\(x\mapsto x\)
\(I(x)=x\)
What is missing?
Characterize \(\mathbb{I}\) by
\[\mathbb{I}V\rhd V\]
That is our first (weak) reduction rule.
TMI
Why \(\rhd\) instead of \(=\) or `:=`?
It is neither equal nor assigned. It is verb is reduce, so use reducing symbol.
\(y=3\)
\(x\mapsto \alpha\)
\(\mathbb{K}_c(x)=c\)
Still no domain/codomain.
Characterize \(\mathbb{K}\) by
\[\mathbb{K}UV\rhd U\]
That is our second (weak) reduction rule.
Again... not equal, not assigned, reduced.
Identity and constants are interesting, but we need real programs to choose a path.
Some logic needs to branch.
def branch(P)(x) = {
if P then
x
else
g(x)
}
f after branch
\(S_{f,g}(x)=f(x,g(x))\)
\(\mathbb{S}_{f,g}(x)=f(x,g(x))\)
\[x\mapsto (x,g(x))\mapsto f(x,g(x))\]
\(d/dx\)
\(x\mapsto x^2\)
You don't have to branch, you might both paths!
Characterize \(\mathbb{S}\) by
\[\mathbb{S}UVW\rhd UW(VW)\]
That is our third (weak) reduction rule.
Informally
Logically