$a$ is not equal to $b$. How to express it in predicate logic notation

1.1k Views Asked by At

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

There are 1 best solutions below

5
On BEST ANSWER

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$$