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.
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.
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.
Order is TT TF FT FF, as in lambda16.txt. Value i and value 15−i are complements.
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).
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:
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.
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:
This is classical modus ponens on this row.
1→q is 0 only when q is 0.
0→q is 1 whatever q is, so this row says nothing about Q.
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.
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.
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.
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.
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.