Skip to content

Add D4/F4 S3 orbit and covariant equivariance harness - #17

Merged
EmergentMonk merged 14 commits into
mainfrom
feature/d4-tia-s3-equivariance
Sep 18, 2026
Merged

EmergentMonk merged 14 commits into
mainfrom
feature/d4-tia-s3-equivariance

Conversation

@EmergentMonk

@EmergentMonk EmergentMonk commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Implements the second locked D4-TIA research phase as D4-TIA-S3-EQUIV v0.1.0.

PR #16 made the 15 published binary covariants executable. This PR makes the symmetry layer executable and verifies that the exact covariants transform equivariantly before any new sonification mapping is designed.

This phase adds no MIDI mapping, tuning, tempo, timbre, PCM, rendered audio, ETQ-101 change, or ETQ-303 change.

Exact D4/F4 triality quotient

Using the Sakai-aligned matrices already frozen in the repository, the harness constructs the six exact elements generated by w_S, w_T:

e, S, T, ST, TS, STS

and verifies exactly:

S^2 = I
T^2 = I
(ST)^3 = I

The fixed D4 seed (2,4,6,10) has a deterministic six-element orbit, pinned in the canonical fixture.

Modular quotient side

The harness uses canonical SL2(Z) representatives generated from

S = [[0,-1],[1,0]]
T = [[1,1],[0,1]]

and reduces them modulo 2 to identify the six classes of

SL2(Z) / Gamma(2) ~= S3.

The D4/F4 multiplication table and the modular quotient multiplication table are independently computed and required to agree exactly.

A critical boundary is explicit throughout the implementation: the six modular matrices are representatives of quotient classes. The PR does not assert that they form a literal six-element subgroup of SL2(Z) upstairs.

Coefficient action is derived, not copied

For each modular representative

M = [[a,b],[c,d]]
u' = a*u + b*v
v' = c*u + d*v

the transformed coefficients are derived directly by expanding

f'(u,v) = f(u',v')
g'(u,v) = g(u',v')

inside the exact sparse-rational polynomial engine from PR #16.

There is no second manually maintained transformation table.

Exact covariant equivariance

For every one of the 15 exact covariants and every one of the six canonical representatives, the harness independently constructs both sides of

Psi(alpha'; u,v) = Psi(alpha; u',v')

and compares the resulting exact sparse polynomials term-for-term.

That gives:

15 covariants * 6 representatives = 90 exact symbolic checks

No floating-point tolerance, random sampling, numerical fitting, or perceptual proxy is involved.

Canonical identity

Adds:

  • examples/d4-tia-s3-equivariance.v0.1.canonical.json
  • spec/d4-tia-s3-equivariance.v0.1.schema.json

The fixture pins the exact D4 orbit, modular quotient representatives, quotient multiplication table, coefficient-action hashes, and transformed-basis hashes. The schema binds the complete summary with const.

Implementation

Added:

  • src/d4-triality-s3-equivariance.mjs
  • tests/d4-triality-s3-equivariance.test.mjs
  • scripts/verify-d4-tia-s3-equivariance.mjs
  • docs/D4_TRIALITY_S3_EQUIVARIANCE.md
  • canonical fixture + schema
  • README / ROADMAP / CHANGELOG / package-script integration

npm run verify now validates D4-TIA-COV, D4-TIA-S3-EQUIV, D4-TIA-15, and the existing ETQ v3/v2/v1 chain.

Roadmap

This phase is now marked implemented. The remaining locked sequence is:

  1. D4-TIA-15 v2 — evaluated-covariant/orbit sonification that respects the tested equivariance boundary before invariant projection.
  2. Freeze/tag/archive, then update Zenodo.

The next phase may finally define a new receiver, but it must be downstream of this tested symmetry contract.

Validation

The branch has passed the complete repository CI matrix, including:

  • Node npm test;
  • full npm run verify;
  • browser-app checks;
  • Python 3.11;
  • Python 3.12; and
  • Python 3.13.

Summary by Sourcery

Implement the D4-TIA-S3-EQUIV symmetry harness and establish an exact, canonical equivariance contract for the 15 binary covariants.

New Features:

  • Add an executable D4/F4 triality quotient orbit and matching modular S3 quotient representatives.
  • Derive binary-form coefficient actions and verify exact equivariance for all 15 covariants across six representatives.

Enhancements:

  • Pin the orbit, quotient multiplication tables, coefficient actions, and transformed covariant bases in canonical fixtures with schema validation.
  • Keep finite quotient classes distinct from their SL2(Z) representatives and expose the symmetry harness through repository verification.

Documentation:

  • Document the D4-TIA-S3-EQUIV harness, its claim boundaries, verification commands, and roadmap status.

Tests:

  • Add automated tests and verification for the six-element orbit, quotient correspondence, and 90 exact symbolic equivariance checks.

Chores:

  • Integrate D4-TIA-S3-EQUIV validation into the root verification chain without adding sonification or audio behavior.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @EmergentMonk, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 hours and 16 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-18T12:21:14.857236Z e069a43 Manual request
🔒 Security Review ✅ Completed 2026-09-18T12:21:07.659698Z e069a43 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sourcery-ai

sourcery-ai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR makes the D4/F4-to-modular S3 symmetry layer executable: it constructs and cross-checks both quotient actions, derives coefficient transformations from exact binary-form substitution, and proves 90 exact symbolic equivariance identities for the 15 covariants, with canonical commitments, tests, verification commands, and documentation; it introduces no sonification behavior.

Sequence diagram for exact covariant equivariance verification

sequenceDiagram
    participant Harness
    participant Modular as Modular quotient
    participant Forms as Binary forms
    participant Basis as 15 covariants
    participant Exact as Exact polynomial engine

    Harness->>Modular: buildModularS3QuotientRepresentatives()
    loop six representatives
        Harness->>Forms: deriveCoefficientAction(matrix)
        Forms->>Exact: substituteUv(f, matrix)
        Forms->>Exact: substituteUv(g, matrix)
        loop 15 covariants
            Harness->>Basis: select covariant polynomial
            Harness->>Exact: substituteCoefficientVariables(polynomial, substitutions)
            Harness->>Exact: substituteUv(polynomial, matrix)
            Exact-->>Harness: polynomialsEqual(left, right)
        end
    end
    Harness-->>Harness: 90 exact checks passed
Loading

Flow diagram for the D4/F4 and modular quotient cross-check

flowchart TD
    SEED[Seed: 2,4,6,10]
    GENERATORS[Generate e, S, T, ST, TS, STS]
    RELATIONS[Verify S^2 = I, T^2 = I, and ST^3 = I]
    ORBIT[Construct six-point D4 orbit]
    MODULAR[Construct canonical modular representatives]
    REDUCE[Reduce representatives modulo 2]
    TABLES[Compute both multiplication tables]
    MATCH{Tables match exactly?}
    PASS[Symmetry contract passes]

    SEED --> GENERATORS
    GENERATORS --> RELATIONS
    GENERATORS --> ORBIT
    GENERATORS --> MODULAR
    MODULAR --> REDUCE
    ORBIT --> TABLES
    REDUCE --> TABLES
    TABLES --> MATCH
    MATCH -->|yes| PASS
Loading

File-Level Changes

Change Details Files
Adds an executable exact D4/F4 triality quotient and deterministic orbit, with independent modular quotient representatives and multiplication-table agreement checks.
  • Constructs the six elements generated by the frozen Sakai involutions and verifies the S3 relations and six-point seed orbit.
  • Constructs canonical SL2(Z) representatives, reduces them modulo 2, and compares their quotient table with the D4/F4 table.
  • Pins orbit, representatives, tables, and related hashes in a canonical fixture and const-bound schema.
src/d4-triality-s3-equivariance.mjs
tests/d4-triality-s3-equivariance.test.mjs
scripts/verify-d4-tia-s3-equivariance.mjs
examples/d4-tia-s3-equivariance.v0.1.canonical.json
spec/d4-tia-s3-equivariance.v0.1.schema.json
Derives binary-form coefficient actions through exact polynomial substitution and verifies covariant equivariance symbolically.
  • Expands f(u',v') and g(u',v') using the existing sparse rational polynomial engine to derive coefficient substitutions.
  • Checks both sides of the equivariance identity term-for-term for all 15 covariants across six representatives, totaling 90 exact checks.
  • Uses deterministic coefficient-action and transformed-basis SHA-256 commitments in the generated summary.
src/d4-triality-s3-equivariance.mjs
tests/d4-triality-s3-equivariance.test.mjs
scripts/verify-d4-tia-s3-equivariance.mjs
Integrates the symmetry harness into repository validation and documents its claim boundaries and sequencing.
  • Adds standalone and full-chain npm verification commands.
  • Documents the quotient-versus-upstairs distinction, exact validation scope, and absence of sonification or audio changes.
  • Marks the harness implemented and advances the roadmap to D4-TIA-15 v2.
package.json
README.md
CHANGELOG.md
docs/D4_TRIALITY_S3_EQUIVARIANCE.md
docs/ROADMAP.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: e069a4390e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@EmergentMonk
EmergentMonk merged commit 41a7e6d into main Sep 18, 2026
11 checks passed
@EmergentMonk
EmergentMonk deleted the feature/d4-tia-s3-equivariance branch September 18, 2026 12:26
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