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/add_character): add file introducing additive characters #15499

Closed
wants to merge 7 commits into from

Conversation

MichaelStollBayreuth
Copy link
Collaborator

This adds a file that defines additive characters on commutative rings and proves some relevant properties, e.g., that on finite fields and rings of type zmod n, there exists a primitive additive character, and that the sum of the character values vanishes when the character is nontrivial. This will be used in a later PR (together with multiplicative characters) to define Gauss sums and prove some resuits on them.

There is a Zulip topic to discuss this.


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 18, 2022
Copy link
Member

@kbuzzard kbuzzard left a comment

Choose a reason for hiding this comment

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

I've only looked through about the first half, and golfed a couple of proofs; certainly this material should be in mathlib though.

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/add_character.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/add_character.lean Outdated Show resolved Hide resolved
@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 18, 2022
Copy link
Member

@kbuzzard kbuzzard left a comment

Choose a reason for hiding this comment

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

For me this PR raises an interesting question. My impression is that the community are not keen on adding the structure of maps f:A -> G such that f(a+b)=f(a)*f(b), because then we have to make an API for it, and how it composes with additive maps on one side and multiplicative maps on the other side, and then there are maps G -> A and etc etc. Another proposal is to define add_char so that it contains an application of of_add : R -> multiplicative R and then just write add_char.map_add : \psi (a + b) = \psi a * \psi b and a bit more API for it.

My position on this has come from a huge struggle I had in the past using with_top because it would often leak to option, and if you were working with with_top and with_bot then you didn't know whether none was bot or top. Being principled with types in statements of results goes a long way towards stopping this kind of leakage.

@MichaelStollBayreuth
Copy link
Collaborator Author

To add to @kbuzzard 's comment above, I find it quite painful to have to use multiplicative R →* R' instead of something like, say, R +→* R' and having to convert between R and multiplicative R via of_add and to_add. (And as one can see from Kevin's comments, I didn't manage to do it completely right...). If homomorphisms between additive and multiplicative structures also occur in some other places, it may be worth the effort of having dedicated type classes and API for them. Maybe there is a way of auto-generate them, something like a "left" or "right" version of to_additive?

Copy link
Member

@kbuzzard kbuzzard 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 looking great. I've now read all of the PR and have suggested the way to go if you want to avoid defeq abuse.

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/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/add_character.lean Outdated Show resolved Hide resolved
src/number_theory/legendre_symbol/add_character.lean Outdated Show resolved Hide resolved
@jcommelin
Copy link
Member

Please fix the spacing. After that, you can send the PR to the queue with bors merge.

bors d+

@bors
Copy link

bors bot commented Jul 23, 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.

@github-actions github-actions bot 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 Jul 23, 2022
@MichaelStollBayreuth
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Jul 23, 2022
…ng additive characters (#15499)

This adds a file that defines additive characters on commutative rings and proves some relevant properties, e.g., that on finite fields and rings of type `zmod n`, there exists a *primitive* additive character, and that the sum of the character values vanishes when the character is nontrivial. This will be used in a later PR (together with multiplicative characters) to define Gauss sums and prove some resuits on them.

There is a [Zulip topic](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Additive.20characters/near/290005886) to discuss this.
@bors
Copy link

bors bot commented Jul 23, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(number_theory/legendre_symbol/add_character): add file introducing additive characters [Merged by Bors] - feat(number_theory/legendre_symbol/add_character): add file introducing additive characters Jul 23, 2022
@bors bors bot closed this Jul 23, 2022
@bors bors bot deleted the add_character branch July 23, 2022 22:09
bottine pushed a commit to bottine/mathlib that referenced this pull request Jul 30, 2022
…ng additive characters (leanprover-community#15499)

This adds a file that defines additive characters on commutative rings and proves some relevant properties, e.g., that on finite fields and rings of type `zmod n`, there exists a *primitive* additive character, and that the sum of the character values vanishes when the character is nontrivial. This will be used in a later PR (together with multiplicative characters) to define Gauss sums and prove some resuits on them.

There is a [Zulip topic](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Additive.20characters/near/290005886) to discuss this.
robertylewis pushed a commit that referenced this pull request Aug 2, 2022
…ng additive characters (#15499)

This adds a file that defines additive characters on commutative rings and proves some relevant properties, e.g., that on finite fields and rings of type `zmod n`, there exists a *primitive* additive character, and that the sum of the character values vanishes when the character is nontrivial. This will be used in a later PR (together with multiplicative characters) to define Gauss sums and prove some resuits on them.

There is a [Zulip topic](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Additive.20characters/near/290005886) to discuss this.
khwilson pushed a commit that referenced this pull request Aug 2, 2022
…ng additive characters (#15499)

This adds a file that defines additive characters on commutative rings and proves some relevant properties, e.g., that on finite fields and rings of type `zmod n`, there exists a *primitive* additive character, and that the sum of the character values vanishes when the character is nontrivial. This will be used in a later PR (together with multiplicative characters) to define Gauss sums and prove some resuits on them.

There is a [Zulip topic](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Additive.20characters/near/290005886) to discuss this.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants