Skip to content

ABI Layer 3: monotone safety under policy composition#34

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/new-session-znxgm7
Jun 28, 2026
Merged

ABI Layer 3: monotone safety under policy composition#34
hyperpolymath merged 3 commits into
mainfrom
claude/new-session-znxgm7

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Layer 3 (second, deeper invariant): proves monotone safety under policy composition — tightening a policy never re-permits a previously-forbidden action (the permitted set only shrinks; tightening is a proven reflexive+transitive preorder), and an action permitted under andPolicy p1 p2 is permitted under each conjunct (iff). Quantifies over all actions and the whole policy space — distinct from and deeper than the Layer-2 single-action forbiddenNeverPermitted.

New module Phronesiser.ABI.Invariants (imports the Layer-2 Semantics model). Sound+complete Dec, positive + non-vacuity controls.

Testing

Idris2 0.7.0 --build → exit 0, zero warnings. Adversarial rejection confirmed. build/ removed. No believe_me/postulate/sorry.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx


Generated by Claude Code

claude and others added 3 commits June 27, 2026 19:48
Raises the Phronesiser Idris2 ABI to Layer 2 with a flagship, machine-checked
semantic proof of the repo's headline property ("provably safe ethical
constraints for AI agents").

Model: a deontic policy partitions agent actions into Allow/Deny. The
`ActionPermitted` proposition has NO constructor admitting a `Deny` verdict, so
a forbidden action is structurally uncertifiable.

Proven:
- decActionPermitted: sound + complete `Dec (ActionPermitted a)`.
- certifyPermittedSound: certifier soundness (Ok => ActionPermitted).
- safeInformPermitted: positive control (inhabited permission witness).
- forbiddenNeverPermitted: negative control / core safety theorem
  `Not (ActionPermitted forbiddenDeploy)`.
- forbiddenNeverCertifiedOk: corollary that the forbidden action is never Ok.

Non-vacuity confirmed: a deliberately false witness
`PermitAllow Refl : ActionPermitted forbiddenDeploy` is rejected by idris2
(Allow vs Deny mismatch). Build is clean (exit 0, zero warnings).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
New module Phronesiser.ABI.Invariants, built over the existing Layer-2
Semantics model (Action / Verdict / verdictOf — nothing redefined). It
proves two properties strictly deeper than the Layer-2 single-action
safety theorem, both quantified over all actions and over policies:

  1. Monotone safety (downward-closure of permission): if policy p2
     tightens p1, every action p1 forbids stays forbidden under p2 —
     tightening never re-permits a previously-forbidden action; the
     permitted set only shrinks. Tightening is a proven preorder
     (reflexive + transitive).
  2. Conjunction composition: an action permitted under andPolicy p1 p2
     is permitted under each conjunct (iff via bothPermitsAnd), and the
     conjunction provably tightens each conjunct.

Includes a sound+complete Dec (Permits p a), sample policies over the
shared model, positive controls (witnesses + a live application of the
monotone-safety theorem) and negative/non-vacuity controls in Not(...)
form. %default total; no believe_me / postulate / assert_total / sorry /
asserted equalities. Builds with zero warnings; an adversarial false
proof (tightened policy permits the forbidden action) is rejected by the
type checker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@hyperpolymath hyperpolymath marked this pull request as ready for review June 28, 2026 05:42
@hyperpolymath hyperpolymath merged commit 9d8062b into main Jun 28, 2026
22 of 24 checks passed
@hyperpolymath hyperpolymath deleted the claude/new-session-znxgm7 branch June 28, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants