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?
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)$:
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:
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:
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:
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:
(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:
So this means: $\exists x \ P(x)$
You can also attach constant symbols to an object to give it a name:
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:
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:
represents $\neg \exists x \ P(x)$, ... and thus $\forall x \ \neg P(x)$
We can also do this:
So this would be: $\exists x \ \neg P(x)$
And by negating that:
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:
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....