# 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.)

## 4 places

Examples:

matrix 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$ ## 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.

## Places and different variables

The number of formulas with n place predicates and n different variables is (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 * = 2 * Stirling2(n,k) * OrderedBell(k):

```      k  =  1        2        3        4        5        6        7        8              sum = 2 * A083355(n)
n
1           2                                                                                 2
2           2        6                                                                        8
3           2       18       26                                                              46
4           2       42      156      150                                                    350
5           2       90      650     1500     1082                                          3324
6           2      186     2340     9750    16230     9366                                37874
7           2      378     7826    52500   151480   196686    94586                      503458
8           2      762    25116   255150  1136100  2491356  2648408  1091670            7648564
```

## Preferential arrangements of set partitions

A formula with an n-place predicate is PA of an n-set together with a Boolean value: