1
$\begingroup$

Suppose I have an Excel (or a csv) file with 2 columns: $a$ and $b$.

For each row I would like to forbid the following: $a\neq b$.

So for instance in row 1 I cannot have $a=3$ and $b=3$. However, the question is not how to implement it in Excel. The question is how to use the correct math notation to express this constraint.

Let's suppose the type of a and b are integers.

I don't understand how to formulate such a restriction using predicate logic math notation.

Here are all possible permutations assuming $a\neq b \leftrightarrow b\neq a$:

$\forall a\thinspace\exists b\,\left(a\neq b\right)$

$\forall b\thinspace\exists a\,\left(a\neq b\right)$

$\exists a\thinspace\forall b\,\left(a\neq b\right)$

$\exists b\thinspace\forall a\,\left(a\neq b\right)$

$\exists a\thinspace\exists b\,\left(a\neq b\right)$

$\forall a\thinspace\forall b\,\left(a\neq b\right)$

I have the feeling only the 2 following proposition are correct. Am I right?

$\forall a\thinspace\exists b\,\left(a\neq b\right)$

$\forall b\thinspace\exists a\,\left(a\neq b\right)$

  • 1
    What you've got doesn't make much sense, as $a$ and $b$ don't make any reference to the row they are in, which is critical here.2017-01-10
  • 0
    I think the relevant question here is : why do you want to do that? It might give you the answer you really want.2017-01-10
  • 0
    @vadim123 In my notation I assume that $a$ and $b$ are supposed to be in the same row. If my assumption is wrong, how how can I express my problem?2017-01-10
  • 0
    @PatrickDaSilva for two reasons: 1 for a homework. 2 getting an answer to that question should help me to increase my understanding of predicate-logic.2017-01-10
  • 0
    Why are you presupposing that there should be quantifiers on either/both $a$ and $b$? And what thing are you trying to express? If you want to say "the value in A3 and the value in B3 are distinct," and the names of these are $a$ and $b$, you write $a \ne b$. It's silly to write "for all $a$ and for some $b$, $a \ne b$, because you have actual single values for each of $a$ and $b$. Perhaps you can tell us the homework problem, rather than asking us to help you go down the wrong path in solving it.2017-01-10
  • 0
    Hello John, yes I am trying to to say "the value in A3 and the value in B3 are distinct". I am trying to say this for all rows (not only row 3). The homework problem is only to express "the value in A3 and the value in B3 are distinct" in a proper mathematical form.2017-01-10

1 Answers 1

3

The correct way is not to quantify over $A$ or $B$. The columns $A$ and $B$ are fixed; they are not varying over a domain. What is varying is the row, so we need to quantify over the rows. Let $N$ denote the set of rows. Then what you are trying to express is $$\forall n\in N, An\neq Bn$$

  • 0
    Presumably though the 'n's are meant to be subscripts.2017-01-10
  • 0
    @timbo in excel, you refer to (for example) the element in the 3rd row of column A as "A3" (no subscript). Since the original question is asking about something in excel, I presume this is why the answer writes "$An$" instead of "$A_n$."2017-01-10
  • 0
    Ah, I see. I didn't have my Excel hat on. I thought it might be confused with multiplication (though that is unlikely I know).2017-01-10
  • 0
    @vadim123, thanks for the answer. Just a question. Would it be possible to declare $A$ and $B$ before the constraint $A_n \neq B_n$ ?2017-01-10
  • 0
    I have also created an extension of this post : https://math.stackexchange.com/questions/2091838/a-is-not-equal-to-b-constraint-and-a-and-b-have-different-domain-how-to2017-01-10