Skip to content

feat: make ap_in_ff sorry-free - #16

Merged
YaelDillies merged 11 commits into
YaelDillies:masterfrom
dannyply:finitefield-ap-closure
Jun 28, 2026
Merged

feat: make ap_in_ff sorry-free#16
YaelDillies merged 11 commits into
YaelDillies:masterfrom
dannyply:finitefield-ap-closure

Conversation

@dannyply

@dannyply dannyply commented May 1, 2026

Copy link
Copy Markdown
Contributor

Fill the remaining sorrys in the finite-field almost-periodicity proof, in particular the final gap in:

lemma ap_in_ff

The main changes are in:

APAP/FiniteField.lean

The proof adds private helper lemmas for the common-kernel/Fourier-closure bridge, controls the off-closure Fourier mass by comparing F with μ T ∗^ k ∗ F, and uses a Fourier-L1 smooth-tail estimate for the specific convolution structure appearing in the finite-field argument.

There is a substantial amount of code, so I have tried to keep the new auxiliary lemmas private/local to APAP/FiniteField.lean where possible. The only non-local supporting change is a small prerequisite adjustment in:

APAP/Prereqs/Inner/Hoelder/Compact.lean

allowing the compact Hölder lemmas to be used under a [Finite α] assumption rather than only an existing [Fintype α] instance.

The quantitative statement is not weakened: the proof preserves the existing 2 ^ 32 codimension bound.

Note: Produced with assistance from a prototype agentic Lean proof-search system. Codex was used for review, refinement and simplification.

@YaelDillies

Copy link
Copy Markdown
Owner

Now that I have merged #15, you need to fix the merge conflicts here.

@dannyply
dannyply force-pushed the finitefield-ap-closure branch from 58f3d64 to 80612f7 Compare May 1, 2026 11:38
@dannyply

dannyply commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

I rebased on current master after #15 and resolved the conflicts. Made a small cleanup pass on the touched code: I removed the local heartbeat increase by splitting out a small expectation-rearrangement helper and applied the same style cleanups from #15.

Comment thread APAP/FiniteField.lean Outdated
@YaelDillies

Copy link
Copy Markdown
Owner

Sorry, I just pushed a large refactor to use the material that was newly upstreamed from APAP to AddCombi in leanprover-community/add-combi#2. You will need to resolve conflicts again.

@dannyply
dannyply force-pushed the finitefield-ap-closure branch from 80612f7 to afc35b9 Compare May 1, 2026 12:56
@dannyply

dannyply commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on current master

Comment thread APAP/FiniteField.lean Outdated
Comment thread APAP/FiniteField.lean Outdated
@dannyply

dannyply commented May 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on current master

@YaelDillies YaelDillies 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.

Can you try generalising each of the prerequisite lemmas and moving them to earlier files?

Comment thread APAP/FiniteField.lean Outdated
Comment thread APAP/FiniteField.lean Outdated
Comment thread APAP/FiniteField.lean Outdated
Comment thread APAP/FiniteField.lean Outdated
Comment thread APAP/FiniteField.lean Outdated
Comment thread APAP/FiniteField.lean Outdated
Comment thread APAP/FiniteField.lean Outdated
@dannyply

dannyply commented May 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, I followed your suggestions by moving the reusable lemmas to earlier files, applying the generalizations and using grw.

Comment thread APAP/Prereqs/FourierTransform/Discrete.lean Outdated
Comment thread APAP/Prereqs/Convolution/Discrete/Basic.lean Outdated
Comment thread APAP/Prereqs/Convolution/Discrete/Basic.lean Outdated
Comment thread APAP/Mathlib/Combinatorics/Additive/AP/Three/Defs.lean Outdated
@dannyply

dannyply commented May 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, I updated the remaining points as suggested and did another small cleanup pass.

@dannyply

dannyply commented May 3, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the build failure that my local stale .olean files had missed.

@YaelDillies YaelDillies 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.

Can you update the blueprint too? You need to add \leanok in the ff item.

Comment thread APAP/Mathlib/Combinatorics/Additive/AP/Three/Defs.lean Outdated
Comment thread APAP/Prereqs/FourierTransform/Discrete.lean Outdated
@dannyply

Copy link
Copy Markdown
Contributor Author

Can you update the blueprint too? You need to add \leanok in the ff item.

Doesn't the ff item already have \leanok? I see it in blueprint/src/chapter/ff.tex right after \lean{ff}.

@YaelDillies

Copy link
Copy Markdown
Owner

Oh sorry, I mean (the proof of) ap_in_ff

@YaelDillies YaelDillies changed the title feat: close finite-field almost-periodicity gap feat: make ap_in_ff sorry-free May 16, 2026
@YaelDillies
YaelDillies force-pushed the finitefield-ap-closure branch from fb40a16 to 1ee1cd4 Compare May 16, 2026 16:11
Comment thread APAP/Mathlib/Combinatorics/Additive/AP/Three/Defs.lean Outdated
@dannyply

Copy link
Copy Markdown
Contributor Author

Removed the local preimage lemma and rewrote the use through AddMonoidHomClass.isAddFreimanHom ... .threeAPFree.

Comment thread APAP.lean Outdated
@YaelDillies
YaelDillies force-pushed the finitefield-ap-closure branch 4 times, most recently from c63415a to 3221bf2 Compare June 10, 2026 08:09
@YaelDillies
YaelDillies force-pushed the finitefield-ap-closure branch 2 times, most recently from 68b3499 to 4b0f0e9 Compare June 10, 2026 09:54
@YaelDillies
YaelDillies force-pushed the finitefield-ap-closure branch 6 times, most recently from f079cd4 to 41f10d6 Compare June 14, 2026 09:45
Comment thread APAP/FiniteField.lean
@YaelDillies
YaelDillies force-pushed the finitefield-ap-closure branch from cb1b8a4 to b487e3c Compare June 18, 2026 11:08
@YaelDillies
YaelDillies force-pushed the finitefield-ap-closure branch from b487e3c to 6f3b62a Compare June 18, 2026 11:13
Comment thread APAP/FiniteField.lean

@YaelDillies YaelDillies 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.

Thank you very much!

@YaelDillies
YaelDillies enabled auto-merge (squash) June 28, 2026 18:30
@YaelDillies
YaelDillies merged commit 0c51122 into YaelDillies:master Jun 28, 2026
2 checks passed
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.

2 participants