ABI Layer 2: prove the one-for-one restart invariant — flagship Idris2 proof#35
Merged
Merged
Conversation
Add Otpiser.ABI.Semantics: a faithful Idris2 model of a one-for-one OTP
supervisor (children keyed by id, each Running/Failed) and a restart step,
with machine-checked proofs of the headline fault-tolerance invariant:
- restartPreservesChildSet: restarting any child leaves the ordered set
of supervised child ids unchanged (real propositional equality).
- restartLeavesOthersUntouched: every sibling whose id differs from the
target survives the restart byte-for-byte identical (Elem soundness).
- restartHeadRuns / RestartedRunning: the targeted child is set Running.
Positive controls exhibit concrete witnesses over a 3-worker supervisor;
the negative control (negativeSiblingNotReset) refutes, by machine, the
OneForAll-style claim that a failed sibling is reset — establishing the
property is non-vacuous. No believe_me / postulate / assert_total.
Registered in otpiser-abi.ipkg; ABI builds clean with zero warnings.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raises otpiser's Idris2 ABI to Layer 2 with its first flagship semantic proof. otpiser's headline is generating OTP supervision trees; this proves the one-for-one restart invariant: restarting a failed child leaves the other children untouched and the child set unchanged.
Mirrors the estate flagship-proof pattern: supervisor/child model,
OtherIn/RestartedRunningpropositions, sound+complete decision,certifyRestartproven sound, positive + negative controls.Changes
src/interface/abi/Otpiser/ABI/Semantics.idr—Supervisor/Child,OtherIn,RestartedRunning, the restart-invariant theorems,certifyRestart/soundness, controls.otpiser-abi.ipkg.RSR Quality Checklist
Required
As Applicable
Testing
Verified with Idris2 0.7.0:
idris2 --build otpiser-abi.ipkg→ exit 0, zero warnings. Adversarial check: a deliberately-false proof was rejected.build/removed.🤖 Generated with Claude Code
https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
Generated by Claude Code