The author presents most known numeral systems (ways of representing natural numbers) in lambda calculus, classified by whether the term use their bound variables exactly one time (linear), at most one time (affine), or multiple times (non-linear).
Mackie's paper [0] (one of the references) provides a good introduction to these. (although he strangely gets the definition of Church numerals wrong with "Church numerals encode numbers with repeated application: λx f. f^n x." in which he reversed the order of arguments f and x).
He illustrates some numerals in each system with a graphical notation that strongly reminds me of interaction nets [1], a computational model closely related to lambda calculus.
The notation they use for lambda terms is rather non-standard. Compare
> In β-reduction, k[(x⇒b)←a]⊳k[b{a/x}]k[(x⇒b)←a]⊳k[b{a/x}]
with Wikipedia's [2]
> The β-reduction rule states that a β-redex, an application of the form (λx. t) s, reduces to the term t[x:=s].
The k[...] part means that β-reduction steps can happen in arbitrary contexts.
The author unfortunately only describes about half of the syntax they use, or rather, they describe the syntax of the language but assume the reader is familiar with the (rather obscure even in a PLT context) metalanguage.
means: expression b with variable x inside it replaced by expression a.
So their beta-reduction line just says that if
k = ... (λx.b) a ...
it can be reduced to
k = ... c ...
where c is the expression b, but with all occurrences of variable x replaced by expression a.
I think Tk(x) denotes "the definition of variable k is expression x" and the square brackets are "k[x]" something like "in the context of definition k, value of expression x". So I suspect that
a=Tk(x)
a[y]
would be effectively
(λk.y)x
But yes, not very clear on explaining the notation. Also seems to have some typos e.g. at the beginning have "x ∈ k, x, y" which looks to me should be "x ∋ k, x, y" (or of course "k, x, y ∈ x").
The author presents most known numeral systems (ways of representing natural numbers) in lambda calculus, classified by whether the term use their bound variables exactly one time (linear), at most one time (affine), or multiple times (non-linear). Mackie's paper [0] (one of the references) provides a good introduction to these. (although he strangely gets the definition of Church numerals wrong with "Church numerals encode numbers with repeated application: λx f. f^n x." in which he reversed the order of arguments f and x).
He illustrates some numerals in each system with a graphical notation that strongly reminds me of interaction nets [1], a computational model closely related to lambda calculus. The notation they use for lambda terms is rather non-standard. Compare
> In β-reduction, k[(x⇒b)←a]⊳k[b{a/x}]k[(x⇒b)←a]⊳k[b{a/x}]
with Wikipedia's [2]
> The β-reduction rule states that a β-redex, an application of the form (λx. t) s, reduces to the term t[x:=s].
The k[...] part means that β-reduction steps can happen in arbitrary contexts.
[0] https://www.researchgate.net/publication/323000057_Linear_Nu...
[1] https://en.wikipedia.org/wiki/Interaction_nets
[2] https://en.wikipedia.org/wiki/Lambda_calculus
I think I lack context to see what this is about. The line graphs are pretty though, and I'd like to understand more.
The author unfortunately only describes about half of the syntax they use, or rather, they describe the syntax of the language but assume the reader is familiar with the (rather obscure even in a PLT context) metalanguage.
I didn’t understand that notation. Can someone please explain?
I think:
is:
and
is just application. I.e.
What about big T, square/angle brackets, and braces?
yeah no idea
Braces are substitution, so
means: expression b with variable x inside it replaced by expression a. So their beta-reduction line just says that if
it can be reduced to
where c is the expression b, but with all occurrences of variable x replaced by expression a.
I think Tk(x) denotes "the definition of variable k is expression x" and the square brackets are "k[x]" something like "in the context of definition k, value of expression x". So I suspect that
would be effectively
But yes, not very clear on explaining the notation. Also seems to have some typos e.g. at the beginning have "x ∈ k, x, y" which looks to me should be "x ∋ k, x, y" (or of course "k, x, y ∈ x").
const f = (x) => x + 1;
Hmm nice I guess, but I expected it was going to be about transfinite ordinals. I wonder if it can be extended to them.
Interesting. I wonder what the `s` functions in Scott & Church are.
They are not functions, but variables. Maybe this helps, as they basically are "selectors": https://text.marvinborner.de/2024-11-18-00.html#tagged-union...
This should be "numerals"
This is beautiful art