File size: 3,623 Bytes
b797a5b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | import Mathlib
namespace OAI
namespace PiExponent.HomogeneousSubmoduleGrading
noncomputable section
open DirectSum
variable {R M σM : Type*} [Ring R] [AddCommGroup M] [Module R M]
[SetLike σM M] [AddSubgroupClass σM M]
(𝓜 : ℤ → σM) [DirectSum.Decomposition 𝓜]
(K : Submodule R M) (hK : K.IsHomogeneous 𝓜)
def piece (_hK : K.IsHomogeneous 𝓜) (d : ℤ) : AddSubgroup K where
carrier := {m | (m : M) ∈ 𝓜 d}
zero_mem' := zero_mem _
add_mem' := fun hm hn => add_mem hm hn
neg_mem' := fun hm => neg_mem hm
def component (m : K) (d : ℤ) : piece 𝓜 K hK d :=
⟨⟨DirectSum.decompose 𝓜 (m : M) d, hK d m.property⟩,
(DirectSum.decompose 𝓜 (m : M) d).property⟩
def decompositionMap : K →+ ⨁ d, piece 𝓜 K hK d where
toFun m := by
classical
exact DFinsupp.mk' (component 𝓜 K hK m) (Trunc.mk
⟨(DirectSum.decompose 𝓜 (m : M)).support.val, fun d => by
classical
by_cases hd : d ∈ (DirectSum.decompose 𝓜 (m : M)).support
· exact Or.inl hd
· right
apply Subtype.ext
apply Subtype.ext
change (DirectSum.decompose 𝓜 (m : M) d : M) = 0
rw [DFinsupp.notMem_support_iff.mp hd]
rfl⟩)
map_zero' := by
ext d
change (DirectSum.decompose 𝓜 (0 : M) d : M) = 0
rw [DirectSum.decompose_zero]
rfl
map_add' m n := by
ext d
change (DirectSum.decompose 𝓜 ((m : M) + (n : M)) d : M) =
(DirectSum.decompose 𝓜 (m : M) d : M) + (DirectSum.decompose 𝓜 (n : M) d : M)
rw [DirectSum.decompose_add]
rfl
@[simp] theorem decompositionMap_apply (m : K) (d : ℤ) :
(((decompositionMap 𝓜 K hK m) d : K) : M) =
(DirectSum.decompose 𝓜 (m : M) d : M) := rfl
theorem decompositionMap_injective : Function.Injective (decompositionMap 𝓜 K hK) := by
intro m n h
apply Subtype.ext
apply (DirectSum.decompose 𝓜).injective
ext d
exact congrArg (fun z : ⨁ d, piece 𝓜 K hK d => ((z d : K) : M)) h
theorem decompositionMap_homogeneous (d : ℤ) (m : piece 𝓜 K hK d) :
decompositionMap 𝓜 K hK m.val = DirectSum.of (fun d => piece 𝓜 K hK d) d m := by
classical
ext e
by_cases he : d = e
· subst e
rw [DirectSum.of_eq_same]
exact DirectSum.decompose_of_mem_same 𝓜 m.property
· rw [DirectSum.of_eq_of_ne _ _ _ (Ne.symm he)]
exact DirectSum.decompose_of_mem_ne 𝓜 m.property he
instance decomposition : DirectSum.Decomposition (piece 𝓜 K hK) := by
classical
have hr : (decompositionMap 𝓜 K hK).comp (DirectSum.coeAddMonoidHom (piece 𝓜 K hK)) =
AddMonoidHom.id _ := by
apply DirectSum.addHom_ext
intro d m
simp only [AddMonoidHom.comp_apply, DirectSum.coeAddMonoidHom_of,
AddMonoidHom.id_apply, decompositionMap_homogeneous]
apply DirectSum.Decomposition.ofAddHom (piece 𝓜 K hK) (decompositionMap 𝓜 K hK) ?_ hr
apply AddMonoidHom.ext
intro m
apply decompositionMap_injective 𝓜 K hK
exact DFunLike.congr_fun hr (decompositionMap 𝓜 K hK m)
theorem subtype_degree_compatible (d : ℤ) (m : K) :
K.subtype (DirectSum.decompose (piece 𝓜 K hK) m d : K) =
(DirectSum.decompose 𝓜 (K.subtype m) d : M) := rfl
variable {σR : Type*} [SetLike σR R] [AddSubgroupClass σR R]
(𝒜 : ℤ → σR) [SetLike.GradedSMul 𝒜 𝓜]
instance gradedSMul : SetLike.GradedSMul 𝒜 (piece 𝓜 K hK) where
smul_mem := by
intro i d a m ha hm
change a • (m : M) ∈ 𝓜 (i + d)
exact SetLike.GradedSMul.smul_mem ha (show (m : M) ∈ 𝓜 d from hm)
end
end PiExponent.HomogeneousSubmoduleGrading
end OAI
|