Skip to content

feat(coq-86): CLARA Gap-4 restraint_ctrl soundness proof — Theorem 86#6

Open
gHashTag wants to merge 1 commit into
mainfrom
feat/coq-theorem-86-restraint
Open

feat(coq-86): CLARA Gap-4 restraint_ctrl soundness proof — Theorem 86#6
gHashTag wants to merge 1 commit into
mainfrom
feat/coq-theorem-86-restraint

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

CLARA Gap-4 — Theorem 86: restraint_ctrl Soundness

Summary

Adds proofs/clara_restraint_sound.v (~347 lines) — a fully machine-checked Coq proof of three properties of the restraint_ctrl module. Zero Admitted. Compiled under coqc 8.20.1 (8.18+ compatible).

Theorems proved

# Name Statement
86A restraint_sound force_unknown s' = (phi_drift i >? 164) ∥ (step_count i >? 10) ∥ (¬ receipt_ok i) OR (sticky: was tripped → stays tripped)
86B restraint_sticky force_unknown s = true → force_unknown (step_restraint (step_restraint s i1) i2) = true
86C restraint_reason_onehot force_unknown (step_restraint s i) = true → popcount (reason (step_restraint s i)) ≤ 1

Supporting lemmas (all QED)

  • step_sticky — single-step stickiness
  • step_fresh_fu — fresh-state output equals triggered
  • step_reason_length — reason vector length = 3
  • step_reason_onehot — reason popcount ≤ 1 (used by 86C)
  • triggered_spec — triggered = RTL disjunction

Sanity-check examples (all by reflexivity)

  • trip_phi_drift, trip_step_count, trip_receipt — each condition individually trips
  • no_trip_all_ok — all within bounds → no trip
  • sticky_stays — trip persists after reset-free transition
  • boundary_phi_no_trip, boundary_step_no_trip — exact boundary (=164, =10) does NOT trip

File

proofs/clara_restraint_sound.v  (347 lines, 0 Admitted)

Audit

Theorem index | Name                    | QED | Admitted
--------------+-------------------------+-----+---------
86A           | restraint_sound         |  ✓  |    0
86B           | restraint_sticky        |  ✓  |    0
86C           | restraint_reason_onehot |  ✓  |    0
Total: 3 main theorems + 5 lemmas + 7 examples = 15 QED, 0 Admitted

Anchor

φ² + φ⁻² = 3 · DOI: 10.5281/zenodo.19227877

Theorem 86: restraint_ctrl force_unknown soundness, stickiness,
and reason one-hot — proofs/clara_restraint_sound.v (~347 lines).

Theorems proved (0 Admitted):
  86A restraint_sound   : force_unknown = phi_drift>164 || step_count>10 || ¬receipt_ok
                          OR (sticky: was tripped, stays tripped)
  86B restraint_sticky  : force_unknown s = true ->
                          force_unknown (step_restraint (step_restraint s i1) i2) = true
  86C restraint_reason_onehot : force_unknown s' = true ->
                          popcount (reason s') <= 1

Supporting lemmas: step_sticky, step_fresh_fu, step_reason_length,
  step_reason_onehot, triggered_spec (all QED).

7 concrete sanity-check Examples (all by reflexivity).

Compiled: coqc 8.20.1 (8.18+ compatible), 0 errors, 0 Admitted.

Anchor: φ² + φ⁻² = 3
DOI: 10.5281/zenodo.19227877
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.

1 participant