How to formulate that there is "not more than" ... - Propositions

67 Views Asked by At

Let's define B as a proposition that in a fictional table there is a blue point. How to formulate the logic expression that there is not more than one B in a row at the table? (Let x,y be coordinates of the table) $\exists x, \forall y [...]$ Don't know how to fomulate that "not more than" statement. Hope somebody can help.

3

There are 3 best solutions below

1
On

How about $B$ for the set of blue points on the table, then $$\exists x\in B \land ( \nexists y\in B: x\neq y)$$ It says a point exists but that there are no other points in $B$ that are distinct from $x$?

0
On

The usual trick for expressing "at most one" is to say "if there are two then they are equal".

So if $B(x,y)$ means "there is a blue point at row $x$, column $y$", then I would write $$\forall x \forall y_1 \forall y_2 (B(x,y_1) \land B(x,y_2) \implies y_1 = y_2).$$

0
On

You haven't said what "in a row" means, and you didn't say "adjacent" which could include "in the same column", so I'll make assumptions:

  • The points on the table have integer or anyway discrete coordinates $x,y$, giving column and row respectively.
  • The points that occur "in a row" are pairs of points $(x,y), (x+1,y)$ which are adjacent and in the same row.
  • We can write "+1" applied to coordinates, at least to columns. That is, we have a function symbol interpreted as the successor operation. (If not, then we need an additional predicate; but you haven't mentioned any such thing, so I'll go with "+1".)
  • The dimensions of the table are $R \times C$, where $R, C$ are the number of rows and columns respectively.
  • We can compare coordinates against $R$ and $C$ using $<$.
  • Column and row coordinates are $1$-based.

Given all that, the following sentence expresses what you mean: $$ (\forall y)(\forall x)\,((B(x,y)\land (x<C)) \to\neg B(x+1,y)) \tag{*} $$ That is, "for every row $y$, for every column $x$, if $(x,y)$ is blue and not at the right edge of the table, then the point at the next position in row $y$ is not blue". If a row has two successive blue points, then the take the one further left as x and (*) is violated. (Note that we don't have to consider the preceding position $(x-1,y)$ if $1<x$.) If every row contains either $0$ or $1$ blue points, then (*) holds.

I don't know what a "fictional table" is :), this one is real enough to reason about. You should probably just delete "fictional".