You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
First **post-foundation** Coq module. `formal/Octad.v` mechanises the
**Modality Algebra** of the octad data-model paper
(`docs/papers/arcvix-octad-data-model.tex`, `sec:modality-algebra`) —
the octad-modularity experiment whose only stated proof so far was a
one-line pen-and-paper argument.
The keystone is the paper's **Merge Commutativity** proposition, now
machine-checked, with its associativity/idempotence companions. Together
these cover the **O-series** (octad identity invariants) and the
**R-series** (CRDT-shaped merge) from the issue #77 inventory.
## Theorems (12, in one module)
| Inventory | Theorem(s) | What it says |
|---|---|---|
| O2 | `modality_cardinality`, `modality_exhaustive` | the basis is
exactly the 8 modalities (mirrors `ModalityStatus`) |
| O10 | `complete_iff_no_missing` | `is_complete` ⇔ `missing = []` —
cross-checks the two Rust methods |
| Projection | `project_full`, `project_idempotent`, `project_compose` |
`pi_M` is idempotent; `pi_M ∘ pi_N = pi_{M∧N}` (meet-semilattice) |
| **R1** | **`merge_commutative`** | **the paper's Merge Commutativity
proposition, mechanised** |
| R2 | `merge_associative` | merge associative when `resolve` is |
| R3 | `merge_idempotent` | merge idempotent when `resolve` is |
| inv:persist | `merge_preserves_id`, `enrich_preserves_id`,
`project_preserves_id` | identity is immutable under the algebra |
| Enrichment | `enrich_sets_target`, `enrich_preserves_others`,
`enrich_present` | the write primitive sets its target, leaves the rest
|
## On #77's "honest uncertainty" about R1–R3
Issue #77 flags R1/R2/R3 as *"likely false as currently written"*
because the concrete `AutoMerge` heuristic isn't unconditionally
commutative. The faithful resolution — the paper's — is mechanised here:
octad merge `⊕` **inherits exactly the algebra of its
conflict-resolution kernel `resolve`**. `⊕` is commutative / associative
/ idempotent **iff** `resolve` is, so the laws are stated as
implications. A CRDT-shaped `resolve` (a join on a semilattice)
instantiates all three; `AutoMerge` does not — and the implication makes
that explicit rather than over-claiming.
## Axiom discipline
Closes on `mval`, `ident` (Parameters) and
`functional_extensionality_dep` (Coq stdlib) only — the same whitelist
entry `WAL.v`/`Normalizer.v` use. `Print Assumptions` confirms zero
slippage; `modality_cardinality`/`modality_exhaustive` close under the
global context with **no** axioms.
## Wiring
- `formal/Justfile` — `octad` compile recipe + `check-octad` guard,
added to `all` and `check-assumptions`.
- `.github/workflows/coq-build.yml` — compile + assumptions-whitelist
steps.
- `formal/CROSS-REPO-MAP.adoc` — 5 new mapping rows
(projection→`EchoTruncation`, completeness→`EchoCharacteristic`,
merge→candidate new join-semilattice abstraction,
enrichment→`EchoProvenance`), status refreshed.
## Verification (local, coqc 8.18.0)
Clean rebuild, replicating CI exactly:
```
9 modules compile · 9 assumption guards pass · zero axiom slippage
```
This run also re-verified the **existing 8** modules — the whole
`formal/` corpus is green.
Refs #77.
Draft pending owner review of the spec choices (the
`resolve`-conditional framing of R1–R3, and the echo-types
companion-issue flag for the join-semilattice abstraction).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01W9Voe3JceP66Bna9FT4jME)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments