|
| 1 | +/- |
| 2 | +Copyright (c) 2024 Yakov Pechersky. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Yakov Pechersky |
| 5 | +-/ |
| 6 | +import Mathlib.LinearAlgebra.Isomorphisms |
| 7 | +import Mathlib.RingTheory.Ideal.Operations |
| 8 | +import Mathlib.RingTheory.Ideal.Quotient |
| 9 | + |
| 10 | +/-! |
| 11 | +# Quotients of powers of principal ideals |
| 12 | +
|
| 13 | +This file deals with taking quotients of powers of principal ideals. |
| 14 | +
|
| 15 | +## Main definitions and results |
| 16 | +
|
| 17 | +* `Ideal.quotEquivPowQuotPowSucc`: for a principal ideal `I`, `R ⧸ I ≃ₗ[R] I ^ n ⧸ I ^ (n + 1)` |
| 18 | +
|
| 19 | +## Implementation details |
| 20 | +
|
| 21 | +At site of usage, calling `LinearEquiv.toEquiv` can cause timeouts in the search for a complex |
| 22 | +synthesis like `Module 𝒪[K] 𝓀[k]`, so the plain equiv versions are provided. |
| 23 | +
|
| 24 | +These equivs are defined here as opposed to in the quotients file since they cannot be |
| 25 | +formed as ring equivs. |
| 26 | +
|
| 27 | +-/ |
| 28 | + |
| 29 | + |
| 30 | +namespace Ideal |
| 31 | + |
| 32 | +section IsPrincipal |
| 33 | + |
| 34 | +variable {R : Type*} [CommRing R] [IsDomain R] {I : Ideal R} |
| 35 | + |
| 36 | +/-- For a principal ideal `I`, `R ⧸ I ≃ₗ[R] I ^ n ⧸ I ^ (n + 1)`. To convert into a form |
| 37 | +that uses the ideal of `R ⧸ I ^ (n + 1)`, compose with |
| 38 | +`Ideal.powQuotPowSuccLinearEquivMapMkPowSuccPow`. -/ |
| 39 | +noncomputable |
| 40 | +def quotEquivPowQuotPowSucc (h : I.IsPrincipal) (h': I ≠ ⊥) (n : ℕ) : |
| 41 | + (R ⧸ I) ≃ₗ[R] (I ^ n : Ideal R) ⧸ (I • ⊤ : Submodule R (I ^ n : Ideal R)) := by |
| 42 | + let f : (I ^ n : Ideal R) →ₗ[R] (I ^ n : Ideal R) ⧸ (I • ⊤ : Submodule R (I ^ n : Ideal R)) := |
| 43 | + Submodule.mkQ _ |
| 44 | + let ϖ := h.principal'.choose |
| 45 | + have hI : I = Ideal.span {ϖ} := h.principal'.choose_spec |
| 46 | + have hϖ : ϖ ^ n ∈ I ^ n := hI ▸ (Ideal.pow_mem_pow (Ideal.mem_span_singleton_self _) n) |
| 47 | + let g : R →ₗ[R] (I ^ n : Ideal R) := (LinearMap.mulRight R ϖ^n).codRestrict _ fun x ↦ by |
| 48 | + simp only [LinearMap.pow_mulRight, LinearMap.mulRight_apply, Ideal.submodule_span_eq] |
| 49 | + -- TODO: change argument of Ideal.pow_mem_of_mem |
| 50 | + exact Ideal.mul_mem_left _ _ hϖ |
| 51 | + have : I = LinearMap.ker (f.comp g) := by |
| 52 | + ext x |
| 53 | + simp only [LinearMap.codRestrict, LinearMap.pow_mulRight, LinearMap.mulRight_apply, |
| 54 | + LinearMap.mem_ker, LinearMap.coe_comp, LinearMap.coe_mk, AddHom.coe_mk, Function.comp_apply, |
| 55 | + Submodule.mkQ_apply, Submodule.Quotient.mk_eq_zero, Submodule.mem_smul_top_iff, smul_eq_mul, |
| 56 | + f, g] |
| 57 | + constructor <;> intro hx |
| 58 | + · exact Submodule.mul_mem_mul hx hϖ |
| 59 | + · rw [← pow_succ', hI, Ideal.span_singleton_pow, Ideal.mem_span_singleton] at hx |
| 60 | + obtain ⟨y, hy⟩ := hx |
| 61 | + rw [mul_comm, pow_succ, mul_assoc, mul_right_inj' (pow_ne_zero _ _)] at hy |
| 62 | + · rw [hI, Ideal.mem_span_singleton] |
| 63 | + exact ⟨y, hy⟩ |
| 64 | + · contrapose! h' |
| 65 | + rw [hI, h', Ideal.span_singleton_eq_bot] |
| 66 | + let e : (R ⧸ I) ≃ₗ[R] R ⧸ (LinearMap.ker (f.comp g)) := |
| 67 | + Submodule.quotEquivOfEq I (LinearMap.ker (f ∘ₗ g)) this |
| 68 | + refine e.trans ((f.comp g).quotKerEquivOfSurjective ?_) |
| 69 | + refine (Submodule.mkQ_surjective _).comp ?_ |
| 70 | + rintro ⟨x, hx⟩ |
| 71 | + rw [hI, Ideal.span_singleton_pow, Ideal.mem_span_singleton] at hx |
| 72 | + refine hx.imp ?_ |
| 73 | + simp [g, LinearMap.codRestrict, eq_comm, mul_comm] |
| 74 | + |
| 75 | +/-- For a principal ideal `I`, `R ⧸ I ≃ I ^ n ⧸ I ^ (n + 1)`. Supplied as a plain equiv to bypass |
| 76 | +typeclass synthesis issues on complex `Module` goals. To convert into a form |
| 77 | +that uses the ideal of `R ⧸ I ^ (n + 1)`, compose with |
| 78 | +`Ideal.powQuotPowSuccEquivMapMkPowSuccPow`. -/ |
| 79 | +noncomputable |
| 80 | +def quotEquivPowQuotPowSuccEquiv (h : I.IsPrincipal) (h': I ≠ ⊥) (n : ℕ) : |
| 81 | + (R ⧸ I) ≃ (I ^ n : Ideal R) ⧸ (I • ⊤ : Submodule R (I ^ n : Ideal R)) := |
| 82 | + quotEquivPowQuotPowSucc h h' n |
| 83 | + |
| 84 | +end IsPrincipal |
| 85 | + |
| 86 | +end Ideal |
0 commit comments