$a$ is not equal to $b$ constraint and $a$ and $b$ have different domain. How to express it in predicate logic notation

62 Views Asked by At

This post is an extension of my previous post.

Suppose I have an Excel (or a csv or whatever 'paper printed table') with 2 columns: $A$ and $B$.

Example:

 
-------
A  | B
-------
1   2.5
7   5.5
8   9.7
1   2.7

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 domain of $A$ is $\mathbb{N}$ and the domain of $B$ is $\mathbb{R}$. (that's the difference between this post and the previous post).

On my previous post user 'valdim123' proposded :

$$\forall n\in N, An\neq Bn$$

However in the previous post both $A$ and $B$ had the same domain $\mathbb{N}$.

So how to make sure we compare the same rows if $A$ and $B$ have different domain? If I mimimic 'valdim123' notation the following proposal is, in my opinion, incorrect because $n\neq r$ (for instance I don't want to compare row 2 of col A and row 3 of col B) I need to set $n=r$ but I do not get how to write that...

$$\forall n\in N,\forall r\in R, An\neq Br$$

1

There are 1 best solutions below

0
On BEST ANSWER

As mentioned in the comments, the issue is that $a$ is not a well-defined variable. Each entry is described by a column (either A or B), and a row (chosen from a set of rows). It is the row number that needs to be quantified over.