Why does the author define these "logical notations" for set logic with "if then" and &?

113 Views Asked by At

In Section 1.1 of "Set Theory for Computer Science", the author defines

$ \forall x \in X. P(x) $ and $ \exists x \in X.P(x) $ as shorthand for

$ \forall x.(x \in X \Rightarrow P(x)) $ and $ \exists x.(x \in X \space \& \space P(x)) $, respectively.

The author's explanation of these shorthand notations in English ("for all x in X, P(x)") make sense to me, but I'm not really sure where the "if-then" $ \Rightarrow $ and "and" $ \& $ come in.

2

There are 2 best solutions below

2
On BEST ANSWER

Remember that quantifiers are taken over the entire universe of discourse. So to limit the quantifier to a certain set you need to somehow "filter" out the set of objects being quantified.

When you quantify with $\forall x$, then you want to say given any $x$, then I don't care if $x\notin X$, but if $x\in X$ then I want to assure that $P(x)$. This is exactly to say $\forall x(x\in X\rightarrow P(x))$, and that's why this is defined to be the meaning of $\forall x\in X.P(x)$.

When you quantify with $\exists x$, then you want to say that there exists an object $x$ satisfying $P$ which happens to be an element of $X$ as well. And this happens to be exactly the meaning of $\exists x(x\in X\land P(x))$. So this is how we define $\exists x\in X. P(x)$.

0
On

This is math's version of "typed" versus "untyped" objects.

In set theory, an unbound variable is essentially an untyped object. Or if you prefer, an object of type Set, the type "everything" has. Compare with the type Object from java.

But we can bind variables to other types; the most typical case is when we have a set, and we want to bind the object to a set. e.g we say "let $x$ be a real number" to introduce a new variable $x$ that is bound to the set $\mathbb{R}$. We might say that $\mathbb{R}$ is the type of $x$.

Quantifiers like $\forall x$ introduce variables, but this form introduces an unbound variable (or a variable of type Set, if you prefer). The notation $\forall x \in X$ introduces the variable $x$ and binds it to $X$ at the same time.

And it turns that $\forall x \in X : P(x)$ and $\forall x : x \in X \implies P(x)$ have the same semantics, so it is not unreasonable to define the former as meaning the latter.

As an aside, those who prefer typed logic might prefer to write $\forall x \in \mathbf{Set}: P(x)$ rather than $\forall x: P(x)$.