Skip to content

feat(MagicFunction): shared integrable majorants for contour integrands - #463

Draft
cameronfreer wants to merge 32 commits into
thefundamentaltheor3m:mainfrom
cameronfreer:cameronfreer/contour-majorants
Draft

cameronfreer wants to merge 32 commits into
thefundamentaltheor3m:mainfrom
cameronfreer:cameronfreer/contour-majorants

Conversation

@cameronfreer

@cameronfreer cameronfreer commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The six contour-integrand integrability proofs now use shared bounds for the cusp segments, compact top edges, and vertical tail. This fills the six Φⱼ_integrableOn placeholders and removes repeated estimates from I1.leanI6.lean.

Stack and merge order

While #460 is unmerged, review the changes relative to its bounding branch; the GitHub diff against main also contains #460.

Changes

  • Majorants.lean centralizes the φ₀'' norm estimate, its ray specializations, two integrability lemmas, and the phase identities relating Φ₁, Φ₃, and Φ₅.
  • Integrability.lean proves integrability by contour type. I1.leanI6.lean use the shared estimates directly.
  • All six integral comparisons use setIntegral_mono_of_nonneg, eliminating the duplicated nonintegrable-case arguments.
  • Removes the six unused whole-real-line decay'₀/decay' placeholders from I2.lean, I4.lean, and I6.lean, together with their empty and commented scaffolding. The nonnegative-input decay goals live in feat: improving bounds and restating things in the language of radial Schwartz functions #460's Schwartz.lean.

The earlier review suggestions from @CBirkbeck and @seewoo5 are incorporated, including removal of the unused specializations and four Bound_integrableOn aliases.

Verification

Full lake build and lake exe mk_all --check --module pass on the combined #460/#463 stack. No new sorry declarations. Φ₂_integrableOn and Φ₄_integrableOn are axiom-clean; the other four still inherit the pre-existing sorry in PolyFourierCoeffBound.norm_φ₀_le, addressed separately by #468.

thefundamentaltheor3m and others added 25 commits August 25, 2026 15:05
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The sorry as stated (`∃ C, x ^ k * rexp (-r * x) ≤ C` with `x` bound outside
the existential) was vacuous — dischargeable by `⟨_, le_refl _⟩` with every
hypothesis unused. Restated with the explicit constant `(k / r) ^ k`, which
is uniform in `x`, and strengthened `0 ≤ r` to `0 < r` (no uniform bound
exists at `r = 0` for `k > 0`).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
…rability

The six segments of the contour defining `a` fall into three classes, and
within each class the analytic estimate is the same; only the parametrisation
and a unit-modulus phase differ. Previously that argument was written out
separately in each of I1.lean-I6.lean.

Add `a/IntegralEstimates/Majorants.lean` collecting the shared ingredients:

* `norm_φ₀''_le`, the `PolyFourierCoeffBound` for φ₀ transported to φ₀'' on
  `Im w > 1/2` once and for all, plus its three specialisations along the
  vertical ray, the cusp ray and the top edge;
* `integrableOn_majorant_cusp` / `integrableOn_majorant_vertical`, the two
  majorant-integrability lemmas that were duplicated four times;
* `Φ₁_eq_Φ₅_mul_phase` / `Φ₃_eq_Φ₅_mul_phase` and the resulting uniform
  bounds `norm_Φ₁_le`, `norm_Φ₃_le`, `norm_Φ₅_le` on (0, 1];
* `integrableOn_of_norm_le_const`.

This fills the six `sorry`s in `Integrability.lean` (`Φⱼ_integrableOn`) and
turns I1.lean-I6.lean into thin specialisations, net -133 lines there.

Claude-Session: https://claude.ai/code/session_01FvNZchX49fvqUanJQhxpx4
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
@cameronfreer cameronfreer changed the title feat(MagicFunction): shared contour-class majorants and segment integrability feat(MagicFunction): shared integrable majorants for contour integrands Sep 1, 2026

@seewoo5 seewoo5 left a comment

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.

(⚠️ These review are written by Claude)


Pulled the branch and reviewed locally. Everything in the PR description checks out:

  • Full lake build is clean (3546 jobs); Majorants.lean itself emits zero warnings; project sorry count drops 72 → 66.
  • #print axioms confirms the verification claims: Φ₂/Φ₄_integrableOn are sorry-free, and Φ₁/Φ₃/Φ₅/Φ₆_integrableOn depend only on the pre-existing sorryAx from PolyFourierCoeffBound.norm_φ₀_le, untouched here. No new axioms.
  • Cross-checked the stacked branches (#464#468): the inline findings below are all stack-safe (no downstream uses of the flagged declarations), while #464's Fourier/Fubini.lean genuinely consumes norm_φ₀''_I_mul_le, norm_φ₀''_neg_inv_I_mul_le, cexp_pi_I_mul_I, and both phase identities — so the shared-infrastructure design pays off downstream.

Inline comments below. I applied all of them (plus the norm_cexp_pi_I_mul inlining already raised) on top of this branch and the build stays green, net −21 lines.

Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/I1.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/I2.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/I3.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/I5.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/I6.lean Outdated

@seewoo5 seewoo5 left a comment

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.

⚠️ Again, these reviews are written by Claude. I explicitly asked to suggest golf/clean-up, based on /mathlib-quality:clean-up skill.


Golf/cleanup pass, complementing the earlier correctness review. Every suggestion below is compile-verified twice: first individually against this branch, then all of them applied together (along with the deletions from the earlier review) — full lake build green, no new warnings, all lines ≤ 100 chars. Net effect of the combined set: Majorants.lean 279 → 199 lines (−80), Integrability.lean 95 → 86 (−9), with no statement changes anywhere, so I1I6 and the stacked PRs (#464, #468) are unaffected.

A few notes that span multiple suggestions:

  • The norm_Φ₁_le/norm_Φ₃_le suggestions stop using the private norm_cexp_pi_I_mul, so together with the earlier thread on it, that wrapper ends up with zero callers — deletable.
  • neg_one_div_I_mul becomes dead once im_neg_one_div_I_mul is proved directly; those two suggestions should be applied together.
  • Recurring wins worth knowing about: Exists.imp absorbs the obtain/refine-existential boilerplate in five lemmas; the phase-identity twins need no I² = −1 at all (the exponent split is a pure ring identity); and hne in im_neg_one_div_add_I was never used (complex division is total).
  • Cosmetic, not suggested inline: Φ₂/Φ₄_integrableOn signatures also fit on one line, and mathlib style would prefer 0 ≤ r over r ≥ 0 in the six integrability signatures — but those signatures pre-date this PR.
  • Side note for a follow-up, not this PR: with Φ₆_eq_I₆_g + Φ₆_integrableOn in place, I6.lean's header TODO "Integrability of g" is one IntegrableOn.congr_fun away.

Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/Integrability/Integrability.lean Outdated
Comment thread SpherePacking/MagicFunction/a/Integrability/Integrability.lean Outdated
Comment thread SpherePacking/MagicFunction/a/Integrability/Integrability.lean Outdated
Comment thread SpherePacking/MagicFunction/a/Integrability/Integrability.lean Outdated
Comment thread SpherePacking/MagicFunction/a/Integrability/Integrability.lean Outdated
…e proofs

Applies the review suggestions on thefundamentaltheor3m#463:
- delete unused norm_φ₀''_neg_inv_add_I_le, im_I_mul, neg_one_div_I_mul,
  and the private norm_cexp_pi_I_mul wrapper
- drop the duplicate Bound_integrableOn aliases in I1/I3/I5/I6 in favour of
  the shared integrableOn_majorant_cusp/vertical
- Exists.imp/term-mode golf throughout Majorants.lean and Integrability.lean

Claude-Session: https://claude.ai/code/session_01FvNZchX49fvqUanJQhxpx4
@cameronfreer

Copy link
Copy Markdown
Contributor Author

@CBirkbeck @seewoo5 Thanks for these reviews. Not sure why there were so many silly issues this time. I think I've addressed all of them.

Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/Majorants.lean Outdated
Comment thread SpherePacking/MagicFunction/a/IntegralEstimates/I4.lean Outdated
seewoo5
seewoo5 previously approved these changes Sep 1, 2026

@seewoo5 seewoo5 left a comment

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.

Thanks!

seewoo5
seewoo5 previously approved these changes Sep 2, 2026

@thefundamentaltheor3m thefundamentaltheor3m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Let's merge #460 first and then update this one on top of that. (I'm "requesting changes" so that we don't accidentally merge this one first - and changes will be required once #460 is merged anyway.)

@thefundamentaltheor3m

Copy link
Copy Markdown
Owner

@cameronfreer can you please mark resolved conversations as resolved? Thank you

@thefundamentaltheor3m thefundamentaltheor3m added the depends-on-other-pr Depends on another PR label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends-on-other-pr Depends on another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants