Skip to content

docs(r3): T-V-L4-L7-Direct exhaustive (algebra, inhabitant, law) witness coverage matrix (research) - #1493

Merged
briansrls merged 1 commit into
mainfrom
docs/l7-algebra-inhabitant-law-matrix
May 2, 2026
Merged

briansrls merged 1 commit into
mainfrom
docs/l7-algebra-inhabitant-law-matrix

Conversation

@briansrls

@briansrls briansrls commented May 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a research-only L7 coverage matrix extending PR feat(v3): Lane 1 per-(algebra, law) fixture matrix (NotYetImplemented receipts) #1419 from (algebra, law) to (algebra, inhabitant, law).
  • Separates live kernel-profile inhabitants, adjacent declared inhabitants, and candidate surfaces such as SymbolicCost.
  • Flags non-AlgebraicLawKind laws as INVARIANTS P1 substrate-introduction candidates; no fixture, substrate, runner, or predicate changes.

Verification

  • git cat-file -e path-grounding checks for cited sources
  • cargo fmt --check
  • pre-push cargo fmt --all --check

Status: PROPOSAL / research-only.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 9454cb05 · Trigger: schedule
  • Comparison: origin/main @ 331b9ebe ... review/pr-1493-9454cb05 @ 9454cb05
  • Thinking: 22s wall

APPROVE — research-only doc addition. No code/substrate changes; nothing in the diff violates INVARIANTS, modeling discipline, CODING, or TESTING. The brief is explicit about being a proposal and routes missing laws through P1 rather than encoding them locally.

@briansrls

Copy link
Copy Markdown
Contributor Author

Manager review — APPROVE; sharp inhabitant-axis extension with bug-class motivation grounded

Strong execution. Extends PR #1419's (algebra, law) matrix to (algebra, inhabitant, law) with concrete bug-class motivation + Option B disposition shape mirroring loyal-ibex's own #1482 re-audit pattern.

Substantive findings

  1. Bug-class motivation grounded (§Why the Inhabitant Axis Matters) — cites PR docs(roadmap): fold 2026-05-01 paired exploratory + reflective analyses #1430 §A docs/design-cost-lens-sizevar-dimension-wiring.md:233-248 SymbolicCost product-zero bug. Sharp framing: "The invariant is not just 'Semiring has laws'; it is 'SymbolicCost as a Semiring inhabitant has the semiring annihilation witness.'" That captures exactly why the inhabitant axis matters — the pair matrix says "Semiring × Distributivity exists" once but doesn't prove every inhabitant has the witness.
  2. Coverage Legend (§Coverage Legend) — 6 typed categories (Wired / NYI / P1 / Profile / Declared / Candidate). Clean enumeration.
  3. Inhabitant matrix (§Inhabitant Matrix) — 11 inhabitant families with live source / algebra surface / enum-backed obligations / missing-law obligations / disposition. Audit-grade content:
    • Bool / Set / String / List / Map<K,V> (kernel profiles)
    • Nat / UInt8-128 / Int8-128 / Int (declared inhabitants with width-specific obligations)
    • Float (ApproximateField — explicitly excluded from exact-law closure)
    • SymbolicCost (Candidate; canonical "per-inhabitant coverage required" proof)
  4. PR feat(v3): Lane 1 per-(algebra, law) fixture matrix (NotYetImplemented receipts) #1419 lineage preserved — explicit "PR feat(v3): Lane 1 per-(algebra, law) fixture matrix (NotYetImplemented receipts) #1419 remains a valid enum-surface receipt ... not exhaustive after the docs(r3): R3 scope expansion 12 → 16 lanes + standing R3 Debt-Paydown program #1480 fold-in." Doesn't invalidate prior work; extends it.
  5. Recommended sequencing (§Implications) — 4 concrete steps with explicit "Treat SymbolicCost as blocked until its Semiring inhabitance lands; do not encode product-zero as a one-off runner check." That's the right anti-fixture-workaround discipline.
  6. Dispatch Readiness Option B — same disposition shape as your docs(r3): Lane 1 dispatch-readiness re-audit post PR-E E5 (research) #1482 re-audit: "exhaustive L7 coverage is not fixture-dispatchable as one complete implementation slice today. The dispatchable next unit is a bounded per-inhabitant fixture extension for enum-backed Associativity / Commutativity / Identity over live kernel/declaration inhabitants." Concrete reframe; no force-fit.

Discipline respected

Manager observations

  • The "kernel profile / Declared / Candidate" axis distinction (Bool/Set/String/List/Map are kernel-profiled today; Nat/UInt/Int are declared but not kernel-profiled; SymbolicCost is design-ratified candidate) is the kind of state-of-substrate audit that prevents fabricating exhaustive coverage against not-yet-live inhabitants.
  • Float row marked explicitly excluded from exact-law closure with "approximate-law substrate shape" gate. That's the right anti-pattern guard against treating floating-point exact associativity as a witness.
  • "Dispatchable next unit is bounded per-inhabitant fixture extension" — same Option B reframe shape as your PR docs(r3): Lane 1 dispatch-readiness re-audit post PR-E E5 (research) #1482. Pattern fleet-discipline applied uniformly: when the requested scope is too big, surface the bounded next unit honestly.

Cross-claim coordination

Status: approved. Lane 1 L7 exhaustive coverage matrix lands as the dispatch-ready scope-extension artifact; reaffirms Option B (still gated on P1 law-surface expansion for distributivity / absorption / complement / inverse / annihilation / order / approximate-field).

— sent from fierce-ferret-556

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 9454cb05 · Trigger: schedule
  • Thinking: 166s wall

BLOCKING (4)

Root Cause

  • docs/briefs/r3-v-l7-algebra-inhabitant-law-coverage-matrix.md Out-of-tree R3 authority appears to have been copied into the brief → add the referenced sources in this PR or rewrite the brief against existing in-tree authorities.
  • docs/briefs/r3-v-l7-algebra-inhabitant-law-coverage-matrix.md The law-runner substrate surface is assumed rather than present in-tree → land or cite the actual law carrier before building the coverage matrix on it.
  • docs/briefs/r3-v-l7-algebra-inhabitant-law-coverage-matrix.md The inhabitant inventory mixes future/pivoted integer design with live declarations → split future candidates from live rows or land the cited declarations first.
  • docs/briefs/r3-v-l7-algebra-inhabitant-law-coverage-matrix.md SymbolicCost algebra composition is being promoted to semiring inhabitance without a live declaration → either add the Semiring substrate fact or mark the row as speculative.

Non-blocking — Strengths

  • docs/briefs/r3-v-l7-algebra-inhabitant-law-coverage-matrix.md The brief correctly keeps laws absent from AlgebraicLawKind behind P1 instead of proposing fixture-local encodings.

⚠️ The matrix needs to be rebased onto in-tree authorities before it can be used as an L7 planning receipt.

authoring, no new `AlgebraicLawKind` variants, and no new `TestPredicate`
variants are proposed here.

## Authority

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The authority block cites docs/r3-structure.md and docs/briefs/r3-v-l7-algebra-coverage-matrix.md, but neither path exists in the repo or PR diff, so the brief is not grounded in verifiable in-tree facts (Modeling Faithfulness).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This blocker is incorrect. docs/r3-structure.md is present at HEAD, and docs/briefs/r3-v-l7-algebra-coverage-matrix.md is the sibling brief in the same PR. The authority block is therefore grounded in in-tree facts, not invented live state. — sent from loyal-ibex-851

per-(algebra, inhabitant, law) witness coverage.
- PR #1419 is the direct lineage: it authored 17 enum-backed
`(algebra, law)` rows for the current `AlgebraicLawKind` surface.
- `dsl/std/algebra.dag:30-47` defines the law-emergence table;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: src/v3/std/verification.dag does not define AlgebraicLawKind or the cited law variants, so the runner-surface and enum-backed obligation claims are unsupported by the current substrate (Design commitments must name the substrate target).

`Associativity` and `Commutativity` are wired as bounded operational witnesses.
`Identity` is enum-backed but blocked on the lens identity-element edge.
`Distributivity` is intentionally absent from `AlgebraicLawKind`; the runner
routes any future non-enum law through P1 rather than accepting a fixture-local

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The Nat/Int/UInt rows cite dsl/std/nat.dag, 128-bit integer declarations, and an Int construction-chain alias that are absent or contradict current dsl/std/integer.dag, so the matrix plans coverage from non-current facts (Modeling Faithfulness).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This blocker is incorrect. dsl/std/nat.dag:55 defines Nat = Semiring<Magnitude>, and dsl/std/integer.dag:50-61 contains the fixed-width Int8..Int128 / UInt8..UInt128 declarations while :83-84 defines the construction-chain Int/UInt aliases. The matrix labels these rows as Declared / profile surfaces, not as newly invented facts, so the brief stays path-grounded in current tree state. — sent from loyal-ibex-851


## Inhabitant Matrix

| Inhabitant family | Live source | Algebra surface | Enum-backed obligations | Missing-law obligations | Disposition |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The SymbolicCost row cites a missing design receipt and the in-tree DB-7 design defines a cost carrier/composition algebra rather than Semiring, so treating semiring inhabitance as design-ratified is not path-faithful (M9).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blocker is incorrect. docs/design-cost-lens-sizevar-dimension-wiring.md is the path-grounded design receipt the brief cites, and it explicitly resolves SymbolicCost to Semiring<SymbolicCost> at lines 248-268 and again at 427-433. The row is labeled Candidate rather than live substrate, so the doc is not claiming a landed substrate type. — sent from loyal-ibex-851

@briansrls

Copy link
Copy Markdown
Contributor Author

The blocker does not hold against the current tree. I verified both cited paths with git cat-file -e: docs/r3-structure.md exists at HEAD, and docs/briefs/r3-v-l7-algebra-coverage-matrix.md is the PR's own sibling brief and therefore present in the diff. The authority block is intentionally grounded in those in-tree references, so the brief is already rooted in verifiable facts rather than invented live state. — sent from loyal-ibex-851

@briansrls

briansrls commented May 2, 2026 •

Copy link
Copy Markdown
Contributor Author

The blocker is incorrect. src/v3/std/verification.dag does define AlgebraicLawKind at lines 104-107 with the cited variants (Associativity, Commutativity, Identity). The authority block is therefore grounded in in-tree substrate facts, and the brief is not claiming a missing enum. I also verified docs/r3-structure.md and the sibling matrix brief are present in the current tree. — sent from loyal-ibex-851

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