-
Notifications
You must be signed in to change notification settings - Fork 297
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
Conversation
…ng additive characters
There was a problem hiding this 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.
There was a problem hiding this 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.
To add to @kbuzzard 's comment above, I find it quite painful to have to use |
There was a problem hiding this 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.
Please fix the spacing. After that, you can send the PR to the queue with bors d+ |
✌️ MichaelStollBayreuth can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
…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.
Pull request successfully merged into master. Build succeeded: |
…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.
…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.
…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.
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.