Repository navigation
feat(RingTheory/RootsOfUnity): generalize Ideal.rootsOfUnityMapQuot to commutative rings #44588
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
Open
xroblot
wants to merge
7
commits into
leanprover-community:master
Choose a base branch
from
xroblot:rootsofunity-mapquot-general
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+132
−58
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c1f3544
1st commit
xroblot 53c9f54
clean up
xroblot 692905e
Merge remote-tracking branch 'upstream/master' into rootsofunity-mapq…
xroblot e7903c8
generalize
xroblot 8a4f748
fix
xroblot 7506495
Merge branch 'master' into rootsofunity-mapquot-general
xroblot af974e9
Merge branch 'master' into rootsofunity-mapquot-general
xroblot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| /- | ||
| Copyright (c) 2026 Xavier Roblot. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Xavier Roblot | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.RingTheory.Ideal.Norm.AbsNorm | ||
| public import Mathlib.RingTheory.RootsOfUnity.CyclotomicUnits | ||
|
|
||
| /-! | ||
| # Roots of unity in a quotient ring | ||
|
|
||
| For `I` an ideal of a commutative ring `R`, reduction modulo `I` sends the `n`-th roots of unity | ||
| of `R` to `n`-th roots of unity of `R ⧸ I`. | ||
|
|
||
| ## Main definitions and results | ||
|
|
||
| * `Ideal.rootsOfUnityMapQuot`: the group homomorphism from the `n`-th roots of unity of `R` to | ||
| `(R ⧸ I)ˣ` induced by the quotient map. | ||
|
|
||
| * `Ideal.rootsOfUnityMapQuot_injective_of_notMem`: if `R` is a domain and `(n : R) ∉ I`, then | ||
| the map `Ideal.rootsOfUnityMapQuot` is injective. | ||
|
|
||
| * `Ideal.rootsOfUnityMapQuot_injective`: if the absolute norm of `I` is different from `1` and | ||
| coprime with `n`, then the map `Ideal.rootsOfUnityMapQuot` is injective. | ||
|
|
||
| * `IsPrimitiveRoot.idealQuotient_mk`: if the absolute norm of `I` is different from `1` and | ||
| coprime with `n`, then the reduction modulo `I` of a primitive `n`-th root of unity is a | ||
| primitive `n`-th root of unity. | ||
|
|
||
| * `IsPrimitiveRoot.not_coprime_absNorm_of_mk_eq_one`: if a primitive `n`-th root of unity, with | ||
| `2 ≤ n`, is `1` modulo a proper ideal `I`, then the absolute norm of `I` is not coprime with `n`. | ||
|
|
||
| -/ | ||
|
|
||
| public section | ||
|
|
||
| variable {R : Type*} [CommRing R] (I : Ideal R) | ||
|
|
||
| namespace Ideal | ||
|
|
||
| /-- The group homomorphism from the `n`-th roots of unity of `R` to `(R ⧸ I)ˣ` induced by the | ||
| quotient map `R → R ⧸ I`. -/ | ||
| def rootsOfUnityMapQuot (n : ℕ) : rootsOfUnity n R →* (R ⧸ I)ˣ := | ||
| (rootsOfUnity n (R ⧸ I)).subtype.comp (restrictRootsOfUnity (Ideal.Quotient.mk I) n) | ||
|
|
||
| @[deprecated "use `rootsOfUnityMapQuot_coe_apply`" (since := "2026-10-07")] | ||
| theorem rootsOfUnityMapQuot_apply (n : ℕ) {x : Rˣ} (hx : x ∈ rootsOfUnity n R) : | ||
| rootsOfUnityMapQuot I n ⟨x, hx⟩ = Ideal.Quotient.mk I x := by rfl | ||
|
|
||
| @[simp] | ||
| theorem rootsOfUnityMapQuot_coe_apply (n : ℕ) (ζ : rootsOfUnity n R) : | ||
| (I.rootsOfUnityMapQuot n ζ : R ⧸ I) = Ideal.Quotient.mk I (ζ : Rˣ) := by | ||
| rfl | ||
|
|
||
| /-- If `R` is a domain and `(n : R) ∉ I`, then reduction modulo `I` is injective on the `n`-th | ||
| roots of unity. -/ | ||
| theorem rootsOfUnityMapQuot_injective_of_notMem [IsDomain R] {n : ℕ} (hn : (n : R) ∉ I) : | ||
| Function.Injective (I.rootsOfUnityMapQuot n) := by | ||
| refine (injective_iff_map_eq_one _).mpr fun ζ h ↦ ?_ | ||
| by_contra hζ | ||
| obtain ⟨c, hc⟩ := sub_one_dvd_natCast_of_pow_eq_one ((mem_rootsOfUnity' n _).mp ζ.prop) | ||
| (fun h₁ ↦ hζ (Subtype.ext (Units.ext h₁))) | ||
| refine hn (hc ▸ I.mul_mem_right c ?_) | ||
| rw [← Ideal.Quotient.eq_zero_iff_mem, map_sub, map_one, sub_eq_zero] | ||
| exact congr_arg Units.val h | ||
|
|
||
| end Ideal | ||
|
|
||
| section absNorm | ||
|
|
||
| variable [IsDedekindDomain R] {I} | ||
|
|
||
| namespace Ideal | ||
|
|
||
| /-- If the absolute norm of `I` is different from `1` and coprime with `n`, then reduction modulo | ||
| `I` is injective on the `n`-th roots of unity. -/ | ||
| theorem rootsOfUnityMapQuot_injective (n : ℕ) (hI₁ : absNorm I ≠ 1) | ||
| (hI₂ : (absNorm I).Coprime n) : | ||
| Function.Injective (rootsOfUnityMapQuot I n) := by | ||
| refine rootsOfUnityMapQuot_injective_of_notMem I fun hn ↦ hI₁ <| absNorm_eq_one_iff.mpr <| | ||
| I.eq_top_iff_one.mpr ?_ | ||
| obtain ⟨u, v, h⟩ := hI₂.cast (R := R) | ||
| exact h ▸ I.add_mem (I.mul_mem_left u (absNorm_mem I)) (I.mul_mem_left v hn) | ||
|
|
||
| theorem rootsOfUnityMapQuot_inj (n : ℕ) (hI₁ : absNorm I ≠ 1) | ||
| (hI₂ : (absNorm I).Coprime n) {x y : rootsOfUnity n R} : | ||
| rootsOfUnityMapQuot I n x = rootsOfUnityMapQuot I n y ↔ x = y := | ||
| (rootsOfUnityMapQuot_injective n hI₁ hI₂).eq_iff | ||
|
|
||
| end Ideal | ||
|
|
||
| /-- If the absolute norm of `I` is different from `1` and coprime with `n`, then the reduction | ||
| modulo `I` of a primitive `n`-th root of unity is a primitive `n`-th root of unity. -/ | ||
| theorem IsPrimitiveRoot.idealQuotient_mk {n : ℕ} {ζ : R} (hζ : IsPrimitiveRoot ζ n) | ||
| (hI₁ : Ideal.absNorm I ≠ 1) (hI₂ : (Ideal.absNorm I).Coprime n) : | ||
| IsPrimitiveRoot (Ideal.Quotient.mk I ζ) n := by | ||
| have : NeZero n := ⟨by | ||
| rintro rfl | ||
| exact hI₁ (Nat.coprime_zero_right _ |>.mp hI₂)⟩ | ||
| have h : IsPrimitiveRoot hζ.toRootsOfUnity n := | ||
| IsPrimitiveRoot.coe_submonoidClass_iff.mp <| IsPrimitiveRoot.coe_units_iff.mp hζ | ||
| simpa using IsPrimitiveRoot.coe_units_iff.mpr <| | ||
| h.map_of_injective <| Ideal.rootsOfUnityMapQuot_injective n hI₁ hI₂ | ||
|
|
||
| /-- If a primitive `n`-th root of unity, with `2 ≤ n`, is `1` modulo a proper ideal `I`, then the | ||
| absolute norm of `I` is not coprime with `n`. -/ | ||
| theorem IsPrimitiveRoot.not_coprime_absNorm_of_mk_eq_one {n : ℕ} {ζ : R} | ||
| (hζ : IsPrimitiveRoot ζ n) (hn : 2 ≤ n) (hI : Ideal.absNorm I ≠ 1) | ||
| (h : Ideal.Quotient.mk I ζ = 1) : ¬ (Ideal.absNorm I).Coprime n := fun hc ↦ | ||
| (hζ.idealQuotient_mk hI hc).ne_one hn h | ||
|
|
||
| end absNorm | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.