How to ask a question and correctly tell its logic in the following case?

How my English works:

  1. Not merged into any of {I, J, K} = "Not merged into I or J or K" but you can simply say "Not merged into any of the given branches"

    None of the given branches have the branch in question merged into them.

    You can parse this as "Not merged into I and not merged into J and not merged into K." The and becomes or when "not merged into" is applied to all the alternatives together.

  2. You can choose to parse that differently, "Not (merged into any of {I, J, K})" but it means exactly the same thing. Your branch could go into any of {I, J, K}, but it hasn't.

  3. Merged into none of {I, J, K} : same again. None of {I, J, K} contains your branch.

  4. Merged into any of {I, J, K} : this one doesn't say which your branch has been merged into. It could be I or J or K, or any two of them, or even all three. A "normal" layman's reading might suppose only one, but it doesn't have to be.

  5. "Not merged into I and J and K" doesn't make a great deal of sense (see 1 about how and becomes or).


Despite the question mark, neither of the examples

1. How to list all branches that are not merged into none of the given branches? / >2. How to list all branches that are not merged into any of the given branches?

are questions.

The questions would be

1. How do you list all branches that are not merged into none of the given branches?

2. How do you list the branches that are not merged into any of the given branches?

Of these, only 2. is now correct but can be improved.

  1. has a double negative but it can be corrected and improved:

1. How do you list the branches that are merged into none of the given branches?


This is an example of DeMorgan's Laws:

  • ¬(p ⋀ q) ≣ (¬p ⋁ ¬q) In English, "not (p and q) is equivalent to (not p or not q)"
  • ¬(p ⋁ q) ≣ (¬p ⋀ ¬q) In English, "not (p or q) is equivalent to (not p and not q)"

In other words, the logical functors OR and AND reverse under negation, much like positive and negative numbers when multiplying by -1. This happens also in English syntax.

  • If it's not in A, B, or C, then it's not in A, (and) it's not in B, and it's not in C.
  • If it's not in A, B, and C, then (either) it's not in A, (or) it's not in B, or it's not in C.

Such equivalences work best between two variables. With three or more, as in the example above, conjunction reduction makes ambiguity more possible. Of course, since writing doesn't include intonation or stress, every written sentence is multiply ambiguous, so saying it in English isn't much of a solution.