I’m already so done with this course.

My textbook:

p: “The weather is bad.”

Exercise:

Represent “the weather is good” using logical symbols.

Me: How am I supposed to answer that? You didn’t give me a letter for that. I guess I’ll use q?

Expected answer: ~p

THIS IS LITERALLY THE CLASS ABOUT LOGIC DHDJFBDHDJDHDHDH

Who let neurotypicals write a logic textbook istg

  • @[email protected]OP
    link
    fedilink
    English
    5
    edit-2
    2 days ago

    Most of the time, I think discrete is taught with an eye to computer science, right?

    Sure. Not everything in computer science is binary, despite the fact that computers run on binary code. For example, sql has the boolean values of “true,” “false,” and “null.” In this system, null !== false, although it does evaluate to false in some situations.

    You’re much better off teaching set theory properly (which is what the course is aiming for) rather than teaching people to assume that all sets are composed of only two elements.

    Most programmers don’t even touch binary anyhow. That’s all abstracted away by the compiler.

    • @[email protected]
      link
      fedilink
      English
      14
      edit-2
      2 days ago

      Most programmers don’t even touch binary anyhow. That’s all abstracted away by the compiler.

      I don’t think that’s really true - a thorough understanding of Boolean logic is pretty essential to programming imho. I think you want to keep in mind the goal is not to prove you are smarter than the first chapter of your textbook, just to note the ideas and patterns it is introducing.

      • @[email protected]OP
        link
        fedilink
        English
        42 days ago

        I mean I’m definitely noticing the patterns. I’m just frustrated that someone who is supposedly an expert in logic let something like that slip. Not assuming that logical negation means “opposite” is one of the first things they teach you. For example, if we were thinking in opposites, the negation of “all” would be “none.” But the negation of “all” is “not all”, where the negation of “none” is “at least one.”

        • @[email protected]
          link
          fedilink
          English
          21 day ago

          funnily enough, there exists an empty set, which contains no elements (none), but there doesn’t exist a “full” set which contains “all” elements. how interesting is that …

          • @[email protected]OP
            link
            fedilink
            English
            116 hours ago

            Um, but there is?

            It’s called the universal set, and it contains all elements possible within the domain of consideration

            • @[email protected]
              link
              fedilink
              English
              15 hours ago

              the set that contains everything is not a (proper) set, according to 20th century mathematicians.

              That’s because it would contain “impossible” elements, i.e. elements for which contradictory statements both hold true. That shakes the foundations of maths, so it’s typically excluded from maths, and not called a “set”. (it’s called “class” instead.)

        • @[email protected]
          link
          fedilink
          English
          22 days ago

          But the negation of “all” is “not all”, where the negation of “none” is “at least one.”

          That’s not how it’s usually going to work in discrete - that’s the message the book is trying to communicate to you.

          Think like an engineer designing a computer. The state of the weather is something that we are introducing as a binary here - bad or not bad, good or not good.

          I’m sure the next few chapters will talk about things like truth tables, right? Try to imagine what those would look like with a “trinary” logic system. Remember math is a tool we use to abstract reality efficiently.

          • @[email protected]OP
            link
            fedilink
            English
            11 day ago

            I tool a sql class, so if the trinary logic is True, False, and Null then I don’t have to imagine it, I already learned it.

            I suppose you could have “true”, “false”, and “unknown” too. That could be interesting. But it wouldn’t look all that different - AND compares the values and returns the less certain of the two. OR compares values and returns the more certain of the two. Unknown inverted is still unknown. Not that hard.

            Qbits have four states, I think? Now those are fun truth tables.

              • @[email protected]OP
                link
                fedilink
                English
                11 day ago

                Probably? I don’t feel like doing homework rn, though, and what would be the point?

                Some programs might have reasons to add an additional truth value, (for example, most databases include “NULL”) but trinary would be a terrible choice for hardware. The tolerances are just much more forgiving when you’re detecting the presence/absence of a charge than trying to measure multiple distinct states.

          • Shaun Griffith
            link
            fedilink
            21 day ago

            @andros_rex @SuperNovaStar Picking something as continuous as “the weather” to explain negation is just stupid.

            Pick something like “locked” or “unlocked”.

            Yes, there’s a transition, and we all wave our hands and pretend it isn’t there. The same thing happens in Boolean algebra, when negating something.

            Best not to get involved with “all”, “none”, “null”. Because you’ve left out “some”, “many”, “any”, “few”, “more”, “less”, and a host of more subtle values.

            • Shaun Griffith
              link
              fedilink
              11 day ago

              @andros_rex @SuperNovaStar Programming languages do logic a lot of injustice, often assuming certain values are false, most values are true, and a few are weird (like “none”). Those are implementations for practical reasons, and not pure math.

              • @[email protected]OP
                link
                fedilink
                English
                11 day ago

                Exactly. And sometimes you need to understand the underlying logic well before you even try to program anything. It is far easier to know set theory and then adapt that knowledge to programming than to learn a warped, trimmed down version of set theory just to fit programming languages and then try to derive the real thing once you run into a problem that needs it.