Cos (cos) wrote,
Cos
cos

English "or", logical OR/XOR

mzrowan's post, "Linguists: XOR?" asked whether there were languages which have different words corresponding to the OR and XOR operators in formal logic, since the English word "or" can be either. A common rumor has it that Latin had words "vel" and "aut" corresponding to these two logical operators, but blk debunked that.

In fact, the English word "or" is not a logical operator. It rarely plays that role when used in natural language. However, it can be used in ways that resemble almost any operator in formal logic, not just OR and XOR! Over on Rowan's post I got into debates with a prescriptive grammarian who seems to believe almost obsessively that English "or" is equivalent to formal logic's XOR, and that got me thinking about the various ways we use the word "or" and the logical operators those uses most closely resemble...
  • Logical XOR
    aerynne gave a good example of this: "Do you want to go to a movie or stay home?"
    To a typical native speaker of English, the meaning is clearly that you have a choice of two alternatives - you could go to a movie, or you could stay home instead. Which one of those two alternatives do you prefer?

    It isn't exactly a logical operator, because it's asking you to make a choice, rather than asserting that you actually want one or the other but not both. After all, you might answer, "I'd rather go see a band, actually". We're not concerned that the answer to the question isn't necessarily true or false. But in typical use, and as long as the answer does end up being some form of yes or no, this use of "or" more closely resembles the logical operator XOR than any other.

  • Logical AND
    "You can take a bus or a train to get from Boston to New York"

    This is a short form of "You can take a bus to get from Boston to New York or you can take a train to get from Boston to New York", and if I make this statement, what I intend to communicate is that both are true. A typical native speaker of English would understand that intent without spending any thought on the matter. Here, "or" really is acting almost exactly as a formal logical operator - in this case, AND

    loftwyr tried to argue that this is XOR because you're saying that you could take either the bus or the train, not both. While that's not entirely true (you might be saying that you can take the bus one time, and the train another time, or that you could stop partway and switch from bus to train), it's also a fundamental misunderstanding of formal logic. The actual act of taking a bus, or a train, has no place in formal logic. Formal logic is about the truth values of statements (or assertions, which are intended to have a truth value of "true").

    An assertion in English of the form "you can [do X]" would get translated into formal logic as some form of beginning with there-exists (usually represented as a backwards E). Let's translate the statement "You can get there by bus or by train", piece by piece:
    1. I assert that: there-exists [method of getting there] such-that [conveyance=bus]

    2. I assert that: there-exists [method of getting there] such-that [conveyance=train]

    3. I assert that: 1 is true AND 2 is true

    Statement #1 is a formal logic translation of "you can get there by bus", #2 is a formal logic translation of "you can get there by train", and #3 is a formal logic translation of their conjunction, the English statement "you can get there by bus or by train".

    loftwyr's argument is effectively to claim that a conjunction (logical AND) of two "there-exists X such-that Y" statements actually means that the same X must satisfy both there-exists assertions. If both of them are true, but require different values of X to satisfy them, he thinks that makes their conjunction's truth value "false". In other words, he is saying that the logical statement,
    (there-exists an integer X such-that X is odd) AND (there-exists an integer X such-that X is even)
    Evaluates to "false". He's wrong. In the example above, whether you actually do take a bus or a train is irrelevant. The truth value of the statement "you can get there by bus or by train" remains unchanged even if you decide to drive, or to not go there at all. It is still true.

    loftwyr adds another, even more blatantly wrong, claim: By saying that this use of "or" is similar to logical XOR, he's saying that it's true if either one of the sub-assertions are true. That is, if you can get there only by bus, but not by train, one of them is true and one is false, and hence the statement "you can get there by bus or train" should evaluate to true. Clearly that does not match the correct use of the language. A typical native speaker of English who knows that you can get there by bus but not by train, when faced with the statement "you can get there by bus or train", would label that assertion false.

  • Logical OR
    "Mind if I put on some music?"
    "Sure go ahead, if you have some jazz or blues. Otherwise, I'd rather you didn't."


    Logically, if ( [you have some jazz] OR [you have some blues] ) then put some on. If you have one and not the other, that's okay. If you have both, that's okay too. I don't care. Heck, if you happen to have a compilation CD of alternating jazz and blues tracks, that fits just as well as an all-jazz CD or an all-blues CD. The value if the if clause is false only if you have neither.

  • Logical -> (implication)
    "Go to the store on your way back, or I'll have to take the car tomorrow."
    "Look both ways or you might get hit by a car."

    You could make the case for these being XOR. In fact, as with the first example, these aren't exactly any sort of formal logical operator, and might resemble more than one. But when someone makes a statement of this form, what they mean to communicate are the consequences of the negation of the first part of the statement. IF you don't go to the store THEN I'll have to take the car. The logical operator "or" most closely resembles here is implication.

In English, "or" can be used to connect phrases, clauses, and words in many different ways. Some of these resemble logical operators - many different logical operators. Usually, the meaning is clear to a typical native speaker, from context and semantics. The word "or" by itself is not sufficient to convey its meaning. That doesn't make it any different from many other English words with varying meanings.

Rowan posted about it because sometimes, "or" is ambiguous. Most of the time, though, it's not. And trying to "solve" the ambiguity by tying "or" down to a specifical formal logic operator doesn't work - all it does is make you misinterpret some otherwise clear statements and questions, and make you label others as "bad grammar" when they are not.

[ Edit: "Or" works on three levels: grammatic, logical, and semantic. Grammatically, it is used to connect all sorts of things - nouns, adjectives, noun phrases, clauses, whole sentences - in a lot of different ways. Sometimes, it expresses a logical relationship, such as the ones most of this post is about. Sometimes, it expresses the idea that the things it connects are alternatives, which is a semantic relationship. But it tends to often work on multiple levels at the same time, so it may for example express a logical AND at the same time as it is expressing a relationship of alternatives, while connecting a couple of noun phrases grammatically. Other times, it's playing on only one level at a time, or two. ]
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 20 comments