The third rung · what ought to be
Deontic Arithmetic
The invariant layer says what cannot be. The heuristic layer says what is better. Neither says what ought to be — obligations, permissions, prohibitions, and what you owe once an obligation is broken. That is the deontic layer: a small lattice of normative status, a join that accrues norms, priority that resolves their conflicts, and a contrary-to-duty mechanism that escalates rather than fails silently.
1 · alethic — necessity / safety → Invariant Arithmetic · refuses
2 · axiological — value / preference → Heuristic Arithmetic · ranks
3 · deontic — obligation / permission / prohibition → this page · obliges & escalates
4 · temporal — liveness over trajectories → next
5 · reflexive — self-revising norms → later
IThe algebra
A norm assigns an action one of four deontic statuses. They form a diamond lattice ordered by how much they constrain the agent: OPTIONAL (permitted, no constraint) at the bottom; OBLIGATORY and FORBIDDEN as incomparable middles; CONFLICT (both at once — over-constrained) at the top.
OPTIONAL ⊔ x = x — identity
O ⊔ F = CONFLICT — over-constraint
CONFLICT ⊔ x = CONFLICT — absorbing
x ⊔ x = x — idempotent
commutative · associative · a semilattice
Permission, obligation, and prohibition are the classical deontic square, interdefinable through negation: P(p) ≡ ¬O(¬p), F(p) ≡ O(¬p) ≡ ¬P(p). A consistent norm set obeys the SDL axiom D: O(p) → P(p) — you cannot be obligated to do the impermissible. Exactly where that fails is the CONFLICT node.
Norms and operations
A Norm is a conditional rule of one modality, with a priority and an optional contrary-to-duty repair: { modality, condition, priority, ctd }. Six operations work over norms and the statuses they induce.
| operation | type | does | law |
|---|---|---|---|
| accrue | join the statuses of all in-force norms | commutative idempotent monoid; identity OPTIONAL | D1–D5 |
| resolve | Conflict → status by priority | idempotent; clears a conflict when priorities differ, else escalates | D6 |
| detach | Norm × ctx → in-force? | factual detachment; partial — a CTD repair detaches only after a violation | D7–D8 |
| comply | status × intent → ok / violations | the gate: forbidden-and-doing, or obligatory-and-omitting, is a violation | D9 |
| escalate | violated norm → repair | the contrary-to-duty obligation now in force (or default escalation) | D8 |
| govern | options → decision | alethic floor ▸ deontic ▸ axiological, with obligation-forcing & CTD escalation | DB1–DB3 |
Precedence is principled. The three modalities compose in a fixed order: alethic (can't be violated, ever) over deontic (ought — violable, but a breach has consequences) over axiological (preference). So a forbidden option is excluded but recorded as overridable; an obligatory feasible option is forced over anything that merely scores higher; and an obligation whose only satisfier is alethically infeasible triggers escalation — never a silent fall-back.
IIThe laws
Twelve laws, the same discipline as the other rungs. Nine for the norm algebra, three for its interaction with the bridge.
| D1 | accrue (join) is commutative and associative |
| D2 | OPTIONAL is the identity; join is idempotent |
| D3 | O ⊔ F = CONFLICT |
| D4 | join is monotone: a ⊑ a⊔b |
| D5 | CONFLICT absorbs everything |
| D6 | resolve is idempotent and clears a conflict when priorities differ |
| D7 | factual detachment: a norm is in force iff its condition holds |
| D8 | CTD partiality: a repair obligation detaches iff the primary was violated |
| D9 | comply: doing the obligatory complies; doing the forbidden, or omitting the obligatory, violates (so O ⇒ ¬F) |
| DB1 | a forbidden (un-overridden) option is excluded from the decision |
| DB2 | an obligatory feasible option is forced — it overrides a higher-scoring permitted option |
| DB3 | alethic precedence: an obligatory but infeasible option yields a contrary-to-duty escalation |
IIIThe laws, checked
The same harness style as the invariant and heuristic pages — each law verified against random inputs, in your browser, on the engine that ships in box-and-box.
IVType sketch
// the status lattice and a norm type Status = "optional" | "obligatory" | "forbidden" | "conflict"; interface Norm { modality: "obligatory" | "forbidden" | "permitted"; condition: (ctx: Ctx) => boolean; // factual detachment priority: number; // resolves conflicts ctd?: Norm; // contrary-to-duty repair } function join(a: Status, b: Status): Status; // accrue — D1..D5 function resolve(v: Verdict): Resolved; // priority — D6 function detach(n: Norm, ctx: Ctx, opts?: { violated: boolean }): InForce; // partial — D7,D8 // the three-modality decision: alethic ▸ deontic ▸ axiological function govern( options: { id; value: Value; utility: number; ctx: Ctx }[], cfg: { req: Requirements; norms: Norm[]; semiring: Semiring } ): { decision: string | null; forcedByObligation: boolean; escalation: { required: true; repair: string; reason: string } | null; deonticallyVetoed: { id; by: string[]; overridable: true }[]; alethicallyVetoed: { id; failures }[]; };
VWorked example
A regulated workflow: an agent must send a report whose data contains PII. Three norms are in force — forbidden to transmit PII without consent (priority 10); obligatory to obtain consent first, with a contrary-to-duty repair escalate-to-DPO (priority 8); and an explicit permission for the redacted path. Watch all three deontic behaviours appear as the situation changes. Runs live below.
VIStanding on
None of this is new logic — it is the standard apparatus, made executable and wired to the rest of the stack. The triad and the deontic square are von Wright's; the O(p)→P(p) consistency axiom is Standard Deontic Logic's D; the repair-on-violation mechanism is the contrary-to-duty tradition that grew out of Chisholm's paradox — the observation that "you ought not do X, but if you do, you ought to do Y" cannot be modelled by a flat prohibition. The stack's existing governance fields — authority_path, deny_default, audit — were already proto-deontic; this layer gives them an algebra.
Chisholm, R. (1963). Contrary-to-Duty Imperatives and Deontic Logic. Analysis 24.
Prakken, H. & Sergot, M. (1996). Contrary-to-Duty Obligations. Studia Logica 57.
Åqvist, L. (2002). Deontic Logic, in Handbook of Philosophical Logic (SDL, the D axiom).