Truth Table

The Truth Table tab enumerates all input assignments and shows the output for each row.

Overview

For a program with a trailing unnamed expression, Truth Table shows that expression. Otherwise it shows the selected binding. Each row is one assignment of all free input variables. The final column (Out) shows whether the binding evaluates to true (1) or false (0) for that assignment.

Truth table for the feature-flag example showing columns for each predicate atom and a final Out column.
Truth table for the feature-flag expression. Predicate atoms (like age >= 18) are columns alongside boolean inputs.

Column types

Don't-care rows

Rows where a don't-care variable affects the output appear in italics with an x in the Out column. The simplifier is allowed to assume either output for those rows.

Truth table with don't-care rows shown in italics with a ? in the output column.
Don't-care rows are italicised. The simplifier is free to assign either output to these rows.

Predicate columns

When an expression contains predicate atoms (age >= 18, region in {CA, US}), the truth table treats each unique predicate as a boolean column. The rows enumerate all combinations of true/false values for those predicates plus the regular boolean inputs.

This means the truth table may include logically impossible rows — e.g. a row where age < 18 = 1 and age >= 18 = 1 simultaneously. Use SMT/Z3 to check integer relationships; the full Truth Table remains a Boolean combination view.

Note
For expressions with many predicate atoms, the truth table can grow very large. Use the Coverage or Decision Table tabs for a more compact view of predicate-heavy expressions.

Constrained variables

Inputs set to 0 or 1 affect the live Result summary. The Truth Table continues to show all Boolean combinations; use the Result summary to inspect the rule under your chosen constraints.

Scale limits

The truth table has 2n rows, where n is the number of Boolean inputs and predicate columns. Each extra column doubles the row count. Large expressions can be slow or exceed browser resources; keep rules small or compare smaller parts separately.