this post was submitted on 18 Oct 2025
756 points (99.2% liked)

Programmer Humor

27113 readers
1482 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

Definitely a repost, but it fits the season

you are viewing a single comment's thread
view the rest of the comments
[–] probable_possum@leminal.space 24 points 1 week ago (18 children)

Can I have everything? Inside and outside the Venn circles!

[–] codexarcanum@lemmy.dbzer0.com 55 points 1 week ago* (last edited 1 week ago) (17 children)

That would be the symbol\operation called TRUE or TOP or "tautology" which is always true. They're actually missing quite a few of the weirder ops, including implication and ~~biconditional\iff\if-and-only-if~~. (Edit: Actually I think XNOR is also the biconditional. I guess pretend like I said "material implication" and "reverse implication". Fricken booleans man!)

[–] NeatNit@discuss.tchncs.de 6 points 1 week ago (12 children)

I never got why "implies" is called that. How does the phrase "A implies B" relate to the output's truth table?

I have my own "head canon" to remember it but I'll share it later, want to hear someone else's first.

[–] stingpie@lemmy.world 7 points 1 week ago (1 children)

I think 'implies' asks whether it's possible that A causes B to be true. In other words, it is false if there is evidence that A does not cause B.

So:

If A is true and B is false, then the result is false, since A could not cause B to be true.

If A and B are both true, then the result is true, since A could cause B.

If A is false and B is true, then the result is true since A could or could not make B true (but another factor could also be making B true)

If A and B are both false we don't have any evidence about the relationship between A and B, so the result is true.

I don't know for sure, though. I'm not a mathematician.

[–] NeatNit@discuss.tchncs.de 5 points 1 week ago* (last edited 1 week ago) (1 children)

Yup, that's my interpretation too. It just doesn't sit well with all the other operators.

All the others are phrased as direct questions about the values of A and B:

  • A AND B = "Are A and B both true?"
  • A OR B = "Are either A or B true, or both?"
  • A NAND B = "Is (A AND B) not true?"
  • A IMPLIES B = "Is it possible, hypothetically speaking, for it to be the case that A implies B, given the current actual values of A and B?"

You see the issue?

Edit: looking online, some people see it as: "If A is true, take the value of B." A implies that you should take the value of B. But if A is false, you shouldn't take the value of B, instead you should use the default value which is inexplicably defined to be true for this operation.

This is slightly more satisfying but I still don't like it. The implication (ha) that true is the default value for a boolean doesn't sit right with me. I don't even feel comfortable with a boolean having a default value, let alone it being true instead of false which would be more natural.

Edit 2: fixed a brain fart for A NAND B

[–] Klear@quokk.au 5 points 1 week ago* (last edited 1 week ago) (1 children)

Consider the implication to be some claim, for example, "When it's raining (A), it's wet (B)". The value of the implication tells us whether we should call the claimant a liar or. So in case it's raining (A = true) and is is not wet (B = false) the claim turns out to be false, so the value of the implication is false.

Now, supposing it is not raining (A = false). It doesn't matter whether it's wet or not, we can't call the claim false because there just isn't enough information.

It's about falsifiability (or lack thereof, in case A is never true).

[–] NeatNit@discuss.tchncs.de 2 points 1 week ago (1 children)

The comment you replied to is my response to this. It's the only boolean operation that works this way. All the others are straightforward.

[–] Klear@quokk.au 2 points 1 week ago (1 children)

I think the problem is that you're thinking in terms of boolean algebra, while implication being implication comes from propositional logic.

[–] NeatNit@discuss.tchncs.de 3 points 1 week ago

That's interesting. I'll have to read up on that. You're right, I am thinking about boolean algebra.

In the mean time though, I'll note that Boolean algebra on Wikipedia also refers to this operation, so I'm not alone:

Material conditional

The first operation, x → y, or Cxy, is called material implication. If x is true, then the result of expression x → y is taken to be that of y (e.g. if x is true and y is false, then x → y is also false). But if x is false, then the value of y can be ignored; however, the operation must return some Boolean value and there are only two choices. So by definition, x → y is true when x is false (relevance logic rejects this definition, by viewing an implication with a false premise as something other than either true or false).

It also uses the second interpretation that I mentioned in my earlier comment (4 above this one), with true being default, rather than the one we've been discussing.

load more comments (10 replies)
load more comments (14 replies)
load more comments (14 replies)