Tromp Lambda Calculus Diagram Emojis

These are a bunch of Lambda Calculus expressions visualized with John Tromp's diagrams (with the help of this tool by Cruz Godar), and adjusted to be more like emojis.

Download the whole pack, or read below to see them with explainations.

I release them as creative commons, and you can easily make your own with the linked tools and a bit of image editor.

Back to main page.

Emojis

For each one I'll give a preview at 20px (like on my mastodon), file name, lambda expression, what it represents, and maybe some notes.
Also they're sorted by category here.

Booleans

Emoji File Name Expression Notes
True lambda_true.png True (λx.λy.x)
False lambda_false.png False / 0 (λx.λy.y)
If Then Else lambda_ifthenelse.png If Then Else (λi.λt.λe.ite) It's more of a construct than something you'd explicitely use; see how the logic gates are built the same
NOT lambda_not.png NOT (λa.a(λx.λy.y)(λx.λy.x))
AND lambda_and.png AND (λa.λb.ba(λx.λy.y)) (λa.λb.ab(λx.λy.y)) would work too and be slightly different; I'm using the same as the web tool
OR lambda_or.png OR (λa.λb.a(λx.λy.x)b) (λa.λb.b(λx.λy.x)a) would work too and be slightly different; I'm using the same as the web tool
XOR lambda_xor.png XOR (λa.λb.a(b(λx.λy.y)(λx.λy.x))b) (λa.λb.b(a(λx.λy.y)(λx.λy.x))a) would work too and be slightly different
NAND lambda_nand.png NAND (λa.λb.a(b(λx.λy.y)(λx.λy.x))(λx.λy.x)) (λa.λb.b(a(λx.λy.y)(λx.λy.x))(λx.λy.x)) would work too and be slightly different
NOR lambda_nor.png NOR (λa.λb.a(λx.λy.y)(b(λx.λy.y)(λx.λy.x))) (λa.λb.b(λx.λy.y)(a(λx.λy.y)(λx.λy.x))) would work too and be slightly different/td>
XNOR lambda_xnor.png XNOR (λa.λb.ab(b(λx.λy.y)(λx.λy.x))) (λa.λb.ba(a(λx.λy.y)(λx.λy.x))) would work too and be slightly different

Integers (Church numerals)

I excluded predecessor, substraction, division, and equals because they were wayy too big.

Emoji File Name Expression Notes
1 lambda_1.png 1 (λf.λx.f(x)) 0 is omitted because it's the same expression as False (so no repeat images)
2 lambda_2.png 2 (λf.λx.f(f(x)))
3 lambda_3.png 3 (λf.λx.f(f(f(x))))
4 lambda_4.png 4 (λf.λx.f(f(f(f(x))))) That's kind of pushing it and the bigger numbers are basically unreadable
5 lambda_5.png 5 (λf.λx.f(f(f(f(f(x))))))
6 lambda_6.png 6 (λf.λx.f(f(f(f(f(f(x)))))))
7 lambda_7.png 7 (λf.λx.f(f(f(f(f(f(f(x))))))))
8 lambda_8.png 8 (λf.λx.f(f(f(f(f(f(f(f(x)))))))))
9 lambda_9.png 9 (λf.λx.f(f(f(f(f(f(f(f(f(x)))))))))) Could have stopped earlier but wanted to be complete with the ones on the web tool
Is zero? lambda_iszero.png Is zero? (λn.n(λx.(λx.λy.y))(λx.λy.x))
Successor lambda_successor.png Successor (λn.λf.λx.f(nf(x)))
Addition lambda_addition.png Addition (λa.λb.λf.λx.(af)(bfx))
Multiplication lambda_multiplication.png Multiplication (λa.λb.λf.b(af))
Exponentiation lambda_exponentiation.png Exponentiation (λa.λb.ba) Really using the structure of Church numerals here
Tetration lambda_tetration.png Tetration (λa.a(λb.λc.bcc)(λx.λy.y))

Pairs and linked lists

I also had some recursive operations I found but they were also way too big for emojis.

Emoji File Name Expression Notes
Pairing lambda_pairing.png Pairing (λx.λy.λi.ixy)
First element of pair lambda_pairfirst.png First element of pair (λp.p(λx.λy.x))
Second element of pair lambda_pairsecond.png Second element of pair (λp.p(λx.λy.y))
Empty list lambda_emptylist.png Empty list (λa.(λx.λy.x))
Is list empty? lambda_islistempty.png Is list empty? (λa.a(λw.λz.λx.λy.y)) Meant to be detects pairs vs that Empty list above, for making linked lists

Fixed-point combinators

These are to make recursion. At that size you can't tell any one of them apart, so maybe just keep the Y for completeness.

Emoji File Name Expression Notes
Y Combinator lambda_ycombinator.png Y Combinator (λf.(λx.f(xx))(λx.f(xx)))
Turing Combinator lambda_turingcombinator.png Turing Combinator (λx.λy.y(xxy))(λx.λy.y(xxy))
Z Combinator lambda_zcombinator.png Z Combinator (λf.(λx.f(xx))(λx.f(xx))) This one for strict languages apparently

Back to top.

Back to main page.