0

How do you evaluate a logical statement that has multiple condition clauses "If A or B and C"? From method 1 & 2 below, which is the correct/common interpretation?

  1. If A is true, or both of B and C are true, then the statement is true.
  2. If either of A and B is true, and also if C is true, then the statement is true.

Using parentheses, the method 1 & 2 would be:

  1. A or (B and C)
  2. (A or B) and C

Coming from a programmer point of view, most programming languages use the method 1, where all 'and' are evaluated first before the 'or' are evaluated. Is it also true for English language in general usage?

To use a concrete example, consider the following A, B, C:

If it is morning or it is evening and it is Monday, then I will bring an umbrella.

Do I bring an umbrella if it is Tuesday morning?

  1. Yes
  2. No

ADDITIONAL INFO:

Let me add additional information why I insist on not adding additional commas to resolve the ambiguity.

I'm designing a system where a non-technical user can define rules using English language with specific formats, for example:

  • today is sunday
  • date is 1st of june
  • user's age is not less than 18

And the rules can be combined using "and" and "or":

today is sunday or date is 1st of june and user's age is not less than 18

Can I rely on a common interpretation in English using a well-known precedence of "and" and "or", or do I have to either:

  1. introduce commas into the rule grammar
  2. put a disclaimer on how the "and" and "or" will be interpreted by the system?
2
0

Apologies for the length of this. It is an interesting exercise in the relation of language to logic and, with the eight possible combinations of the True/False logic for three items, length is inevitable. The question has two parts: the analysis of the A/B/C logic; and the structure of the sentence.

Let us interpret or to mean one or the other, or both (this is the inclusive definition rather than the exclusive definition as one or the other, but not both).

ABC Logic 1

“If A is true, or both of B and C are true, then the statement is true.“

The truth table is shown with {True A} in green and {True (B and C)} in orange. The or makes the statement true in five of the eight possible cases.

ABC Logic 2

If either of A and B is true, and also if C is true, then the statement is true.

Following some common usage, let us interpret either to mean either one of two, or both (this is the inclusive definition rather than the exclusive definition as one or the other but not both). This is thus the same as the inclusive or.

The truth table is shown with {True C} in green and {True (either B or C or both)} in blue. The and makes the statement true in three of the eight possible cases.

enter image description here

Sentence Structure

The sentence is ambiguous as given and needs a comma to define its intention. There are two useful positions of the comma.

Comma Position 1

If it is morning, or it is evening and it is Monday, then I will bring an umbrella

Mornings are green; Monday evenings are shown orange.

This corresponds to Logic 1. Tuesday morning is a morning (green cases); bring an umbrella.

enter image description here

Comma Position 2

If it is morning or it is evening, and it is Monday, then I will bring an umbrella.

{Morning or evening} is shown blue; {Monday} is green.

enter image description here

The case {morning and evening both true} is not possible in reality but the logic remains the same.

Tuesday is not Monday: do not bring an umbrella.

3
  • What I'm basically asking is that without placing additional commas, how would you interpret If it is morning or it is evening and it is Monday, then I will bring an umbrella.? – Lukman Oct 19 '20 at 14:28
  • I appreciate your need but I regret that cannot resolve the ambiguity unless a comma is introduced. If you have to interpret the sentence as it is, take an umbrella just in case, but hide it in the car! – Anton Oct 19 '20 at 14:32
  • Thank you for the answer and response, @Anton. I've modified my question and added additional information. – Lukman Oct 20 '20 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.