Lambda Calculus Diagrams (2015)
tromp.github.io
tromp.github.io
For my last undergraduate research project I created a lambda calculus that would have a self distributed magma. Basically for all x,y,z you could do x @ (y @ z) = ( x @ y) @ (x @ z)
I didn't publish it because it took me another two years to implement the system in Mathematica after trying Javascript and also I didn't know what it could be used for. Also, the above self distributed operator could be implemented as a combinator or so forth.
The self distribution would have an interesting property that if you had an element in the magma then you could perform the above operator forever or you could think of it as a stream.
I have it in GitHub though if anyone wants to play with it. Ive been meaning to make video about it but I don't know if anyone would find it interesting.
that's much simpler to understand than the lambda diagram.
I was about to say "oh, you found a quandle/rack in the lambda calculus," but it seems you're already aware of this, given some of the filenames in your repository :-) In the Buliga/Kauffman papers, there are sections about representations of knot crossings as lambda calculus, which presumably forms a quandle (actually, probably a rack). Could you direct me to how your @ operation works? This seems very interesting.
I recently added quandles/racks to mathlib[1], the Lean standard math library. I think mathlib has some lambda calculus formalization, so it might be interesting adding a quandle instance for your operation.
[1] https://github.com/leanprover-community/mathlib/blob/master/...
The lambda calculus with the self distributive magma basically would have all of the axioms of the lambda calculus but also with every valid statement in lambda calculus you also add the left self distributively law.
This was a simplification of the project due to time constraints. The original goal were to have all of the quandle operations to operate on every welf formed statement that would be a rewriting system.
https://ncatlab.org/nlab/show/self-distributive+operation
(a (b c)) => (a b) (a c)
So lets say we have the following church numeral.
λf.λx.f (f (f x))
We would be able to do an operation using the self-distributive operation
λf.λx.f (f (f x)) => λf.λx.f (f f) (f x)
This is a bit hand-wavy though.
I think the argument could be made that this is only possible with a language that uses barely any syntax, like the lambda calculus, since how would Python's 20+ keywords all translate into a graphical representation while preserving their true meaning (if statements and recursion could be straightforward, async and try/except... uh?). But it's nice to see that it's possible in simple cases, and that alone makes these harder questions seem more tractable IMO :)
https://mindsarentmagic.org/2020/02/19/a-picture-of-grahams-...
The arbitrariness in the notation here isn’t about whether to use Latin letters or some other alphabet, or to write application on the left or the right, but rather about whether to use expressions in a formal language or some other representation. In many fields, different notations or finding eg some graph structure, may reveal interesting aspects of the underlying structure of something (eg why do we write permutations with cycle notation not permutation notation? Eg Conway’s notation for knots).
Also there are issues with the lambda calculus notation using letters for variables: whenever you do a substitution you may need to rename some variables if their meaning would change. I think this can be confusing to people and is perhaps an annoying thing to have in your notation.
That's actually true, and very obviously so. I'm sorry.
> The arbitrariness...
I agree that clear notation is important; the pictorial style made me think of Feynman diagrams. My comment was a bit tongue-in-cheek, maybe unnecessarily so, but the point is that I fail to see how those pictures are clearer than plain text: you are not replacing complex stuff with a simple representation, you are just rewriting a simple formula in a different style.
> Also there are issues with the lambda calculus notation...
Are there? That's the same problem you face whenever you have dummy variables, e.g. the 'dx' in integrals.
It’s true that variable renaming comes up in other parts of mathematics but scope matters a lot less in most other mathematics, so much so that it is basically implicit and left to be inferred based on the mathematical context. You wouldn’t normally rename a variable to avoid a conflict so much as you would avoid giving it a conflicting name in the first place. The recursive nature of the lambda calculus means you can’t avoid the problem this way.
I'm not sure how well-known this is, but Conway notation can be thought of as taking a Tait graph of the knot (i.e., a checkerboard graph) then reducing all the series-parallel networks until you get some irreducible graph. He noticed that certain kinds of series-parallel networks can be represented by an extended rational number (includes infinity), which can dramatically simplify the analysis of small knots -- to the point he was able to classify all of them in an afternoon! So, Conway notation corresponds to an irreducible planar graph with an expansion of each edge by a series-parallel network, with each edge in the expansion labeled by a rational number. You can even work out a set of moves such that if two such diagrams correspond to the same knot then there is a sequence of such moves connecting them.
I do wonder if there's a similar analysis for lambda calculus represented as graphs... It might be that certain expressions play the role of rational tangles. (Though very likely not :-) )
[0]: https://senseis.xmp.net/?TrompTaylorRulesEDIT: Curiously, the Omega doesn't have it either.
Anyway, to cut a long story short: his notation for the Turing Theta Combinatory is now a tattoo on my arm.
[1] https://math.stackexchange.com/questions/98011/is-this-formu...
"The diagram in the title, produced by the postscript code below, is a slightly deformed alternative Y diagram made to look like a Y."
That's not the reason it's called Y combinator though...