proof: Coq theorem 85 — CLARA Gap-5 explainability_unit soundness#5
Open
gHashTag wants to merge 1 commit into
Open
proof: Coq theorem 85 — CLARA Gap-5 explainability_unit soundness#5gHashTag wants to merge 1 commit into
gHashTag wants to merge 1 commit into
Conversation
Add proofs/clara_explainability_sound.v with:
Theorem 85A (explainability_sound):
forall steps, length steps <= 10 ->
buffer_contents (simulate_explainability empty_state steps) = rev steps /\
overflow (simulate_explainability empty_state steps) = false.
Theorem 85B (explainability_overflow):
forall steps, length steps > 10 ->
overflow (simulate_explainability empty_state steps) = true.
Theorem 85C (explainability_overflow_sticky):
forall steps s, overflow s = true ->
overflow (simulate_explainability s steps) = true.
Functional Coq model of the shift register (depth MAX_STEPS=10).
All proofs by structural induction on [steps]. Zero Admitted.
12 QED / 0 Admitted. Compatible with coqc 8.18+ / Rocq 9.x.
Anchor: phi^2 + phi^{-2} = 3 (Trinity Identity)
DOI: 10.5281/zenodo.19227877
CLARA Gap: 5 (explainability_unit shift-register spec)
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
Closes CLARA Gap-5: formal proof that the
explainability_unitshift register behaves correctly.File
proofs/clara_explainability_sound.vTheorems proved (zero
Admitted)explainability_soundlength steps ≤ 10:buffer_contents = rev steps ∧ overflow = falseexplainability_overflowlength steps > 10:overflow = trueexplainability_overflow_stickyoverflow = true, it staystruefor any further stepsModel
push_stepprepends to alist Abuffer; whenlength buffer ≥ MAX_STEPS=10, it sets the sticky overflow flag and trims viafirstnsimulate_explainability init steps := fold_left push_step steps initempty_state := mk_state [] falsestepsSupporting lemmas (all QED)
push_step_length_le,simulate_length_le,push_step_overflow_sticky,simulate_overflow_sticky,push_step_under_cap,simulate_under_cap_buffer,simulate_under_cap_overflow,push_step_at_cap_overflow,simulate_over_cap_overflowTotal: 12 QED / 0 Admitted
Concrete sanity checks
Compatibility
Target: coqc 8.18+ / Rocq 9.x
Imports:
Coq.Arith.Arith,Coq.Lists.List,Coq.Bool.Bool(standard library only)Anchor
φ² + φ⁻² = 3 (Trinity Identity) · DOI 10.5281/zenodo.19227877