Repository navigation
feat(formal): Recovery.v — squeakwell recovery kernel over Octad.v (R2/R3/R4/R9/R10) #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
afd7cf5
87fa344
d75ae24
a0aa3a8
3e38741
701e263
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,6 +100,12 @@ jobs: | |
| set -euo pipefail | ||
| coqc -q Octad.v | tee Octad.out | ||
|
|
||
| - name: Compile Recovery.v (squeakwell recovery kernel over Octad.v) | ||
| working-directory: formal | ||
| run: | | ||
| set -euo pipefail | ||
| coqc -q Recovery.v | tee Recovery.out | ||
|
|
||
| - name: Verify Provenance assumptions whitelist | ||
| working-directory: formal | ||
| run: | | ||
|
|
@@ -257,3 +263,30 @@ jobs: | |
| exit 1 | ||
| fi | ||
| echo "OK(Octad): O-series + R1-R3 modality algebra whitelisted" | ||
|
|
||
| - name: Verify Recovery assumptions whitelist | ||
| working-directory: formal | ||
| run: | | ||
| set -euo pipefail | ||
| # Same whitelist as Octad.v: mval, ident (Parameters) + functional_extensionality_dep. | ||
| # Every oracle, conflict test and winner selector is a Section variable | ||
| # discharged into the theorem statements. | ||
| # The Print Assumptions output must exist and be non-empty: an absent | ||
| # or empty file is a broken pipeline, not a clean whitelist. | ||
| test -s Recovery.out | ||
| # Names may be printed qualified (e.g. Classical_Prop.classic): admit | ||
| # dots and primes so a qualified axiom cannot hide behind an allowed one. | ||
| AXIOMS=$(awk "/^[A-Za-z_][A-Za-z0-9_.']* :/ {print \$1}" Recovery.out | sort -u) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| test -n "$AXIOMS" | ||
| # grep exits 1 when every axiom is whitelisted (the good case) and 2 on | ||
| # error; tolerate exactly status 1 so a real failure still fails the step. | ||
| UNEXPECTED=$(printf '%s\n' "$AXIOMS" \ | ||
| | grep -vxE 'mval|ident|functional_extensionality_dep' || test "$?" -eq 1) | ||
| if [ -n "$UNEXPECTED" ]; then | ||
| echo "ERROR(Recovery): unexpected axiom(s) in Print Assumptions:" >&2 | ||
| echo "$UNEXPECTED" >&2 | ||
| echo "---" >&2 | ||
| cat Recovery.out >&2 | ||
| exit 1 | ||
| fi | ||
| echo "OK(Recovery): squeakwell R2/R3/R4/R9/R10 recovery kernel whitelisted" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ | |
| *.glob | ||
| .*.aux | ||
| *.out | ||
| *.axioms | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,8 +96,13 @@ Concretely: | |
|
|
||
| | R1-R3 `merge_commutative` + `merge_associative` + `merge_idempotent` | ||
| | `formal/Octad.v` | ||
| | Candidate NEW abstraction — join-semilattice of partial sections (to be established in echo-types per standing directive) | ||
| | The paper's `arcvix-octad-data-model.tex` Proposition "Merge Commutativity" had a one-line pen-and-paper proof; `merge_commutative` is it MECHANISED. Octad merge `(+)` inherits exactly the algebra of its conflict kernel `resolve`: `(+)` is commutative/associative/idempotent iff `resolve` is (R1/R2/R3 stated as implications). This is the honest resolution of verisimdb#77's "R1-R3 likely false as written": a CRDT-shaped `resolve` (join on a semilattice) instantiates all three; AutoMerge does not. Echo-types has no join-semilattice-of-sections module yet — companion issue to file per the standing directive. | ||
| | `EchoPartialSection.agda` (echo-types, landing 2026-11-09 with the squeakwell recovery ladder) — partial sections with a resolve-parametric merge; the same conditional laws, pointwise | ||
|
hyperpolymath marked this conversation as resolved.
Resolved
|
||
| | The paper's `arcvix-octad-data-model.tex` Proposition "Merge Commutativity" had a one-line pen-and-paper proof; `merge_commutative` is it MECHANISED. Octad merge `(+)` inherits exactly the algebra of its conflict kernel `resolve`: `(+)` is commutative/associative/idempotent iff `resolve` is (R1/R2/R3 stated as implications). This is the honest resolution of verisimdb#77's "R1-R3 likely false as written": a CRDT-shaped `resolve` (join on a semilattice) instantiates all three; AutoMerge does not. The join-semilattice-of-sections companion is echo-types `EchoPartialSection.agda` (column 3); cite that module — no companion issue is needed. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. State only the proved direction of the merge laws. The “iff” claim asserts a converse that
|
||
|
|
||
| | Recovery kernel `fill_guarded` + `fill_inflationary` + `fill_not_monotone` + `fill_can_raise_conflicts` + `step_progress` + `iter_9_fixpoint` + `fold_merge_perm` + `put_commutative_iff_trivial` | ||
| | `formal/Recovery.v` | ||
| | `EchoPartialSection.agda` (guarded fill as left-biased merge, information order, restriction fibre) and `EchoFibreIntersection.agda` (multi-witness narrowing) — echo-types; Lean twin of the reach grade in tropical-types `Resource/HubCeiling.lean` | ||
| | The squeakwell recovery invariants (hyperpolymath/squeakwell `docs/ROUTE-PLAN.adoc` section 3, rungs R2/R3/R4/R9/R10) in their REPAIRED form, over `Octad.v`: identity persists through every round; guarded fill is inflationary on the information order but NOT monotone (counter-model); filling can RAISE the conflict count (the drift_compute.rs witness, so drift is observable, not monotone); under the two explicit hypotheses `conflict_refl` (no value conflicts with itself) and `winner_some` (a conflicting octad always has a present winner), one round is a fixpoint or lex-decreases `(|missing|, nconflicts)` and nine rounds always reach a conflict-free fixpoint — without them a conflict can persist forever; the merge fold is permutation-invariant for a same-identifier batch under a commutative, associative `resolve`, and the PUT-overwrite kernel is commutative only on a singleton `mval`. Oracles, the conflict test and the winner selector are Section variables discharged into the statements; `Print Assumptions` closes on the Octad.v whitelist. | ||
|
|
||
| | Enrichment `enrich_sets_target` + `enrich_preserves_others` + `enrich_present` | ||
| | `formal/Octad.v` | ||
|
|
@@ -154,12 +159,22 @@ Concretely: | |
| `functional_extensionality_dep` only — Print Assumptions confirms no | ||
| slippage. | ||
|
|
||
| * **squeakwell recovery kernel → `formal/Recovery.v`** (2026-11-09) — the | ||
| repaired recovery invariants of hyperpolymath/squeakwell over `Octad.v`: | ||
| guarded fill as left-biased merge (identity persistence R2, inflationary | ||
| but not monotone R3, conflict-raising counter-model R4), permutation | ||
| invariance of the merge fold under a semilattice `resolve` with the PUT | ||
| kernel shown to be a non-instance (R9), and lexicographic progress with | ||
| nine-round termination (R10). Same `Print Assumptions` whitelist as | ||
| `Octad.v`; every oracle is a Section variable. | ||
|
|
||
| Cross-doc to echo-types established by this file. | ||
|
|
||
| Future work: | ||
|
|
||
| * File the echo-types companion issue for the merge join-semilattice | ||
| abstraction (R1-R3 row above) per the standing directive. | ||
| * The merge join-semilattice abstraction (R1-R3 row above) lands in echo-types | ||
| as `EchoPartialSection.agda` with the squeakwell recovery ladder (2026-11-09); | ||
| `formal/Recovery.v` is its Rocq recheck here. | ||
| * Port `WAL.v` + `Normalizer.v` + `VCL.v` to Agda within echo-types (refactor on top of `EchoResidue`, `EchoSearchExample`, `EchoGradedComonadInterface`). | ||
| * Extend `VCL.v` from the 4-rule core to full VCL: filter expressions, projections, modality quantifiers, multi-proof composition. Each form adds one congruence step rule + one preservation case. | ||
| * Add a CI check: every new `formal/*.v` module must reference an echo-types module name in its docstring (or `no-echo-types-analogue` with reason). | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.