Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(number_theory/legendre_symbol/gauss_sum): add file gauss_sum.lean #15684

Closed
wants to merge 15 commits into from

Conversation

MichaelStollBayreuth
Copy link
Collaborator

@MichaelStollBayreuth MichaelStollBayreuth commented Jul 26, 2022

This adds a file to the number_theory/legendre_symbol directory. It defines the Gauss sum of a multiplicative and an additive character on a finite commutative ring with values in another commutative ring and proves some statements about them. This will lead to a new proof of Quadratic Reciprocity (including the second supplementary law).

For comments/discussion, use this Zulip topic.


Open in Gitpod

@MichaelStollBayreuth MichaelStollBayreuth added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. labels Jul 26, 2022
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jul 26, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Jul 26, 2022
@MichaelStollBayreuth MichaelStollBayreuth added the t-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Jul 26, 2022
@MichaelStollBayreuth MichaelStollBayreuth added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jul 26, 2022
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jul 27, 2022
@MichaelStollBayreuth MichaelStollBayreuth added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jul 28, 2022
Copy link
Collaborator

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

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

Here are just some stylistic comments; I plan to take a look at the proofs later today.

src/number_theory/legendre_symbol/add_character.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/add_character.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/add_character.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
@alreadydone
Copy link
Collaborator

@alreadydone
Copy link
Collaborator

alreadydone commented Jul 31, 2022

Alright I've finished golfing the last proof and now it takes < 7 seconds on my machine. An observation is that using exact_mod_cast to prove ((8 : ℕ) : F) = (8 : F) almost takes two more seconds than norm_num. Another thing I did is extracting the lemma algebra.ring_char_eq. I'm regretful that I'm unable to golf this simp only; it's almost defeq but the numerals differ by an int_cast.
Please let me know if you think some changes are not good; otherwise feel free to merge.

@MichaelStollBayreuth
Copy link
Collaborator Author

Thanks! I had noticed that the long last proof took a while.
I have moved the second helper lemma to add_character.lean and made it public (and renamed it).
I've left the first one private for now.

Copy link
Collaborator

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

This is now converging rapidly. Thanks @MichaelStollBayreuth for the PR.

Thanks @alreadydone for the review.

src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Mini-minor comments. You can merge this after addressing them.

bors d+

src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/gauss_sum.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Aug 2, 2022

✌️ MichaelStollBayreuth can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Aug 2, 2022
@MichaelStollBayreuth
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Aug 2, 2022
#15684)

This adds a file to the number_theory/legendre_symbol directory. It defines the Gauss sum of a multiplicative and an additive character on a finite commutative ring with values in another commutative ring and proves some statements about them. This will lead to a new proof of Quadratic Reciprocity (including the second supplementary law).

For comments/discussion, use this [Zulip topic](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Gauss.20sums/near/290844370).
@bors
Copy link

bors bot commented Aug 2, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(number_theory/legendre_symbol/gauss_sum): add file gauss_sum.lean [Merged by Bors] - feat(number_theory/legendre_symbol/gauss_sum): add file gauss_sum.lean Aug 2, 2022
@bors bors bot closed this Aug 2, 2022
@bors bors bot deleted the gauss_sum branch August 2, 2022 17:04
khwilson pushed a commit that referenced this pull request Aug 2, 2022
#15684)

This adds a file to the number_theory/legendre_symbol directory. It defines the Gauss sum of a multiplicative and an additive character on a finite commutative ring with values in another commutative ring and proves some statements about them. This will lead to a new proof of Quadratic Reciprocity (including the second supplementary law).

For comments/discussion, use this [Zulip topic](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Gauss.20sums/near/290844370).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. t-number-theory Number theory (also use t-algebra or t-analysis to specialize)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants