|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Kenny Lau. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Kenny Lau |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.RingTheory.GradedAlgebra.Homogeneous.Ideal |
| 9 | +public import Mathlib.RingTheory.GradedAlgebra.RingHom |
| 10 | + |
| 11 | +/-! |
| 12 | +# Maps on homogeneous ideals |
| 13 | +
|
| 14 | +In this file we define `HomogeneousIdeal.map` and `HomogeneousIdeal.comap`. |
| 15 | +-/ |
| 16 | + |
| 17 | +@[expose] public section |
| 18 | + |
| 19 | +variable {A B C Ο Ο Ο ΞΉ F G : Type*} |
| 20 | + [Semiring A] [Semiring B] [Semiring C] |
| 21 | + [SetLike Ο A] [SetLike Ο B] [SetLike Ο C] |
| 22 | + [AddSubmonoidClass Ο A] [AddSubmonoidClass Ο B] [AddSubmonoidClass Ο C] |
| 23 | + [DecidableEq ΞΉ] [AddMonoid ΞΉ] |
| 24 | + {π : ΞΉ β Ο} {β¬ : ΞΉ β Ο} {π : ΞΉ β Ο} |
| 25 | + [GradedRing π] [GradedRing β¬] [GradedRing π] |
| 26 | + (f : π β+*α΅ β¬) (g : β¬ β+*α΅ π) |
| 27 | + |
| 28 | +namespace HomogeneousIdeal |
| 29 | + |
| 30 | +/-- Map a homogeneous ideal along a graded ring homomorphism. The underlying ideal is |
| 31 | +(definitionally) equal to `Ideal.map`. -/ |
| 32 | +def map (I : HomogeneousIdeal π) : HomogeneousIdeal β¬ where |
| 33 | + __ := I.toIdeal.map f |
| 34 | + is_homogeneous' i b hb := by |
| 35 | + rw [Ideal.map] at hb |
| 36 | + induction hb using Submodule.span_induction generalizing i with |
| 37 | + | zero => simp |
| 38 | + | add => simp [*, Ideal.add_mem] |
| 39 | + | mem a ha => |
| 40 | + obtain β¨a, ha, rflβ© := ha |
| 41 | + rw [β f.map_directSumDecompose] |
| 42 | + exact Ideal.mem_map_of_mem _ (I.2 _ ha) |
| 43 | + | smul aβ aβ haβ ih => |
| 44 | + classical rw [smul_eq_mul, DirectSum.decompose_mul, DirectSum.coe_mul_apply] |
| 45 | + exact sum_mem fun ij hij β¦ Ideal.mul_mem_left _ _ <| ih _ |
| 46 | + |
| 47 | +/-- Pull back a homogeneous ideal along a graded ring homomorphism. |
| 48 | +The underlying ideal is (definitionally) equal to `Ideal.comap`, whose underlying set is |
| 49 | +definitionally equal to the preimage. -/ |
| 50 | +def comap (I : HomogeneousIdeal β¬) : HomogeneousIdeal π where |
| 51 | + __ := I.toIdeal.comap f |
| 52 | + is_homogeneous' n a ha := by |
| 53 | + rw [Ideal.mem_comap, HomogeneousIdeal.mem_iff, f.map_directSumDecompose] |
| 54 | + exact I.2 _ ha |
| 55 | + |
| 56 | +variable {I Iβ Iβ Iβ : HomogeneousIdeal π} {J Jβ Jβ Jβ : HomogeneousIdeal β¬} |
| 57 | + {K : HomogeneousIdeal π} |
| 58 | + |
| 59 | +lemma map_le_iff_le_comap : I.map f β€ J β I β€ J.comap f := Ideal.map_le_iff_le_comap |
| 60 | + |
| 61 | +alias β¨le_comap_of_map_le, map_le_of_le_comapβ© := map_le_iff_le_comap |
| 62 | + |
| 63 | +theorem gc_map_comap : GaloisConnection (map f) (comap f) := fun _ _ β¦ |
| 64 | + map_le_iff_le_comap f |
| 65 | + |
| 66 | +@[mono, aesop safe apply] lemma map_mono : Monotone (map f) := (gc_map_comap f).monotone_l |
| 67 | + |
| 68 | +@[mono] lemma comap_mono : Monotone (comap f) := (gc_map_comap f).monotone_u |
| 69 | + |
| 70 | +@[simp] lemma toIdeal_comap : (J.comap f).toIdeal = J.toIdeal.comap f := rfl |
| 71 | + |
| 72 | +@[simp] lemma coe_comap : J.comap f = f β»ΒΉ' J := rfl |
| 73 | + |
| 74 | +@[simp] lemma toIdeal_map : (I.map f).toIdeal = I.toIdeal.map f := rfl |
| 75 | + |
| 76 | +instance isPrime_comap [J.toIdeal.IsPrime] : (J.comap f).toIdeal.IsPrime := |
| 77 | + inferInstanceAs (J.toIdeal.comap f).IsPrime -- this shows that the simpNF already has the instance |
| 78 | + |
| 79 | +@[simp] lemma map_id : I.map (GradedRingHom.id π) = I := ext <| Ideal.map_id _ |
| 80 | + |
| 81 | +lemma map_map : (I.map f).map g = I.map (g.comp f) := ext <| Ideal.map_map _ _ |
| 82 | + |
| 83 | +lemma map_comp : I.map (g.comp f) = (I.map f).map g := (map_map f g).symm |
| 84 | + |
| 85 | +@[simp] lemma comap_id : I.comap (GradedRingHom.id π) = I := rfl |
| 86 | + |
| 87 | +lemma comap_comap : (K.comap g).comap f = K.comap (g.comp f) := rfl |
| 88 | + |
| 89 | +end HomogeneousIdeal |
0 commit comments