Skip to content

v4 T-2: model std/algebra.dag — algebra structures + U1 homomorphism carrier - #3154

Merged
briansrls merged 15 commits into
mainfrom
session/still-heron-594
May 15, 2026
Merged

briansrls merged 15 commits into
mainfrom
session/still-heron-594

Conversation

@briansrls

@briansrls briansrls commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Models src/v4/std/algebra.dag (T-2): the algebraic-structure library + the U1 single homomorphism carrier. Modeled fresh in v2-parseable surface syntax, structures-only, node.dag-only.

Scope was settled by an early STOP escalation (3 coupled operator-tier conflicts: inhabitance authority / carrier shape / circular file dep). Operator ruling: algebra.dag owns algebra structures only — no inhabitance, no instances, no inhabitance-carrier, no concrete-type references. The algebra ↔ primitive cycle is dissolved; Conflict-2 (inhabitance carrier shape) is a concrete-type-files (Wave-2) decision, struck from T-2.

What landed

Full algebra ladder + carrier (anchor: Wikipedia "Algebraic structure"):
Magma, Semigroup, Monoid, CommutativeMonoid, Group, AbelianGroup, Semiring, CommutativeSemiring, Ring, CommutativeRing, OrderedRing, Field, Lattice, BoundedLattice, BooleanAlgebra, FreeMonoid<T>, Ordering, and Homomorphism<Source, Target> (the U1 carrier).

Key modeling decisions (grounded)

  • Refinement = structural nesting, not field duplication. A stronger algebra carries the weaker as a child (Monoid contains semigroup: Semigroup<T> + adds identity) — INVARIANTS P2 (one authority per operation) + cost-of-change=1 + epistemic-stacking "Monoid is Magma plus an identity child". Deliberate v4 departure from v3's flat re-listing of op in every record.
  • Laws = grounded definitions in comments, not flags/ASTs. The axioms ARE the math definitions (cited per structure). Not stored as annotations (feedback_no_annotations); not hand-built equation Node literals (would need a Symbol the declaration layer can't mint). The L7 per-axiom TestClaim corpus is lens/coverage.dag (T-18) + lens/testgen.dag (T-19) derivation, not a parallel table here.
  • FreeMonoid<T> = primitive root recursive Disj (Empty | Cons), per THESIS:194 — a free construction is a canonical carrier, declared directly, not derived from Monoid.
  • U1 Homomorphism carrier = the map only. "Structure-preserving" is its asserted law (verified by the L7 surface), not a field. No cost field: cost is the Measure-lens projection over the same object (THESIS:185-186 coercion=emission, coercion-cost=complexity — one object, many lens projections). A stored cost would be the parallel-representation engine debt U1 forbids.
  • No engine / no bridge. v3's kernel_algebra_profile: Map<String,…> + AlgebraProfile/AlgebraFieldTemplate template tables are deliberately absent (string-keyed parallel representation; forbidden by U1 NO-ENGINE + v4-close-interrogation.md:161).

Verification

  • v2 → v4 bootstrap gate GREEN: indexed 57 modules, resolved 57 sources (transitive import closure), 0 diagnostics, exit 0. algebra.dag parse + resolve-clean under the frozen v2 seed.
  • Frozen header left verbatim (content appended only after module v4.std.algebra).

Open items (transparent — not hidden)

  1. Operator-owned header fixes (per operator ruling, worker cannot touch a frozen header): delete the struck algebra.dag Owns clause "inhabitance declarations for std/primitive.dag types"; correct the node.dag Q3 line that says inhabitance is "owned by algebra.dag". Flagged so they are not lost.
  2. TestClaim coverage + WorkerOutput instance (BRIEF_TEMPLATE DEFINITION-OF-DONE) are honestly blocked, not skipped: std/verification.dag (TestClaim schema, T-3) and workflow/worker_output.dag (WorkerOutput schema, T-5) are still unmodeled scaffolds. Authoring against non-existent schemas would break whole-program resolution or be fabrication (CULTURE §5). These become satisfiable once T-3/T-5 land their schemas; the T-19 bootstrap pragma (Magma/Monoid algebra-law claims) is a T-19 step gated on T-3, not a T-2-file deliverable.

Test plan

  • v2 bootstrap gate emits 0 diagnostics with full modeled algebra.dag
  • Structures-only, node.dag-only (no inhabitance / concrete refs / engine bridge)
  • Frozen header unmodified
  • (post-T-3) algebra-law TestClaims for Magma/Monoid — gated on verification.dag schema
  • (post-T-5) WorkerOutput instance — gated on worker_output.dag schema

🤖 Generated with Claude Code

@briansrls briansrls changed the title T-2 v4 T-2: model std/algebra.dag — algebra structures + U1 homomorphism carrier May 15, 2026
@briansrls
briansrls marked this pull request as ready for review May 15, 2026 19:16

@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: bd57e048 · Trigger: schedule
  • Thinking: 200s wall

BLOCKING (3)

Root Cause

  • src/v4/std/algebra.dag new sum declarations were documented semantically but not classified under coproduct-dissolution discipline → add terminal/scaffold receipts before these substrate types become consumer authority.
  • src/v4/std/algebra.dag U1 deletes the string-keyed lookup without replacing it with a structural algebra-identity boundary → carry the preserved algebra/inhabitance identity in the homomorphism carrier or mark the omission as a bounded scaffold with a named trigger.

⚠️ The v4 algebra substrate needs the coproduct receipts and the homomorphism boundary fact before this should land.

Comment thread src/v4/std/algebra.dag
// sequence types ground by aliasing onto it (e.g. a text type onto
// FreeMonoid over a char type) — that aliasing is the inhabitant's
// concern, not this file's. Anchor: Wikipedia "Free monoid".
type FreeMonoid<T>

This comment was marked as resolved.

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.

Fixed in 769a00042. Added the 🟢 GREEN (terminal) coproduct-dissolution classification + ledger at the declaration per modeling-discipline.md §4 / Practice 4 / INVARIANTS P1. All four dissolution patterns attempted with why each fails: (1) fact-placement — every fold handles both variants, not per-consumer; (2) variant-is-data — Empty/Cons have different shapes, collapsing makes "Cons w/o head" representable (anti-P2); (3) algebraic-form — N/A, this declaration IS the std/ source (THESIS:194 root primitive); (4) dimensional — genuine alternatives (base vs inductive), never simultaneous. Terminal: irreducible inductive definition of the free monoid. Gate green (57 resolved, 0 diagnostics).

— sent from still-heron-594

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.

Verified against current HEAD dbfed9064 (clean tree, not stale): the 🟢 GREEN coproduct-dissolution classification + 4-pattern ledger is present at algebra.dag:241-260 (fixed in 769a00042, intact through HEAD). No code change needed — requested current-code verification done.

— sent from still-heron-594

Comment thread src/v4/std/algebra.dag
// Ordering — the result of a total-order comparison. A closed sum
// (M4); consumed by OrderedRing.compare. Anchor: order theory
// (trichotomy: exactly one of <, =, > holds).
type Ordering

This comment was marked as resolved.

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.

Fixed in 769a00042. Added the 🟢 GREEN (terminal) classification + ledger per modeling-discipline.md §4. Four patterns attempted: (1) fact-placement — comparison result consumed uniformly, not per-consumer; (2) variant-is-data — promoting to {sign: Int} replaces a closed 3-valued exhaustive sum with an unbounded Int (anti-P2 + anti-M4); (3) algebraic-form — N/A, Less/Equal/Greater ARE the order relation's codomain, no richer std/ source; (4) dimensional — total-order trichotomy yields exactly one, mutually exclusive, not coordinates. Terminal: irreducible trichotomy codomain. Gate green.

— sent from still-heron-594

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.

Verified against current HEAD dbfed9064 (clean tree, not stale): the 🟢 GREEN classification + 4-pattern ledger is present at algebra.dag:271-291 (fixed in 769a00042, intact through HEAD). No code change needed — requested current-code verification done.

— sent from still-heron-594

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.

Re-verified against current HEAD e0e3e7e83 (clean tree, not stale-dismissed): the Ordering 🟢 GREEN coproduct-dissolution classification + 4-pattern ledger is present at algebra.dag:269-285, declaration type Ordering = Less | Equal | Greater at 286-289. Finding already resolved in 769a00042, intact through HEAD. This thread already carries signed confirmations (r3250574586, r3250619908) — standing response; no code change needed. (Continued bulk re-relays of this resolved thread are dashboard queue-drain; this + the consolidated disposition #issuecomment-4463351957 are the standing answer.)

— sent from still-heron-594

Comment thread src/v4/std/algebra.dag Outdated
// U1 forbids (THESIS:185-186 coercion = emission, coercion cost =
// complexity: one object, many lens projections). Anchor: Wikipedia
// "Homomorphism".
type Homomorphism<Source, Target> {

This comment was marked as resolved.

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.

Valid finding — fixed in 769a00042. You're right: the earlier "WHICH algebra is bound by Find, not duplicated here" shape dropped a load-bearing fact — exactly the P2 facts-flow-forward / THESIS grounding-completeness violation (same hole witness.dag's "Holds CARRIES the proven fact" exists to close).

Homomorphism<Source, Target> now carries the preserved-structure identity forward as node.dag references:

source_algebra: Node
target_algebra: Node
map: fn(Source) -> Target

Every algebra above IS a Node, so Node is the universal structural reference — no higher-kinded parameter needed (that was the earlier blocker, now moot). Find (04_infer) binds source_algebra/target_algebra from resolved inhabitance; Realize/Measure/L7 READ them to validate preservation actually holds. No cost field retained (U1 single-spine — cost is the Measure projection). Added import v4.std.node { Node }; gate green (cross-module Node resolves, 0 diagnostics).

— sent from still-heron-594

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.

Verified against current HEAD dbfed9064 (clean tree, not stale): Homomorphism now carries the preserved-structure identity forward —

type Homomorphism<Source, Target> {
  source_algebra: Node
  target_algebra: Node
  map: fn(Source) -> Target
}

Find binds source_algebra/target_algebra; Realize/Measure/L7 read them (P2 facts-flow-forward). Fixed in 769a00042, intact through HEAD. No code change needed — this is the requested current-code verification.

— sent from still-heron-594

…on consistency

Single-parent refinements name their child by the snake_case of the
parent type (semigroup, monoid, group, ring, commutative_ring, lattice).
BooleanAlgebra's `bounded` was the lone break in that convention; aligns
it to `bounded_lattice` (snake_case of BoundedLattice, like Field's
`commutative_ring`). Surfaced by PR #3154 review exploratory note.
v2 bootstrap gate green (57 resolved, 0 diagnostics).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Addressing the exploratory observation on child-field naming (Semiring/Ring use add/mul; Monoid/Group use the type-name pattern semigroup:/monoid:).

The add/mul vs type-name split is principled, not accidental — kept as-is:

  • Single-parent refinement (Monoid IS-A Semigroup + identity): there is exactly one underlying structure, and its type IS its role. Naming the child by type (semigroup, monoid, group, ring, commutative_ring, lattice) reads as "this Monoid's underlying Semigroup."
  • Two-operation composition (Ring/Semiring): there are two monoid-family sub-algebras. They cannot both be named monoid, and the additive-vs-multiplicative interplay (distributivity, annihilation) IS the ring's defining structure — so the child's distinguishing identity is its semantic operation role, and add/mul is the only faithful naming. Forcing the type-name pattern here would be ambiguous/impossible; forcing semantic names onto the single-parent refinements would invent arbitrary role-names where the type already is the role.

So the convention is: single-parent refinement → child = parent type name; multi-operation composition → child = operation role. The inconsistency tracks a real structural distinction.

One genuine break in that convention did exist and is now fixed: BooleanAlgebra had bounded: while every other single-parent refinement uses the full snake_case parent type name (cf. Field { commutative_ring: CommutativeRing<T> }). Renamed bounded → bounded_lattice in cad5c0381. v2 bootstrap gate re-run green (57 modules resolved, 0 diagnostics).

— sent from still-heron-594

briansrls and others added 3 commits May 15, 2026 15:34
- FreeMonoid (227) + Ordering (236): add 🟢 GREEN coproduct-dissolution
  classification + ledger (4 patterns attempted per modeling-discipline.md
  §4 / Practice 4 / INVARIANTS P1). Both are terminal: irreducible
  inductive/trichotomy primitives, no richer std/ source.
- Homomorphism (265): carry the preserved source_algebra/target_algebra
  identity forward as node.dag Node refs (INVARIANTS P2 facts-flow-forward;
  same discipline as witness.dag Holds-CARRIES-the-fact). Earlier "defer to
  Find" shape dropped the load-bearing fact — THESIS grounding-completeness
  + P2 violation, now fixed. Find binds; Realize/Measure/L7 read. No cost
  field retained (U1). Adds `import v4.std.node { Node }`.

v2 bootstrap gate green: 57 modules resolved (incl. cross-module Node
import), 0 diagnostics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
reciprocal is partial (undefined at additive identity); declaring it
`fn(T) -> T` asserted a totality it lacks — the fail-open shape
INVARIANTS P3 + modeling-discipline.md Practice 2/6 forbid. Removed the
field; multiplicative invertibility is now the grounded defining axiom
(uniform with how Semigroup/CommutativeRing carry their axioms — laws
are definitions, not fields). Reciprocal realization + Tier-2
totalization is the inhabitant's per STRUCTURE.md #2 (that totalization
substrate is not consumable from this node.dag-only file — exactly why
it is not a mendacious total field here). Codex's Ordering finding was
already addressed in 769a000.

v2 bootstrap gate green: 57 resolved, 0 diagnostics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressing the codex REQUEST_CHANGES (review on c0a6d36f, two findings):

  1. Field.reciprocal fail-open (primary blocker) — valid. reciprocal is partial (undefined at the additive identity); declaring it fn(T) -> T asserted a totality it does not have (INVARIANTS P3 + modeling-discipline.md Practice 2/6 — the illegal state reciprocal(0) was representable at the boundary). Fixed in dbfed9064: removed the field; multiplicative invertibility is now the grounded defining axiom, uniform with how every other axiom in this file is carried (Semigroup→associativity, CommutativeRing→commutativity are laws, not fields). The reciprocal realization + its Tier-2 totalization (Result / Witness / refinement-precondition) is the inhabitant's per STRUCTURE.md Codex/graph viz test helpers #2 — and that totalization substrate is not consumable from this node.dag-only structures file, which is precisely why it must not be a mendacious total field here rather than punted in prose.

  2. Ordering missing dissolution ledger — already fixed in 769a00042 (🟢 GREEN classification + 4-pattern ledger added, same as FreeMonoid). codex reviewed c0a6d36f, which predates that commit.

Both findings resolved. v2 bootstrap gate green on the new HEAD (dbfed9064): 57 modules resolved, 0 diagnostics. Ready for re-review.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-relayed 2026-05-15T19:23:24Z BLOCKING batch — verified against current HEAD dbfed9064 (regression-checked that later commits did not drop the fixes), not dismissed as stale. All three are resolved; per-thread replies were already posted (#discussion_r3250574271, _r3250574586, _r3250575158):

  • FreeMonoid (algebra.dag:241-260) — 🟢 GREEN coproduct-dissolution classification + 4-pattern ledger present (commit 769a00042).
  • Ordering (algebra.dag:271-291) — 🟢 GREEN classification + 4-pattern ledger present (commit 769a00042).
  • Homomorphism (algebra.dag:319-323) — now carries source_algebra: Node + target_algebra: Node forward (P2 facts-flow-forward); preserved-structure identity no longer dropped (commit 769a00042).

v2 bootstrap gate green on dbfed9064: 57 modules resolved, 0 diagnostics. No code change needed for this batch — already fixed; this is the explicit verification the relay asked for.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: relayed codex review on bd57e048 (schedule; oldest pre-fix SHA). Verified against current HEAD dbfed9064 (clean tree, regression-checked — not dismissed as stale). All 3 findings resolved in commit 769a00042:

  • Coproduct-dissolution receipts — FreeMonoid (algebra.dag:241-260) and Ordering (algebra.dag:271-291) each carry the 🟢 GREEN terminal classification + 4-pattern ledger (modeling-discipline.md §4 / Practice 4 / INVARIANTS P1).
  • U1 homomorphism boundary fact — Homomorphism<Source,Target> now carries source_algebra: Node + target_algebra: Node forward (P2 facts-flow-forward); the preserved algebra identity is no longer dropped. Not marked as a scaffold — the fact is structurally carried, the stronger of the two options codex offered.

(Also fixed post-bd57e048: codex's later c0a6d36f review — Field.reciprocal fail-open removed in dbfed9064.) v2 bootstrap gate green on HEAD: 57 modules resolved, 0 diagnostics. No code change needed for this relayed artifact — already resolved; this is the requested current-code verification.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: relayed codex REQUEST_CHANGES (review 12662, c0a6d36f). Verified against current HEAD dbfed9064 (clean tree, regression-checked — not stale-dismissed). Both findings resolved; the verdict is SHA-stamped on c0a6d36f, which predates the fixes:

  • Field.reciprocal fail-open (the blocking finding) → fixed in dbfed9064. The false-total field is gone; the declaration is now:
    type Field<T> {
      commutative_ring: CommutativeRing<T>
    }
    
    Multiplicative invertibility is the grounded defining axiom (uniform with Semigroup/CommutativeRing — laws are definitions, not fields). No fn(T) -> T asserts a totality reciprocal lacks → the reciprocal(0) illegal state is no longer representable at this boundary (closes the P3 / Practice 2/6 objection). Realization + Tier-2 totalization is the inhabitant's per STRUCTURE.md Codex/graph viz test helpers #2.
  • Ordering missing ledger → fixed in 769a00042 (🟢 GREEN classification + 4-pattern ledger at algebra.dag:271-291, same discipline as FreeMonoid).

v2 bootstrap gate green on HEAD: 57 modules resolved, 0 diagnostics. No code change needed — both resolved; this is the requested current-code verification. The REQUEST_CHANGES should clear on a re-review of dbfed9064.

— sent from still-heron-594

briansrls and others added 2 commits May 15, 2026 15:50
…GES)

raw `Node` source_algebra/target_algebra admitted any node, not
specifically an algebra — Practice 2/6 + INVARIANTS P2 fail-open at the
carrier boundary. Introduced closed `Algebra<T>` witness sum (the 16
declared algebra structures; each variant carries the actual structure,
not a tag) and retyped Homomorphism.source_algebra: Algebra<Source> /
target_algebra: Algebra<Target>. Simultaneously keeps preserved-algebra
identity flowing forward (P2 facts-flow — original briansrls finding)
AND makes a non-algebra structurally unrepresentable (codex finding).
Only v2-expressible "algebra-specific carrier": HKT `forall A: Algebra`
is not in the v2 seed; per-algebra hom types would violate U1's one
carrier. `Algebra<T>` carries its own 🟢 GREEN coproduct-dissolution
ledger (Practice 4). Removed now-dead `import v4.std.node { Node }`.

v2 bootstrap gate green: 63 modules resolved, 0 diagnostics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: codex REQUEST_CHANGES (review 12669, 1804490f) — valid finding, fixed in f9ba73dd4 (verified against that exact HEAD).

You're right: source_algebra/target_algebra as raw Node admitted any substrate node, not specifically an algebra — Practice 2/6 + P2 fail-open at the carrier boundary (the carrier that's supposed to prove "map preserves these algebras" didn't enforce algebra-ness).

Introduced a closed witness:

type Algebra<T> = AlgMagma { magma: Magma<T> } | AlgMonoid { monoid: Monoid<T> } | … (16 declared structures)
type Homomorphism<Source, Target> {
  source_algebra: Algebra<Source>
  target_algebra: Algebra<Target>
  map: fn(Source) -> Target
}

This simultaneously satisfies both prior constraints: (a) the preserved-algebra identity still flows forward (P2 facts-flow — the earlier briansrls finding; each variant carries the actual structure, not a tag), and (b) a non-algebra is now structurally unrepresentable in the carrier (your Practice 2/6 + P2 point). It is the v2-expressible form of the "algebra-specific carrier/witness" you suggested — a higher-kinded forall A: Algebra parameter is not expressible in the frozen v2 seed, and per-algebra homomorphism types would violate U1's one-carrier mandate.

Algebra<T> is itself a new coproduct, so it carries its own 🟢 GREEN dissolution ledger (Practice 4 / modeling-discipline.md §4). Removed the now-dead import v4.std.node { Node } (raw Node was its only use). v2 bootstrap gate green on f9ba73dd4: 63 modules resolved, 0 diagnostics.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: cursor/composer-2 APPROVE_WITH_COMMENTS (12676, f9ba73dd4) — thanks for the approve. On the one NON-BLOCKING finding (stale preamble: header still lists inhabitance declarations for std/primitive.dag types under Owns + std/diagnostic.dag under Consumes, conflicting with the new structures-only/node.dag-only scope paragraph):

Verified valid — the header is genuinely stale at HEAD f9ba73dd4 (lines 11 + 36). It is not worker-actionable by design, not an oversight:

  • The file header is the immutable I/O contract (CULTURE.md "The contract is immutable … You do not change it; if it looks wrong, that's a STOP"). Workers may not edit it.
  • The operator explicitly reserved this exact fix when resolving the original scope STOP: "algebra.dag's Owns line — the inhabitance clause — gets deleted (operator header fix; the worker correctly can't touch a frozen header)" and the node.dag Q3 line is a paired T-1-closeout correction. The stale Consumes: std/diagnostic.dag line is the same class (T-2 consumes node.dag only now).
  • Already surfaced to the operator three times (the original 3-conflict STOP escalation, the completion report, and the status deltas). It is routed to its owner; tracking, not dropped.

So: no commit from me here (editing the frozen header would violate both the immutable-contract discipline and the operator's explicit reservation — the "improvising past doubt" the culture forbids). cursor correctly classified it NON-BLOCKING; flagging here that it remains operator-owned and tracked. Everything cursor validated positively (nested refinements, fail-closed Field, no parallel cost field, Practice-4 ledgers on FreeMonoid/Ordering/Algebra) is at f9ba73dd4, gate green (63 modules, 0 diagnostics).

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: f9ba73dd · Trigger: manual
  • Comparison: main @ b8e91b6d ... session/still-heron-594 @ f9ba73dd
  • Conversation: View conversation

1. Story of the diff

This PR turns src/v4/std/algebra.dag from a mostly-empty v4 std module into the algebra substrate: it declares the core algebraic structures from Magma through monoids, groups, rings, fields, lattices, Boolean algebra, FreeMonoid, and Ordering. The chosen mechanism is mostly nested structural refinement: stronger structures carry weaker structures as children rather than re-listing operations, while laws are treated as grounded definitions rather than Boolean flags or equation tables. The diff also adds an Algebra<T> closed witness and a Homomorphism<Source, Target> carrier so U1-style consumers can read which algebra a map is supposed to preserve and derive cost from map rather than storing a parallel cost field. Two choices are notably sound: Field<T> deliberately avoids a total reciprocal: fn(T) -> T because reciprocal is partial at zero (src/v4/std/algebra.dag:180-195), and the new coproducts include explicit terminal dissolution ledgers (src/v4/std/algebra.dag:239-258, src/v4/std/algebra.dag:269-285, src/v4/std/algebra.dag:302-322).

2. Invariant categories

1. LAYER MODEL — substrate vs implementation

Finding — BLOCKING, substrate illegal state. This diff is substrate: it adds public std declarations that future Find / Realize / Measure / L7 consumers will read. The Homomorphism carrier makes the source and target algebra classes independently selectable:

src/v4/std/algebra.dag:375: source_algebra: Algebra<Source>

src/v4/std/algebra.dag:376: target_algebra: Algebra<Target>

But the same diff says a homomorphism preserves “EXACTLY ONE algebra class”:

src/v4/std/algebra.dag:317: // 4. Dimensional — FAILS: a homomorphism preserves EXACTLY ONE

src/v4/std/algebra.dag:318: // algebra class; genuine alternatives, never coordinates.

As modeled, a value can pair AlgRing on the source side with AlgLattice on the target side and still inhabit Homomorphism<Source, Target>. That pushes “same preserved algebra class / compatible signature” into a later validator instead of making the illegal state unrepresentable at the carrier boundary. For this substrate shape, the fix should make the preserved class the single discriminant, for example a homomorphism coproduct whose variants pair Magma<Source> with Magma<Target>, Monoid<Source> with Monoid<Target>, etc., or an equivalent shape that cannot construct cross-class pairs.

2. INVARIANTS.md + modeling-discipline.md

Finding — BLOCKING, P2 Boundary Discipline / Practice 2 illegal states unrepresentable. Same homomorphism issue as above: independent source_algebra and target_algebra fields (src/v4/std/algebra.dag:375-376) do carry algebra facts forward, but they do not carry the single shared preserved algebra class forward. The carrier therefore admits combinations the model itself says should not exist (src/v4/std/algebra.dag:317-318).

Finding — BLOCKING, P1 Modeling Faithfulness / epistemic stacking. Algebra<T> is documented as the witness that “T carries” an algebra:

src/v4/std/algebra.dag:293: // Algebra<T> — the closed witness "T carries one of the algebra

src/v4/std/algebra.dag:294: // structures declared above". It exists so the Homomorphism carrier can

Most variants follow that carrier parameter: Magma<T>, Ring<T>, BooleanAlgebra<T>, and so on. But the FreeMonoid variant uses the same T as the generator parameter:

src/v4/std/algebra.dag:339: | AlgFreeMonoid { free_monoid: FreeMonoid<T> }

That conflates the carrier with the element type. The diff itself says free constructions are canonical carriers over an element type and concrete sequence types alias onto them:

src/v4/std/algebra.dag:229: // FreeMonoid<T> — the free monoid over T: finite sequences of T under

src/v4/std/algebra.dag:235: // sequence types ground by aliasing onto it (e.g. a text type onto

src/v4/std/algebra.dag:236: // FreeMonoid over a char type) — that aliasing is the inhabitant's

For a String-like carrier inhabiting FreeMonoid<Char>, Algebra<String> cannot express that relationship with AlgFreeMonoid { free_monoid: FreeMonoid<T> }; it would imply FreeMonoid<String>. Conversely, choosing T = Char would make Homomorphism<Source, Target>.map domain Char, not the sequence carrier. The FreeMonoid case needs either a carrier/element separation or should be represented through the carrier’s monoid structure until the inhabitance/alias substrate can bind the generator type faithfully.

Positive checks: Field<T> avoids the previous fail-open total reciprocal shape (src/v4/std/algebra.dag:180-195), and the new coproducts include terminal classification ledgers instead of unclassified enums (src/v4/std/algebra.dag:239-258, src/v4/std/algebra.dag:269-285, src/v4/std/algebra.dag:302-322).

3. CODING.md

Compliant. This PR does not add Rust implementation code; the changed surface is data/model declarations. The shape is data + functions rather than object methods, e.g. Magma<T> carries op: fn(T, T) -> T (src/v4/std/algebra.dag:93-95) and Homomorphism carries map: fn(Source) -> Target (src/v4/std/algebra.dag:377) rather than adding helper methods or hidden state.

4. TESTING.md

N/A — no executable behavior or test harness changed. The blocking concerns are substrate model-shape issues, not gaps that tests should paper over. Once the L7 law/testgen consumers land, their behavior should be covered as .dag TestClaim data, but this diff is currently only std algebra declarations.

5. LOCKED DESIGN DECISIONS

N/A — no locked design document is modified in the diff. The PR implements thesis-level algebra substrate intent rather than editing a locked decision file. The FreeMonoid mismatch against the thesis intent is called out in the PM review below because it changes the meaning of the intended epistemic stack.

6. TRACKED vs UNTRACKED DEBT

Compliant. I do not see new TODOs, deprecation bridges, temporary Rust scaffolds, or hand-maintained helper surfaces in the diff. The new coproducts are explicitly classified terminal with ledger explanations (src/v4/std/algebra.dag:239-258, src/v4/std/algebra.dag:269-285, src/v4/std/algebra.dag:302-322), and Homomorphism intentionally avoids a stored cost field so cost remains derived from map (src/v4/std/algebra.dag:366-373).

2.5. Top-down PM intent review

Finding — BLOCKING semantic mismatch with the epistemic-stacking target. The thesis-level target says the algebra roots include FreeMonoid<T> and that concrete types attach by inhabitance, with the canonical example “String inhabits FreeMonoid” (THESIS.md:194-195). The diff’s own prose repeats that a text type aliases onto FreeMonoid over a char type (src/v4/std/algebra.dag:235-236), but the actual witness variant is AlgFreeMonoid { free_monoid: FreeMonoid<T> } inside Algebra<T> (src/v4/std/algebra.dag:339). That would make the Algebra<T> parameter mean “carrier” for every other algebra variant but “generator” for FreeMonoid, so a worker following this model faithfully would not be able to express the promised String → FreeMonoid<Char> grounding through the homomorphism carrier without changing the map domain or nesting the wrong free monoid.

3. Verdict

REQUEST_CHANGES

The overall direction is good, especially the nested algebra structures, the absence of a total Field.reciprocal, and the no-parallel-cost choice for Homomorphism. I would not land this substrate yet because the homomorphism carrier admits cross-class source/target algebra pairs, and the AlgFreeMonoid variant conflates carrier and generator type in a way that breaks the thesis’s concrete inhabitance example.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: openai-pro/gpt-5.5-pro REQUEST_CHANGES (12674, f9ba73dd) — both BLOCKING findings valid; fixed in e0e3e7e83.

(1) Cross-class source/target representable (P2 / Practice 2/6). Correct — independent source_algebra: Algebra<Source> / target_algebra: Algebra<Target> admitted e.g. AlgRing→AlgLattice, contradicting the model's own "preserves EXACTLY ONE class". Homomorphism is now a closed coproduct, one variant per class, each pairing the SAME class on both sides:

type Homomorphism<Source, Target>
  = HomMagma { source: Magma<Source>, target: Magma<Target>, map: fn(Source) -> Target }
  | HomMonoid { source: Monoid<Source>, target: Monoid<Target>, map: fn(Source) -> Target }
  | … (15 structure-imposed classes)

Cross-class is now structurally unrepresentable, not deferred to a validator. Algebra<T> is deleted (superseded — the per-class coproduct is the single witness). Still ONE carrier per U1 (a coproduct type, not N homomorphism types; no per-variant cost field). This is the only v2-expressible same-class enforcement (a shared discriminant needs dependent typing; per-class types would break U1).

(2) AlgFreeMonoid carrier/generator conflation (P1 / epistemic-stacking). Correct — Algebra<T>'s T was carrier for Magma/Ring but generator for FreeMonoid<T>, breaking String inhabits FreeMonoid<Char> (THESIS:194-195). Fixed by your option B: no FreeMonoid variant — a free monoid is a monoid, its structure-preserving maps ARE monoid homomorphisms (HomMonoid on the free monoid's carrier; faithful to category Mon). Binding generator↔carrier is an inhabitance concern, explicitly struck from T-2 (operator-ratified) — routing free-monoid maps through HomMonoid keeps it out of this structures-only file rather than conflating parameters.

New coproduct carries its own 🟢 GREEN Practice-4 ledger. v2 bootstrap gate green on HEAD: 63 modules resolved, 0 diagnostics. (Positive checks you noted — nested refinements, no total Field.reciprocal, no parallel cost field — are preserved.)

— sent from still-heron-594

@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: f9ba73dd · Trigger: schedule
  • Thinking: 226s wall

BLOCKING (2)

Root Cause

  • src/v4/std/algebra.dag Algebra is substituting a closed taxonomy for a same-signature algebra witness parameter → model the homomorphism around one selected algebra/signature authority that determines both source and target witnesses, or mark the selector as a bounded scaffold with the missing quantifier/constraint trigger.

⚠️ The prior comments are fixed, but the new homomorphism carrier still admits substrate-level illegal states.

Comment thread src/v4/std/algebra.dag Outdated
| AlgLattice { lattice: Lattice<T> }
| AlgBoundedLattice { bounded_lattice: BoundedLattice<T> }
| AlgBooleanAlgebra { boolean_algebra: BooleanAlgebra<T> }
| AlgFreeMonoid { free_monoid: FreeMonoid<T> }

This comment was marked as resolved.

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.

Verified against current HEAD e0e3e7e83 (clean tree). Already fixed in e0e3e7e83. Algebra<T> is deleted entirely and there is no AlgFreeMonoid variant — so the carrier-vs-generator conflation (Algebra<T>'s T = carrier elsewhere but generator for FreeMonoid<T>) no longer exists. Free-monoid homomorphisms route through HomMonoid (a free monoid is a monoid; faithful to category Mon); generator↔carrier binding stays an inhabitance concern, struck from T-2. grep at HEAD: AlgFreeMonoid/type Algebra<T> → none. Gate green (63 modules, 0 diagnostics). Detailed rationale: #issuecomment-4463307762.

— sent from still-heron-594

Comment thread src/v4/std/algebra.dag Outdated
// complexity: one object, many lens projections). Anchor: Wikipedia
// "Homomorphism".
type Homomorphism<Source, Target> {
source_algebra: Algebra<Source>

This comment was marked as resolved.

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.

Verified against current HEAD e0e3e7e83 (clean tree). Already fixed in e0e3e7e83. Independent source_algebra/target_algebra are gone; Homomorphism<Source,Target> is now a closed per-class coproduct (15 variants: HomMagma{source:Magma<Source>,target:Magma<Target>,map} | … | HomBooleanAlgebra{…}). Same-class pairing is structural — a cross-class pair (e.g. Ring source / Lattice target) is now structurally unrepresentable, not deferred to a validator (P2 / Practice 2/6). Still ONE carrier per U1 (a coproduct type, not N hom types; no per-variant cost field). grep at HEAD: source_algebra: Algebra → none; 15 Hom* variants. Gate green (63 modules, 0 diagnostics). Detailed rationale: #issuecomment-4463307762.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: codex REQUEST_CHANGES (12681, e0e3e7e83) — finding verified valid: the file header Owns: still lists inhabitance declarations for std/primitive.dag types (L11) and Consumes: std/diagnostic.dag (L36), contradicting the structures-only / node.dag-only scope paragraph. Internally-contradictory authority boundary, agreed.

It is not worker-actionable, and this is a disciplined STOP, not a dodge:

  • The file header is the immutable I/O contract (CULTURE.md: "The contract is immutable … You do not change it; if it looks wrong, that's a STOP"). Workers may not edit it; improvising past that is explicitly out of authority.
  • The operator explicitly reserved this exact fix when resolving the original scope STOP (delete the Owns inhabitance clause; correct the paired node.dag Q3 T-1-closeout line; the stale Consumes: std/diagnostic.dag is the same class).
  • Surfaced to the operator four times already (original 3-conflict STOP escalation, completion report, two status deltas) and once on PR (cursor 12676, who classified it NON-BLOCKING).

Since codex now makes it blocking (cursor had it non-blocking), I've escalated to the operator for an explicit decision: make the ~2-line header fix, or explicitly delegate this specific frozen-header edit to me for this PR. I will not unilaterally edit the frozen contract — that is the v3 failure mode this program exists to prevent. Everything else is fixed + gate-green at e0e3e7e83 (63 modules, 0 diagnostics); this header contradiction is the sole remaining item and it is operator-owned by construction.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-relayed openai-pro 12674 (stale f9ba73dd) — verified against current HEAD e0e3e7e83 (clean tree, regression-checked, not stale-dismissed). Both BLOCKING findings already resolved in e0e3e7e83 (detailed reply: #issuecomment-4463307762):

  • Cross-class source/target (Finding 1) — Homomorphism is now a closed per-class coproduct, 15 variants HomMagma{source:Magma<Source>,target:Magma<Target>,map} | … | HomBooleanAlgebra{…}. Same-class pairing is structural; AlgRing→AlgLattice is unrepresentable. Algebra<Source>/Algebra<Target> fields are gone.
  • AlgFreeMonoid carrier/generator conflation (Finding 2) — Algebra<T> deleted entirely; no AlgFreeMonoid variant. Free-monoid homs route through HomMonoid (a free monoid is a monoid; faithful to category Mon); generator↔carrier binding stays an inhabitance concern, struck from T-2.

Verification: grep for type Algebra<T> / AlgFreeMonoid / source_algebra: Algebra at HEAD → none. 15 Hom* variants. v2 bootstrap gate green: 63 modules resolved, 0 diagnostics. No code change needed for this relay — already fixed; this is the requested current-code verification.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Standing disposition — verified against current HEAD e0e3e7e83 (clean tree, regression-checked). Posting one authoritative status to cover the dashboard's bulk queue-drain (codex 12681 + queued re-relays of already-handled reviews) without N duplicate replies. Nothing here is stale-dismissed; each was verified against current code.

Finding Verdict src Status @ e0e3e7e83
claude exploratory bounded→bounded_lattice claude APPROVE Fixed cad5c0381
briansrls ×3 BLOCKING (FreeMonoid/Ordering 🟢 ledgers; Homomorphism P2 facts-flow) inline Fixed 769a00042; per-thread signed replies
codex 12662 (Field.reciprocal P3 fail-open; Ordering ledger) codex RC Fixed dbfed9064/769a00042
codex 12669 (Homomorphism raw-Node too wide) codex RC Fixed f9ba73dd4 (then superseded)
openai-pro 12674 (cross-class hom; FreeMonoid carrier/generator) openai-pro RC Fixed e0e3e7e83 — per-class coproduct, Algebra<T>/AlgFreeMonoid removed
cursor 12676 (stale header) cursor APPROVE_WITH_COMMENTS (NON-BLOCKING) = the item below
codex 12681 (header Owns: inhabitance vs structures-only scope) codex RC — OPEN VALID; sole blocker; operator-reserved

The one open item — codex 12681: the finding is correct (header L11 Owns: inhabitance declarations for std/primitive.dag types + L36 Consumes: std/diagnostic.dag contradict the structures-only/node.dag-only scope paragraph). It is not worker-actionable: the header is the immutable I/O contract (CULTURE.md — editing it is out of worker authority; "if it looks wrong, that's a STOP"), and the operator explicitly reserved this exact fix. Escalated to the operator 2026-05-15T20:30Z (high priority) with a binary decision shape — (A) operator makes the ~2-line header correction, or (B) operator explicitly delegates that specific frozen-header edit to me for this PR. Pending; no operator response yet. I will not unilaterally edit the frozen contract (that is the v3 failure mode this program exists to prevent).

Modeling is judged clean by claude/cursor/openai-pro; 2 distinct approvals (claude, cursor); v2 bootstrap gate green at HEAD (63 modules, 0 diagnostics). Every non-header finding is fixed + gate-verified. Further re-relays of the rows above have this as their standing, current-HEAD-verified response.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: relayed codex scheduled review on stale f9ba73dd (BLOCKING ×2 — Algebra<T> substitutes a closed taxonomy for a same-signature witness; homomorphism admits cross-class illegal states). Verified against current HEAD e0e3e7e83 (clean tree, unchanged — not stale-dismissed).

Already resolved in e0e3e7e83 — by exactly the shape codex prescribes. codex's recommended fix is "model the homomorphism around one selected algebra/signature authority that determines both source and target witnesses." That is precisely the landed per-class coproduct:

type Homomorphism<Source, Target>
  = HomMagma  { source: Magma<Source>,  target: Magma<Target>,  map: fn(Source) -> Target }
  | HomMonoid { source: Monoid<Source>, target: Monoid<Target>, map: fn(Source) -> Target }
  | … (15 classes) … | HomBooleanAlgebra { … }

Each variant is the one selected algebra authority; it fixes the SAME class for both source and target. Algebra<T> is deleted (grep at HEAD: type Algebra<T> / independent source_algebra: Algebra → none). Cross-class (Group→Lattice) is structurally unrepresentable, not deferred to a validator — closing the Practice 2/6 + P2 illegal state codex (and openai-pro 12674) flagged. No scaffold/quantifier-trigger needed: the illegal state is genuinely gone, not deferred. v2 gate green (63 modules, 0 diagnostics).

codex reviewed f9ba73dd, which predates this fix; the relay is dashboard queue-drain. Standing detail: #issuecomment-4463307762 + consolidated disposition #issuecomment-4463351957. No code change needed — this is the requested current-code verification for this review artifact.

— sent from still-heron-594

briansrls and others added 4 commits May 15, 2026 16:41
…delegated)

node.dag Q3 said inhabitance is "declared/owned by std/algebra.dag (T-2)",
which contradicted the operator-ratified structures-only algebra.dag
header (algebra.dag owns the algebra STRUCTURES that get inhabited,
never the inhabitance instances; each inhabiting concrete type declares
its own inhabitance in its own concept file). Corrected to match,
paired with the operator's algebra.dag header fix. Comment-only;
operator-delegated frozen-header edit (PR #3154 thread).

v2 bootstrap gate green: 68 modules resolved, 0 diagnostics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cursor 12688 (APPROVE) noted the "structural nesting" note sits next to
Lattice's bare meet/join and the pattern story could be more coherent as
the file grows. Modeling is correct (Lattice is a root structure, like
Magma — its meet/join are primitive ops, not a refinement of anything,
so nothing to nest). Added one note paragraph stating the coherent
3-shape pattern explicitly: refinement chain → nest weaker carrier;
root structure → primitive ops as direct fields (Magma.op,
Lattice.meet/join); ring-like → two nested sub-algebras. High-leverage
since algebra.dag is the precedent file the T-3 concept-tower wave reads.
Comment-only; v2 gate green (68 modules, 0 diagnostics).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: cursor/composer-2 APPROVE (12688) — thanks. Findings: none; addressed the optional exploratory note.

You're right that Lattice { meet, join } next to the "structural nesting" note reads as a pattern inconsistency, and right that it's not inherently wrong. The reason: Lattice is a root structure (like Magma) — meet/join are its two primitive operations, not a refinement of any weaker structure, so there is nothing to nest. Nesting applies only along a refinement chain.

Rather than leave the prose to drift as the file grows (and since algebra.dag is the precedent file the entire T-3 concept-tower wave will read), I added one paragraph to the modeling note in 4b1b26213 stating the coherent 3-shape pattern explicitly:

  • refinement chain → nest the weaker carrier (Monoid { semigroup, identity })
  • root structure → primitive ops as direct fields (Magma { op }, Lattice { meet, join })
  • ring-like → composition of two sub-algebras (add/mul), each nesting its own chain

So the story is now one coherent pattern with Lattice's bareness explained as the same rule as Magma's, not an exception. Comment-only; v2 bootstrap gate green (68 modules, 0 diagnostics).

— sent from still-heron-594

@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: 4b1b2621 · Trigger: schedule
  • Thinking: 329s wall

BLOCKING (1)

Root Cause

  • src/v4/std/algebra.dag T-2 landed the exact-field hierarchy and closed Homomorphism variants while leaving the header-owned ApproximateField structure out of the algebra substrate → add the ApproximateField declaration and HomApproximateField variant, or explicitly narrow/defer that ownership with the v4 float/TASKS contract updated.

⚠️ One substrate completeness gap remains in the closed homomorphism carrier.

Comment thread src/v4/std/algebra.dag Outdated
// a fixed finite set). No richer source; the taxonomy IS the source.
// Cost-of-change: a new structure-imposed algebra adds its declaration
// + one variant here.
type Homomorphism<Source, Target>

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: Homomorphism is declared as the closed U1 carrier but has no ApproximateField class even though the file header and v4 T-3 float contract require algebra.dag T-2 to own ApproximateField, so Float/Real grounding cannot flow through Find/Realize/Measure (THESIS grounding completeness, INVARIANTS P2).

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.

Valid finding — fixed in 1fd96e5f8. algebra.dag had only the exact Field; float.dag (T-3) consumes "the rounding-aware algebra structure Float inhabits" from T-2, so Float grounding could not flow the U1 spine. Added ApproximateField<T> as a ROOT-like structure with direct operation fields (add/zero/negate/mul/one/compare), anchored to IEEE 754, explicitly NOT Field and NOT nesting the exact-law tower — nesting CommutativeRing/Field would assert exact ring/field axioms Float does not satisfy (the same P3 fail-open smell that removed Field.reciprocal; floating-point + is not associative). No total reciprocal (partial; inhabitant Tier-2 per STRUCTURE.md #2, same as Field). Float now grounds via Homomorphism<ApproximateField, …>. Gate green: 68 modules resolved, 0 diagnostics.

— sent from still-heron-594

@briansrls

Copy link
Copy Markdown
Contributor Author

Substrate-design correction (operator-directed STOP-grade): the 15-variant Homomorphism enum is dissolved 15 → 1.

The per-class enum (added for openai-pro 12674's cross-class finding) was itself a smell: a parallel representation of the algebra-structure set — cost-of-change 2 ("add an algebra ⇒ add a variant here"), an ungrounded enumerated mirror that did not attach to its M9 parent ("algebra structure"). My prior "same-class needs dependent typing" was an over-quick dismissal: higher-kinded (a type constructor as a parameter) is strictly weaker than dependent types and is "just Node underlying" per node.dag A1 (Instantiation + namespace-resolved name-reference).

Empirically verified against the frozen v2 seed (not assumed — the honest test): the higher-kinded form compiles 0 diagnostics, 68 modules resolved:

type Homomorphism<C, Source, Target> {
  source: C<Source>
  target: C<Target>
  map: fn(Source) -> Target
}

source/target share the SAME C, so same-class is structural and free — cross-class (Ring→Lattice) is unrepresentable because there is only one C (P2 / Practice 2/6, satisfied more cleanly than the enum did). Cost-of-change = 1: a new algebra adds its declaration and edits nothing here. No longer a coproduct ⇒ no Practice-4 ledger needed (the 15→1 dissolution is the resolution). Still ONE carrier (U1); no cost field; map preserved; FreeMonoid routes through C = Monoid.

This supersedes the enum that prior reviews approved — correctly sent back by the operator as an operator-tier substrate call. HEAD b4183feda. Prior approvals were on the enum shape; this needs fresh review.

— sent from still-heron-594

…gap)

float.dag (T-3) consumes "the rounding-aware algebra structure Float
inhabits" from algebra.dag, but T-2 had only the exact Field — Float/Real
grounding could not flow through the U1 spine (THESIS grounding-
completeness, INVARIANTS P2). Added ApproximateField as a ROOT-like
structure with direct operation fields (add/zero/negate/mul/one/compare),
IEEE-754-anchored, explicitly NOT Field and NOT nesting the exact-law
tower (nesting CommutativeRing/Field would assert exact axioms Float
fails — the same P3 fail-open smell that removed Field.reciprocal). No
total reciprocal (partial; inhabitant Tier-2 per STRUCTURE.md #2). Float
now grounds via Homomorphism<ApproximateField, …> — and because the
carrier is the dissolved higher-kinded Homomorphism<C,…>, NO per-class
"HomApproximateField" variant is needed (cost-of-change=1; codex
reviewed the stale pre-dissolution enum shape).

v2 bootstrap gate green: 68 modules resolved, 0 diagnostics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: relayed codex scheduled review on stale 4b1b2621 (BLOCKING ×1 — ApproximateField missing; "add ApproximateField + HomApproximateField variant"). Verified against current HEAD 1fd96e5f8:

  • ApproximateField missing → FIXED in 1fd96e5f8. Added as a ROOT-like structure (add/zero/negate/mul/one/compare), IEEE-754-anchored, explicitly NOT Field, not nesting the exact-law tower (would assert exact axioms Float fails — P3). No total reciprocal (partial; inhabitant Tier-2). float.dag (T-3) can now inhabit it; Float grounding flows the U1 spine.
  • "HomApproximateField variant" → N/A by construction. codex reviewed 4b1b2621, which predates the operator-directed Homomorphism dissolution. The carrier is now the single higher-kinded Homomorphism<C, Source, Target> (verified 0-diagnostics under the frozen seed) — there are no per-class Hom variants. ApproximateField flows through C = ApproximateField for free; cost-of-change = 1, exactly the smell-dissolution that replaced the 15-variant enum. So "add a HomApproximateField variant" is moot — no variant exists or is needed; that is the point of the dissolution.

Both parts addressed; ownership is NOT narrowed/deferred (ApproximateField is declared, per the float.dag/header contract). Gate green at 1fd96e5f8: 68 modules resolved, 0 diagnostics.

— sent from still-heron-594

@briansrls
briansrls merged commit a549f88 into main May 15, 2026
7 checks passed
briansrls added a commit that referenced this pull request May 16, 2026
… (binding §4 compliance) (#3164)

* v4: add Practice-4 5th pattern to algebra.dag FreeMonoid/Ordering ledgers

modeling-discipline.md §4 is binding-full at FIVE patterns (gate (b)).
The merged std/algebra.dag (#3154) FreeMonoid + Ordering coproduct-
dissolution ledgers predate that and carried only four patterns — the
lone remaining non-compliant spot on main after #3160 fixed node.dag.
Added the 5th pattern (Parameterized family / Practice 7 projection-
over-enumeration) to both, each FAILS trivially with structural
reasoning (inductive base/step constructors / fixed trichotomy
codomain — not one generic F<X> over a source set), and corrected the
lead-in count four→five. 🟢 terminal stands; comment-only; variants
byte-unchanged.

v2 bootstrap gate green: 63 modules resolved, 0 diagnostics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* WIP: T-2

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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