Modus Ponens in Sixteen Values
Logic Research · sixteen functions

Modus ponens in sixteen values

Classical modus ponens says that from P and P→Q you may conclude Q. Here P and Q are not just TRUE or FALSE. Each is one of the sixteen two-input functions, read row by row, the same way as in Gates of gates. This page works out what the rule becomes.

The result
from P and R = P→Q:  P∧R ≤ Q ≤ R

It is possible only when P∨R = TRUE. Here ≤ means “implies on every row”. Q is pinned on the rows where P is true and free on the rows where P is false. When P is TRUE, the two bounds meet and you get classical modus ponens: Q = R.

1 · The values

Each value is a 2×2 square

A sixteen-valued truth value has four rows, one for each input pair (p, q). Draw it as a square Venn diagram: a quarter is coloured when the value is TRUE in that region. The colours are the same as on the Gates of gates page.

p and q
TT
p only
TF
q only
FT
neither
FF

Order is TT TF FT FF, as in lambda16.txt. Value i and value 15−i are complements.

2 · Modus ponens in squares

The whole argument, one square per step

Take P and Q as the plain variables. P is value 6 and Q is value 3, and every connective works quarter by quarter. Each step of (P ∧ (P→Q)) → Q is then a single square:

The formula ends as the solid TRUE square. The same happens for all 256 choices of P and Q (section 7).

Implies means “fits inside”

For squares, A → B is TRUE exactly when every lit quarter of A is also lit in B. So modus ponens is a picture of three nested squares. The conjunction fits inside the conclusion, and the conclusion fits inside the premise P→Q:

The rule: what P and P→Q alone tell you

Now hide Q and keep only the two premise squares. Where P is lit, Q copies P→Q. Where P is dark, the quarter is free (hatched), because P→Q is lit there whatever Q does:

Four squares fill that pattern: . The real Q is one of them. Only half of the quarters are pinned because P covers only half the rows. With P = TRUE, every quarter is pinned and exactly one square is left. That is classical modus ponens.

3 · One row at a time

Everything happens row by row

The sixteen-valued connectives work on each row separately, so modus ponens does too. On a single row, P and R = P→Q are ordinary booleans, and there are only four cases:

p = 1, r = 1
1
Q is pinned TRUE

This is classical modus ponens on this row.

p = 1, r = 0
0
Q is pinned FALSE

1→q is 0 only when q is 0.

p = 0, r = 1
01
Q is free

0→q is 1 whatever q is, so this row says nothing about Q.

p = 0, r = 0
✕
Impossible

0→q is always 1, so r can never be 0 here.

Stack four rows back together and you get the rule: the pinned rows make the lower bound P∧R. The free rows can be switched on up to R, which is TRUE on every free row. An impossible row anywhere rules out the whole pair.

4 · Try it

Pick P and P→Q, see which Q fit

Premise P
Premise R = P→Q

Row by row

All sixteen values, with the ones that fit lit up:

The sixteen values form a 4-cube: each edge flips one row. The answers always fill a sub-cube, running from P∧R at the bottom up to R. Each free row is one direction in it.

5 · All 256 pairs

The whole map

Each cell is one pair (P, R). Its shade is how many Q fit. Blank cells are impossible pairs. Click a cell to load it into the explorer above.

6 · Counting

Why 81 pairs and 256 answers

Each row allows three (p, r) combinations out of four, so 3⁴ = 81 pairs are possible.

Those three combinations give 1, 1 and 2 choices for q, which is 4 per row. So the answers add up to 4⁴ = 256. That is every (P, Q) pair exactly once, because each (P, Q) produces exactly one R.

A P with k false rows leaves 2k answers. The more rows P covers, the more modus ponens tells you.

7 · The tautology form

(P ∧ (P→Q)) → Q still holds

Written as one formula, modus ponens is (P ∧ (P→Q)) → Q. Applied to sixteen-valued P and Q, gate of gates, it gives TRUE on all 256 pairs, because it is TRUE on every row separately. That formula is where the lower bound comes from: P ∧ (P→Q) is P∧Q, and it implies Q. The upper bound comes from the other tautology, Q → (P→Q): Q can never be truer than R.