Skip to content
0:00 / 0:00

#lambdacalculus#trompdiagrams#churchencoding

What is PLUS times PLUS?

2swap

373K subscribers • 2 videos on Hallway

YouTube

Advanced. Deep dive for people who know the field.

2.2M views1 year ago3 recommendations

Computer scienceProgramming languagesComputation and complexityFunctional programming

An exploration of lambda calculus and Church encodings using John Tromp's visual lambda diagrams to analyze complex expressions.

ERRATA: • The "Church-Turing Thesis" is different from the "Church-Turing Theorem". The "theorem" is the claim which I discussed in the video- namely, that the Turing machine and lambda calculus are equally powerful. The "thesis" is the informal claim that the two of these systems are a sufficient formalization which capture the idea of "arbitrary computation". • I claimed in the end of the video that this was the first example of animated beta-reductions of visual lambda expressions. Paul Brauner has some videos here: youtube.com/playlist?list=PLi8_XqluS5xc7GL-bgVrxpA2Uww6nK0gV, although they do not explicitly animate the mechanics of one step of beta-reduction! I probably should have chosen my words more carefully. Sorry Paul- linked you in an info card in the top right! • It seems that both lisp and rust blur the line between functional and imperative programming more than I realized, so take that chart at the end with a grain of salt! • While the expression (*(+ +)), treated as a 4-argument function, yields (d^(c^b))^(a+c), inserting the 4th argument is actually not necessary! You can treat it as a 3-argument function, and it reduces to (c^b)*(a+c). Join our discord server about math, computer science, and other miscellaneous nerd stuff! discord.gg/XDb7x2BZAE Support us! 2swap: patreon.com/2swap 6884: ko-fi.com/iam6884 Sources and Links: Tromp's Diagrams, showcased throughout the video: tromp.github.io/cl/diagrams.html At , a number of visualizations for the Lambda Calculus were shown. These include: (Top Left) David C Keenan's Graphical Notation for the Lambda Calculus: dkeenan.com/Lambda/ (Top Center) A notation I found on Robin Piedeleu's site, but which is likely much older: piedeleu.com/posts/diagrammatic-lambda-calculus/ (Top Right) de Brujin indices: en.wikipedia.org/wiki/De_Bruijn_index (Bottom Left) Vex (Wayne Citrin, Richard Hall, Benjamin Zorn): researchgate.net/publication/2726047_Programming_with_Visual… (Bottom Right) Visual Lambda Calculus (Viktor Massalõgin): bntr.planet.ee/lambda/work/visual_lambda.pdf / github.com/bntre/visual-lambda Lecture Notes on the Lambda Calculus (book): amazon.com/Lecture-Notes-Lambda-Calculus-Selinger/dp/0359158… 6884's Music: 6884.bandcamp.com/ A viewer-made Tromp Diagram applet: cruzgodar.com/applets/lambda-calculus/?expression-textarea=*… (By Cruz Godar) A viewer-made desmos Tromp Diagram calculator: desmos.com/calculator/rviihyo72n (By div140) This video was rendered using SwapTube! github.com/2swap/swaptube Oh, also, this is my first time using auto-dubbed tracks. I am VERY IRRITATED to have to use this... I happen to speak a few languages on the list and I would have preferred to dub it myself. As far as I can tell, I as a creator am not even given the opportunity to do so. If anyone else knows of a way, please comment :) Als

Why it's here

3 people recommend this

What people say. Recommended as an amazing and beautiful visual explanation of lambda calculus and Tromp diagrams.

Moments people linked to

snejon Lobsters • Recommends

What is plus times plus?

u/HellBriingerin r/functionalprogramming • Recommends

Lambda calculus tromp diagram visualizer tool (FUN!) I got nerd sniped by the amazing video [video and the beauty of tromp diagrams and coded up a fun web app to input arbitrary lambdas and plot their ASTs/Tromp Diagrams. https://studio--lambdavis.us-central1.hosted.app/ Usage: Write lambda expressions like Identity = (L x . x) y, and then reduce. You can create custom expressions and then access those custom expressions with \_CUSTOM\_EXPR. E.g. you can see I've written (\_PLUS) (\_3) (\_2) there instead of the much more complicated lambda expr in current form.
10View on Reddit

contrapositon Hacker News • Recommends

On “Optimal Strategy for Connect 4”

I also liked the one on lambda calculus. I hope one day we will be able to find interpretation of what it actually means for PLUS Times Plus. Maybe this is how we will explore nonstandard arithmetic. What is PLUS times PLUS? link to this video

u/HellBriingerin r/haskell • Mentions

Lambda calculus tromp diagram visualizer tool (FUN!) https://preview.redd.it/70xi0qggn21f1.png?width=3230&format=png&auto=webp&s=587413e1ec6221e8225241ca615702523efce177 Got fully nerd sniped by this amazing video [video and how pretty the tromp diagrams are. (Vibe) Coded up this toy where you can write arbitrary lambdas and then step through them and see how they work. You can see either the AST or the Tromp diagram. https://studio--lambdavis.us-central1.hosted.app/ Usage: Write lambda expressions like Identity = (L x . x) y, and then reduce. You can create custom expressions and then access those custom expressions with \_CUSTOM\_EXPR. E.g. you can see I've written (\_PLUS) (\_3) (\…

u/marvinbornerbruijn, effektin r/ProgrammingLanguages • Mentions

On “Tur - A language for defining and executing Turing machines with multi-platform visualization tools (Web, TUI and CLI)”

Here are some of my favorite visualizations: * Interaction nets (see for example Delta Nets or T6 Nets), makes implicit duplication/erasing from beta-reduction explicit * John Tromp's diagrams: Tromp's page and great video * λ-2D by MIT: project page * Visual Lambda Calculus: project page * Cube composer: interactive website depending on the visualization you're aiming for, you might also be interested in my lambda screen project :)

diginovaon Hacker News • Mentions

On “How to draw lambda diagrams (2020)”

True, thanks for clarification that would be this one - link as I just started learning lambda calculus and this one helped Also this is where I got the interest from - link to this video

csenseon Hacker News • Mentions

On “Interactive λ-Reduction”

I don't know much about any of this, and I'm far from an expert on the lambda calculus. But I skimmed paper by OP, which is informative: link The lambda calculus is an alternate model of computation created by Alonzo Church in the 1930s. It's basically a restricted programming language where the only things you can do are define anonymous functions, and apply those anonymous functions to input variables or the output of other functions. The Lambda calculus statement And = λp.λq.p q p is more conventionally notated as And(p, q) = p(q(p)). You can reduce lambda expressions -- basically, this is "Simplifying this program as far as possible" what you expect a good optimizing compiler to do. Wh…

bntron Hacker News • Mentions

On “Show HN: Visual Lambda Calculus – a thesis project (2008) revived for the web”

For comparison: factorial(3) visualized in two different notations. John Tromp's Lambda Diagrams (via 2swap): link to this video Bubble Notation: link

observationiston Hacker News • Mentions

On “Combinators”

Combinators are math, and a little like Lisp - building functions from primitives and operations with the ability to apply them, where even the notion of variables are functions - functions all the way down. The y combinator is this: λf.(λx.x x)(λx.f(x x)) Lambda diagrams get you visualizations like this: link When considering logic and functions, when thinking in the space of combinators, you can ask questions like "What is Plus times Plus" and have a sensible result. link to this video Combinators are awesome. The site linked by OP is a specific collection of combinators with bird names, riffing on the "To Mock a Mockingbird" puzzle book and subsequent meme of giving combinators bird names.

u/Ok-Analysis-6432in r/functionalprogramming • Mentions

On “What can I do to get more into the type of programming from "The Evolution of a Haskell Programmer"?”

- PLUS times PLUS - lambda calculus

u/DiligentSurprise5401in r/compsci • Mentions

On “Can someone explain to me lambda calculus?”

You should definitely check out this amazingly crafted video on Lambda Calculus: [video