draw a venn diagram mixing predicates and relations

391 Views Asked by At

I am studying predicate logic, and have been drawing regular venn diagrams for statements like (exists.x)(P(x) and Q(x)). They are invaluable to get what the expression is actually saying.

But, I ran into this expression: (all.x)(all.y)(P(x) and Q(x) and R(x, y))

How can I represent the relation R(x, y) as a Venn diagram? If its not possible to use Venn diagrams, what other visual representations of predicate logic are there?

2

There are 2 best solutions below

2
On BEST ANSWER

Peirce's Existential Graphs is a more graphical/visual way of representing logical statements. Interestingly, his system is expressively complete for Predicate Logic.

Here's a very quick tutorial:

First, Peirce uses the notion of a 'Sheet of Assertion' ($SA$). This is basically a blank canvas, but anything that is put on that canvas is thereby asserted to be True. The location is irrelevant, and if you put multiple things on the $SA$ then they are all asserted to be true. As such, you get conjunction (and its commutative and associative properties) all for free.

Now, how do you actually represent claims? Well, for atomic claims, Peirce still uses letters, but other than that, there are only 'cuts'. A 'cut' is some enclosed figure (like a circle or rectangle) that works like a negation. To be specific, if you put a cut around some subgraph, then you thereby negate that subgraph. So, we have conjunction for free simply by physical juxtaposition, and together with the cut, we have an expressively complete system for propositional logic.

Here, for example, is the representation for $P \lor Q$ (equivalent to $\neg (\neg P \land \neg Q)$:

enter image description here

Note there is no one-to-one mapping between classical notation and Existential Graphs: typically, a single Existential Graph can be 'read' in multiple different ways. Here is a good example:

enter image description here

This Graph can be translated as $\neg (P \land \neg Q)$ ... or as $\neg (\neg Q \land P )$ ... but the 'conditional reading' of this kind of 'cut-inside-cut' would be $P \to Q$ (confirm that these are indeed all logically equivalent statements in classical logic)

Now, moving on to predicate logic. First, we need objects. For this, Peirce used a dot:

enter image description here

The dot means "there is something".

(Note that an empty $SA$ does not assert the existence of anything, and indeed Existential Graophs is what is called a 'free logic': unlike most classical logics, it does not make the assumption of Existential Import, which is the assumption that the domain is never empty.)

The touching of dots is seen as an identity claim. For example:

enter image description here

would be the equivalent of:

$\exists x \exists y \exists z (x = y \land y = z)$

Of course, this means that any number of dots strung together effectively still refers to just $1$ object, and it is indeed more typical to use lines to represent objects:

enter image description here

(Again, note how unusual this is. Its equivalent in classical notation would be ... what? .... $\exists x$? ... $\exists x \top$ ... $\exists x x=x$? ... $\exists x \bigwedge \emptyset$?)

OK, but how do we predicate things of those objects? Well, you simply have a classical letter for a predicate symbol, but now 'attach' the object to it:

enter image description here

So this means: $\exists x \ P(x)$

You can also attach constant symbols to an object to give it a name:

enter image description here

So this would be $\exists x (x = a \land P(x))$ ... which of course is just equivalent to $P(a)$

For predicates that take multiple arguments, we attach multiple objects:

enter image description here

So this means: $\exists x \exists y R(x,y)$

Peirce's convention was to have the first argument come in on the left, the second on the right, the third on the top, and the fourth at the bottom. He didn't really consider predicates with more arguments, but of course one could adopt a more general convention of having the objects attach in clock-wise fashion, for example.

Now, if we use a cut, we can negate, and thus obtain universals. For example:

enter image description here

represents $\neg \exists x \ P(x)$, ... and thus $\forall x \ \neg P(x)$

We can also do this:

enter image description here

So this would be: $\exists x \ \neg P(x)$

And by negating that:

enter image description here

We obtain $\neg \exists x \ \neg P(x)$ or $\forall x \ P(x)$

Note that we recognize a 'cut-inside-cut' structure here, and indeed the conditional reading of this graph would be: 'If there is something, then that something is a $P$' ... which is another way of saying 'Everything is a $P$'

OK, we are finally ready for your statement $\forall x \forall y (P(x) \land Q(y) \land R(x,y))$! Here it is:

enter image description here

Now, Peirce also developed inference rules for this system, that work all purely graphically and, amazingly, his system turned out to be complete! However, that is a story for another time....

1
On

As @Josue commented, there are no good visuals for more complex expressions. This answer discusses why that's true, and talks about some other ways of thinking about expressions in predicate logic.

When all our predicates have just one variable, like $P(x)$ and $Q(x)$, and we draw Venn diagrams of an expression, we're thinking in terms of a model, i.e. we have a universe of objects (the outside box of our Venn diagram) and our predicates are subsets of objects for which something is true (circles/regions in the Venn diagram). In set language, our universe is a set $U$ and our predicates $P$ and $Q$ are subsets of $U$. A non-visual alternative to understanding an expression might be to think of $U$ as a specific set, e.g. $U=$ set of all cats, and the one-variable predicates as objects for which something is true, e.g. $P(x)$ means the cat $x$ is white, and $Q(x)$ means the cat $x$ likes pizza, so you can think of the predicate $P$ as the set of all cats that are white, and $Q$ as the set of all cats that like pizza.

If all our predicates have two variables, like $R(x,y)$ and $T(x,y)$, we can still (sort of) do Venn diagrams: we think of $R$ and $T$ as being statements about pairs of objects. Here each point in our Venn diagram represents a pair of objects (technically an ordered pair), and like before predicates are subsets, but this time subsets of pairs of objects. In set notation, if you've encountered Cartesian products, we'd say that $R \subseteq U \times U$ and $T \subseteq U \times U$. So you can do a diagram with $R$ and $T$ being regions, but you don't really see the $x$ and $y$ parts as separate things on the diagram, just pairs of $(x,y)$ points. But the non-visual alternative of thinking of examples works just fine - we might stick with $U =$ set of all cats, and let $R(x,y)$ mean that cat $x$ is bigger than cat $y$ and $T(x,y)$ mean that cat $x$ is older than cat $y$.

You can try to "fix" the visualisation for the two-variable predicates by treating the $x$ and $y$ variables like the $x$ and $y$ axes on the bottom and left edges of the Venn diagram box, and this sort of works. (For a 3-variable predicate you'd have to visualise a 3D Venn "space" diagram, and for 4-variable predicates a 4D space!). The good thing about this visualisation is that you can also draw the one-variable predicates like $P(x)$ and $Q(x)$ as regions on the $x$-axis, but if you had a nice 2D Venn diagram talking about just $P$ and $Q$, it'd just get squashed down to a bunch of line segments on the $x$ axis in the 2D picture.

When I see a statement like $$(\forall x)(\forall y) ~~P(x) \text{ and } Q(x) \text { and } R(x,y),$$ I read that as $$\text{"for every $x$, for every $y$, $P(x)$ is true and $Q(x)$ is true and $R(x,y)$ is true".}$$ Then, probably through years of familiarity with this kind of stuff, that forms into the "picture" that $$\text{$P(x)$ is true for all $x$,}\\\text{$Q(x)$ is true for all $x$,}\\\text{$R(x,y)$ is true for all $x$ and all $y$.}$$ And if we translate that into the silly "cat" universe, that's $$\text{all cats are white,}\\\text{all cats like pizza,}\\\text{every cat $x$ is bigger than every cat $y$.}$$ The last bit isn't helpful, but then again I'd picked a meaning for $R(x,y)$ without knowing anything about it. It's easier to take a bunch of statements in English and translate them into predicate notation, harder to take a bunch of predicate calculus expressions and attempt to translate them into a meaningful model.

But thinking in terms of concrete "objects" (even if we don't know what kinds of things they are) can help to make sense of what's going on with quantifiers ($\forall$ and $\exists$), e.g. it's important when we see something like $$(\forall x)(\forall y) ~\text{blah-blah},$$ to remember that as the variables $x$ and $y$ take on the "value" of each "object" in turn, that we'll also have the case where $x$ and $y$ refer to the same object.