# Formulas in predicate logic
## 1 place

| Implications between 1-place formulas, on the right the negations (To match the traditional square of opposition the subalterns point downwards here.) | All cases with 2 individuals |
description :
| abbreviation | formula | description |
| a1 | $\forall x.Px$ | full |
| e1 | $\exists x.Px$ | not empty |
| | $\forall x.\neg Px$ | empty |
| | $\exists x.\neg Px$ | not full |

## 2 places

description :
| abbreviation | formula | description |
| a12 = a21 | $\forall xy.Pxy$ | matrix full |
| e12 = e21 | $\exists xy.Pxy$ | matrix not empty |
| e2a1 | $\exists y.\forall x.Pxy$ | one row full |
| e1a2 | $\exists x.\forall y.Pxy$ | one column full |
| a2e1 | $\forall y.\exists x.Pxy$ | no row empty |
| a1e2 | $\forall x.\exists y.Pxy$ | no column empty |
| formula | description |
| $\forall xy.\neg Pxy$ | matrix empty |
| $\exists xy.\neg Pxy$ | matrix not full |
| $\exists y.\forall x.\neg Pxy$ | one row empty |
| $\exists x.\forall y.\neg Pxy$ | one column empty |
| $\forall y.\exists x.\neg Pxy$ | no row full |
| $\forall x.\exists y.\neg Pxy$ | no column full |
| sketch | abbreviation | formula | description |
| | a(12) = a(21) | $\forall x.Pxx$ | diagonal full |
| | e(12) = e(21) | $\exists x.Pxx$ | diagonal not empty |
| sketch | abbreviation | formula | description |
| | | $\forall x.\neg Pxx$ | diagonal empty |
| | | $\exists x.\neg Pxx$ | diagonal not full |
| | 3 ordered partitions in Cayley graph | Pairs, nodes of the square |
| Sketches in Hasse diagram | 6 matrices in Hasse diagram | Pairs in Hasse diagram |

## 3 places

| | 13 ordered partitions in Cayley graph | Pairs, nodes of the cube |
| Sketches in Hasse diagram | 26 matrices in Hasse diagram | Pairs in Hasse diagram |

## 4 places

Examples:
| abbreviation | formula |
| a3 e2 a4 e1 | $\forall y~\exists x~\forall z~\exists w~Pwxyz$ |
| e1 a3 e24 | $\exists w~\forall y~\exists x~\exists z~Pwxyz$ |
| a1 e3 a24 | $\forall w~\exists y~\forall x~\forall z~Pwxyz$ |
| e3 a124 | $\exists y~\forall w~\forall x~\forall z~Pwxyz$ |
| 75 ordered partitions in Cayley graph | 150 matrices in Hasse diagram | Pairs, nodes of the tesseract 2-element subsets of a 4-element set: |
weight 3 :
Ordered partitions :
| 1110 | 1101 | 1011 | 0111 |
Pairs :
| 1110 | 1101 | 1011 | 0111 |
weight 2 :
Ordered partitions :
| 1100 | 1010 | 0110 | 1001 | 0101 | 0011 |
Pairs :
| 1100 | 1010 | 0110 | 1001 | 0101 | 0011 |
weight 1 :
Ordered partitions :
| 1000 | 0100 | 0010 | 0001 |
Pairs :
| 1000 | 0100 | 0010 | 0001 |

## Pairs

Formulas with n-place predicates can be broken down in T$_{(n-1)}$ formulas with 2-place predicates. These triangles (or vectors) with up to 8 different entries are a convenient way to determine whether one formula implies another one.
The image captions in this section are the abbreviated formulas and the pseudo-octal strings.
Among the following four formulas - visualized in the different ways used here - the left one implies a1 e2 a3, and the two on the right are implied by it.
| a(12)3 = 20-0 | a1 e2 a3 = 60-1 | e12 a3 = 71-1 | a1 e(23) = 66-5 |

## Places and different variables

The number of formulas with n place predicates and n different variables is  A000629(n) = 2 * OrderedBell(n). These formulas form the lattices shown above.
The number of formulas with n place predicates and k different variables is 2 *  A232598 = 2 * Stirling2(n,k) * OrderedBell(k):

## Preferential arrangements of set partitions

A formula with an n-place predicate is PA of an n-set together with a Boolean value:
E.g. this PA corresponds to this and this formula.