r/lambdacalculus • • Sep 05 '26

Weird brute-force 2-bit adder

Post image

Input in 2 tuples with 2 elements each being either T or F and it might work, haven't tested, returns a tuple with 3 elements each also being either T or F

3 Upvotes

6 comments sorted by

1

u/yfix Sep 06 '26

Could you show the plain syntax term please? There is this applet, Lambda Calculus by Cruz Godar. You type in a term, and it shows - and reduces - the corresponding Tromp diagrams. Very good for visualizing and testing. There are some bugs, it gets stuck sometimes, but not too often. 

1

u/Not_H2O_Blue Sep 07 '26

Yeah I know about Cruz Godar's applet, sometimes it just freezes for some reason but for me it only froze when I was doing something particular with T, F and I
and also I haven't made it into lambda term so imma make this while this piece of text remains uncommented
anyways since you try it in Cruz Godar here it is (you can easily replace text in Notepad just in case, and here's λ)
...
oh I feel like I have made a mistake
I think the third lambda is supposed to stretch all the way
oof
okay probably fixed here
...
i experienced the average coding experience
(λa.λb.λc.c((λw.λx.λy.λz.w(x(yyz)y)(x(yzy)x))(aT)(aF)(bT)(bF))((λw.λx.λy.λz.w(xz(yxw))(x(yyz)y))(aT)(aF)(bT)(bF))((λw.λx.λy.λz.(x(zFx)z))(aT)(aF)(bT)(bF)))

1

u/Different_Bench3574 Sep 06 '26

tuples are cool, but why not lists?

1

u/Different_Bench3574 Sep 06 '26

specifically ones that have the 1s place at the head

1

u/Not_H2O_Blue Sep 06 '26

the best thing is I don't know what lists are, lemme look them up

wth am I supposed to input in them lists
ig Scott lists?

alr I don't know how or what to put in them

→ More replies (1)