[Merged by Bors] - feat: Dirichlet character#7010
Conversation
|
This is part of a port of |
|
Is there a specific reason for not using |
|
Also, there is maybe some ambiguity as to what should be the correct definition of a "Dirichlet character mod n". |
I thought it makes sense to give it a separate name since there will be a few files on it. Also, I think |
I have at least 300-500 lines of code (in the folder |
|
This PR/issue depends on:
|
It certainly makes sense to give it a separate name. What I mean is why not define it as @[reducible] def DirichletCharacter (R : Type) [CommMonoidWithZero R] (n : ℕ) := MulChar (ZMod n) Rinstead? The rationale being that in many (most?) applications, you also want to evaluate the characters at non-units. (And, of course, that there is already an API for |
After some consideration, I think it is best to use |
If you look at the following : https://github.com/laughinggas/p-adic-L-functions/blob/88c5750b71f90ae9a9964968f4eabcb994d6d279/src/dirichlet_character/basic.lean#L54 , I think the definition of |
|
Defining it as |
|
OK; I guess the one reason why you want to work with homomorphisms on the unit group is that this gives you the correct notion of changing the level. I would suggest using the def ZMod.unitsMap {n m : ℕ} (hm : n ∣ m) : (ZMod m)ˣ →* (ZMod n)ˣ := Units.map (ZMod.castHom hm (ZMod n))
@[reducible]
def DirichletCharacter (R : Type) [CommMonoidWithZero R] (n : ℕ) := MulChar (ZMod n) R
namespace DirichletCharacter
noncomputable def change_level {R : Type} [CommMonoidWithZero R] {n m : ℕ} (hm : n ∣ m) :
DirichletCharacter R n →* DirichletCharacter R m :=
{ toFun := fun ψ ↦ MulChar.ofUnitHom (ψ.toUnitHom.comp (ZMod.unitsMap hm)),
map_one' := by ext; simp,
map_mul' := fun ψ₁ ψ₂ ↦ by ext; simp }(I was working on that while you were already answering; this refers to the earlier point. |
|
|
@MichaelStollBayreuth I can change the definition to be the following : Your help is much appreciated, thank you! |
Co-authored-by: Alex J Best <alex.j.best@gmail.com>
Co-authored-by: Alex J Best <alex.j.best@gmail.com>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
|
@MichaelStollBayreuth Do you think this can be merged now? |
Yes. |
|
One small comment about using the API for periodic but LGTM, thanks! bors d+ |
|
✌️ mo271 can now approve this pull request. To approve and merge a pull request, simply reply with |
|
bors r+ |
- [x] depends on: #7013 Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: laughinggas <58670661+laughinggas@users.noreply.github.com>
|
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
- [x] depends on: #7013 Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: laughinggas <58670661+laughinggas@users.noreply.github.com>


Uh oh!
There was an error while loading. Please reload this page.