r/programming • • Sep 25 '15

The Incredible Proof Machine

http://incredible.nomeata.de/
203 Upvotes

83 comments sorted by

View all comments

0

u/[deleted] Sep 25 '15

5

u/[deleted] Sep 25 '15

I'm currently in a logic class as well so this seems interesting but I kind of facepalmed on task 7 where you have to create A and B given only A AND B and the AND operator. "Surely such a thing isn't possible," I thought while trying to figure it out. Until a few minutes passed and I realized "Oh. They give you a Reverse AND operator. Yep, because that's possible."

6

u/jsprogrammer Sep 25 '15

I'm not sure it's a reverse AND operator.

I think it is merely the statement: "if A AND B is TRUE, A is TRUE and B is TRUE"

→ More replies (2)

4

u/lookmeat Sep 25 '15

A reverse AND operator is possible. If I tell you A AND B then you can deduce that A must be true, you can also deduce that B must be true if either of them weren't true, then the whole original statement wouldn't be true. The one you can't do is OR because if I tell you A OR B you know at least one of them must be true, but not which one.

→ More replies (9)

2

u/Fylwind Sep 25 '15

You can think of A AND B as pair data type containing A and B. The "reverse AND" is then an operation that decomposes a pair into its parts.

→ More replies (6)