Skip to content

feat: define the Hecke operators T_n - #4307

Merged
tauceti-review-bot[bot] merged 8 commits into
TauCetiProject:mainfrom
sqrt-of-2:roadmap/hecke-t-n-codex-1
Aug 24, 2026
Merged

feat: define the Hecke operators T_n#4307
tauceti-review-bot[bot] merged 8 commits into
TauCetiProject:mainfrom
sqrt-of-2:roadmap/hecke-t-n-codex-1

Conversation

@sqrt-of-2

Copy link
Copy Markdown
Contributor

This PR defines the uniform Hecke operators heckeT_n and heckeT_n_cusp as the slash actions of the canonical double coset Γ₁(N) diag(1,n) Γ₁(N), and expose their underlying slash sums, the identity law T₁ = 1, the classical formula at every prime, and the bad-prime identification with the upper-triangular operator. This advances the ModularForms roadmap milestone “(b) The action on forms,” specifically its target def heckeT_n [NeZero N] (k : ℤ) (n : ℕ) [NeZero n], while fixing the normalization through the already-proved double-coset computation.

The small supporting lemmas prove that the unique upper-triangular representative and slash sum at index one are identities. The definition follows the architecture of AINTLIB’s LeanModularForms/HeckeRIngs/GL2/HeckeT_n.lean (Chris Birkbeck, Apache-2.0, commit 2baa76f742bdb4fb8ee323fabba41203bd390e08), but uses Tau Ceti’s existing canonical double-coset action directly; no proof code is transcribed.

After this PR, milestone (b) still needs preservation of general nebentypus spaces, the Hecke-ring homomorphism, coprime and prime-power multiplication laws, the general q-expansion recurrences, and the U_p notation milestone.

Roadmap: ModularForms

🤖 Prepared with Codex

Co-Authored-By: Codex <noreply@github.com>
@tauceti-review-bot tauceti-review-bot Bot added awaiting-CI CI has not yet reported on the latest commit roadmap/ModularForms PR declares the ModularForms roadmap as its primary association ci-failed The build failed on the latest commit; author action needed and removed awaiting-CI CI has not yet reported on the latest commit labels Aug 23, 2026
…ecke operators

Rename `heckeT_n` to `heckeTNat` and `heckeT_n_cusp` to `heckeTCuspNat` to avoid underscores in def names, and remove unused `[NeZero]` typeclass arguments.

Co-Authored-By: Antigravity <noreply@github.com>
@tauceti-review-bot tauceti-review-bot Bot added awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts review-in-progress A review is running on this exact commit right now and removed ci-failed The build failed on the latest commit; author action needed awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts labels Aug 23, 2026

@CBirkbeck CBirkbeck Aug 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ correctness — now passing on f09489e.

@CBirkbeck

CBirkbeck commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

AI review — approved

Each rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.

rubric state judge summary
correctness approved codex/gpt-5.6-sol The positive-index operators faithfully package the canonical double-coset actions; the identity, prime, and bad-prime laws agree with the underlying verified decompositions and normalization.
reuse approved codex/gpt-5.6-sol The indexed operators are a justified canonical API over the existing double-coset action. Searches of TauCeti and Mathlib found no declaration that directly replaces them and no avoidable duplicated proof or construction.
scope approved codex/gpt-5.6-sol The PR directly advances ModularForms milestone (b) by defining the roadmap’s uniform T_n action from the already-merged double-coset machinery. The index-one lemmas and prime/bad-prime identifications are coherent supporting material for that single topic.
attribution approved codex/gpt-5.6-sol The module credits the central AINTLIB formal source with file, author, license, and pinned commit, and cites the relevant informal references.
api-design approved codex/gpt-5.6-sol The linter-compliant heckeTNat naming matches the adjacent diamondOpNat API, and the definitions have sufficient characteristic, prime, bad-prime, and identity lemmas with appropriate simplification annotations.
generality approved codex/gpt-5.6-sol The operator definitions use the roadmap’s natural positive-index hypotheses, while the prime and level-divisor results now derive NeZero p internally from their explicit hypotheses.
placement approved codex/gpt-5.6-sol The new operators and supporting identity lemmas are in their canonical topic files, and the new module imports the directly relevant prime-level theory without an evidently unnecessary import.
naming approved codex/gpt-5.6-sol The introduced names follow adjacent Hecke and diamond-operator terminology, accurately describe their conclusions, and introduce no notation.
documentation approved codex/gpt-5.6-sol The new substantive module has a clear module docstring with scope, provenance, and references, and every added public declaration is documented accurately.
proof-quality approved codex/gpt-5.6-sol The added proofs are short and robust, using explicit defining lemmas, targeted rewriting, and straightforward extensionality without undocumented definitional-equality manipulation.

♻️ = approved on an earlier commit, re-run before merge.

Reviewing this diff at head f09489e. rubrics @ f854a7e. Review spend: $3.81.

@tauceti-review-bot tauceti-review-bot Bot added awaiting-author A review requested changes; author action needed and removed review-in-progress A review is running on this exact commit right now labels Aug 23, 2026
`heckeTNat`/`heckeTCuspNat` are built from `diagCosetGamma1 N n`, whose matrix is
`natDiagGL 2 ![1, n]`. At `n = 0` that tuple fails `natDiagGL`'s positivity side
condition, so the matrix takes its junk value `1`, the double coset degenerates to
`Γ₁(N)`, and both alleged `T₀` operators are silently the identity rather than a
Hecke operator. Restore the `[NeZero n]` binders — the signature the ModularForms
roadmap asks for — so index zero is unrepresentable, and document why.

The binders are `_`-named on the two definitions: their bodies do not mention the
instance, and `unusedArguments` (which exempts `_`-prefixed binder names, but not
anonymous instance binders) fails the build otherwise. This is the existing repo
idiom, cf. `TauCeti.primitiveCentralIdempotent`.

Co-Authored-By: Claude Code <noreply@github.com>
@tauceti-review-bot tauceti-review-bot Bot added awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts review-in-progress A review is running on this exact commit right now and removed awaiting-author A review requested changes; author action needed awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts labels Aug 23, 2026

@kbuzzard kbuzzard Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 reuse — request_changes codex/gpt-5.6-sol

The public defining-equation lemmas are redundant reflexive restatements of the new definitions.

  • TauCeti/NumberTheory/ModularForms/HeckeSlash/Operators.lean:87heckeTNat_def and heckeTCuspNat_def duplicate the immediately preceding definitions verbatim via rfl, adding unnecessary public API. Fix: Delete both lemmas; in coe_heckeTNat and coe_heckeTCuspNat, unfold the corresponding definition before applying the existing coe_heckeSlashGamma1*End lemma.

Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)

codex/gpt-5.6-sol · 16s · 41k in / 638 out tokens · reviewing this diff · rubric

Comment thread TauCeti/NumberTheory/ModularForms/HeckeSlash/Operators.lean

@kbuzzard kbuzzard Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 generality — request_changes codex/gpt-5.6-sol

Four public theorems retain a logically redundant NeZero p assumption already derivable from their explicit hypotheses.

  • TauCeti/NumberTheory/ModularForms/HeckeSlash/Operators.lean:106coe_heckeTNat_prime, coe_heckeTCuspNat_prime, heckeTNat_eq_upperTri, and heckeTCuspNat_eq_upperTri expose [NeZero p], although p.Prime or p ∣ N with [NeZero N] proves p ≠ 0. Fix: Remove [NeZero p] from these signatures and construct the required NeZero p instance internally from hp.ne_zero or from hpN and NeZero.out N.

Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)

codex/gpt-5.6-sol · 26s · 40.1k in / 1.2k out tokens · reviewing this diff · rubric

@kbuzzard

kbuzzard commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

AI review — changes requested

Each rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.

rubric state judge summary
♻️ correctness stale (re-run pending) codex/gpt-5.6-sol The definitions and stated computation laws are semantically consistent with the canonical double-coset action, including the identity and bad-prime cases. No correctness or faithfulness defect is evident.
🟡 reuse changes requested codex/gpt-5.6-sol The public defining-equation lemmas are redundant reflexive restatements of the new definitions.
♻️ scope stale (re-run pending) codex/gpt-5.6-sol The PR directly implements the cited ModularForms hecke-t-n target, and its index-one supporting lemmas are tightly coupled prerequisites for the identity law. The changes form one coherent topic.
♻️ attribution stale (re-run pending) codex/gpt-5.6-sol The new module credits its central formal inspiration with project, file, author, license, and commit, and cites the relevant informal textbook sources in code.
api-design approved codex/gpt-5.6-sol The linter-compliant canonical names heckeTNat and heckeTCuspNat appropriately realize the roadmap target, and the public API provides defining, coercion, identity, prime-formula, and bad-prime characterization lemmas with suitable simplification annotations.
🟡 generality changes requested codex/gpt-5.6-sol Four public theorems retain a logically redundant NeZero p assumption already derivable from their explicit hypotheses.
♻️ placement stale (re-run pending) codex/gpt-5.6-sol The new operators are naturally placed in the existing ModularForms/HeckeSlash hierarchy, while the supporting identity lemmas remain beside the representative and slash-sum definitions they elaborate. The import of HeckeSlash.Prime is directly justified by the prime computation rules and supplies the surrounding operator API.
♻️ naming stale (re-run pending) codex/gpt-5.6-sol The introduced names accurately describe their conclusions, follow adjacent API terminology, and add no gratuitous notation.
♻️ documentation stale (re-run pending) codex/gpt-5.6-sol The new module and all added public declarations have accurate, useful documentation, including scope, normalization, and provenance.
♻️ proof-quality stale (re-run pending) codex/gpt-5.6-sol The added proofs are short, readable, and use stable simplification or direct defining equations without undocumented definitional-equality manipulation or substantial duplicated reasoning.

♻️ = approved on an earlier commit, re-run before merge.

Reviewing this diff at head 323e7b6. rubrics @ f854a7e. Review spend: $1.46.

@tauceti-review-bot tauceti-review-bot Bot added awaiting-author A review requested changes; author action needed and removed review-in-progress A review is running on this exact commit right now labels Aug 23, 2026
Rename the operator family to the roadmap's canonical names, remove redundant defining lemmas, and derive nonzero prime indices from theorem hypotheses.\n\nCo-Authored-By: Codex <noreply@github.com>
Rename heckeT_n to heckeTNat and heckeT_n_cusp to heckeTCuspNat to adhere to Mathlib naming conventions and resolve the defsWithUnderscore linter failure.

Co-Authored-By: Antigravity <noreply@github.com>
@tauceti-review-bot tauceti-review-bot Bot added awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts review-in-progress A review is running on this exact commit right now and removed ci-failed The build failed on the latest commit; author action needed awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts labels Aug 23, 2026

@CBirkbeck CBirkbeck Aug 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ api-design — now passing on f09489e.

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.

I contest this finding because the requested spelling is rejected by the enforced Mathlib linter, and repo rules forbid silencing it. Commit 25c286b already tried heckeT_n and heckeT_n_cusp. Its sandboxed-build failed (https://github.com/TauCetiProject/TauCeti/actions/runs/32666593428/job/97260825452) with defsWithUnderscore violations for both declarations and LINT-ENV: FAIL — 2 new violation(s); the log explicitly requires lowerCamelCase or UpperCamelCase. Commit 323e7b6 then renamed them to heckeTNat and heckeTCuspNat and restored green CI. This also agrees with the round-2 naming approval, which says the current names follow adjacent Hecke and diamond-operator terminology. Restoring heckeT_n therefore necessarily regresses enforced lint/naming quality; adding nolint or a compatibility alias is forbidden. Please accept the linter-compliant canonical Lean API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re: your reply on api-design re-reviewed on f09489e; this clears the finding ✅ — approved on f09489e.

codex/gpt-5.6-sol · addresses your replies through comment 3839765733.

@CBirkbeck CBirkbeck Aug 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ generality — now passing on f09489e.

@tauceti-review-bot tauceti-review-bot Bot added awaiting-author A review requested changes; author action needed and removed review-in-progress A review is running on this exact commit right now labels Aug 23, 2026
Derive nonzero prime indices from primality or divisibility instead of exposing redundant typeclass assumptions.

Co-Authored-By: Codex <noreply@github.com>
@tauceti-review-bot tauceti-review-bot Bot added awaiting-CI CI has not yet reported on the latest commit ci-failed The build failed on the latest commit; author action needed and removed awaiting-author A review requested changes; author action needed awaiting-CI CI has not yet reported on the latest commit labels Aug 23, 2026
@tauceti-review-bot tauceti-review-bot Bot added awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts review-in-progress A review is running on this exact commit right now ready-to-merge CI green and every rubric approved; ready to merge and removed ci-failed The build failed on the latest commit; author action needed awaiting-CI CI has not yet reported on the latest commit awaiting-review CI is green; waiting for review verdicts review-in-progress A review is running on this exact commit right now labels Aug 23, 2026
@tauceti-review-bot
tauceti-review-bot Bot added this pull request to the merge queue Aug 23, 2026
Merged via the queue into TauCetiProject:main with commit c71825f Aug 24, 2026
16 checks passed
@tauceti-review-bot tauceti-review-bot Bot removed the ready-to-merge CI green and every rubric approved; ready to merge label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roadmap/ModularForms PR declares the ModularForms roadmap as its primary association

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants