Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(algebra/module/graded_module): define graded module #14582

Closed
wants to merge 59 commits into from
Closed
Changes from 3 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
bddc2b0
initial
jjaassoonn Jun 6, 2022
6bd3b77
add doc
jjaassoonn Jun 6, 2022
b04fba3
remove lint
jjaassoonn Jun 6, 2022
b6f2bc9
feat(algebra/direct_sum/decomposition): add decompositions into a dir…
eric-wieser Jun 8, 2022
ba0c574
fix
eric-wieser Jun 8, 2022
0af1d71
lintfix
eric-wieser Jun 8, 2022
15a6372
fix test
eric-wieser Jun 8, 2022
29bcddd
Merge remote-tracking branch 'origin/eric-wieser/direct_sum.decomposi…
jjaassoonn Jun 9, 2022
4de1862
changed to new spelling
jjaassoonn Jun 9, 2022
7726a85
fix
jjaassoonn Jun 9, 2022
1b9bc96
remove graded_algebra.support
eric-wieser Jun 9, 2022
ebe4954
Fix lemma names
eric-wieser Jun 9, 2022
4f5d570
Fix
eric-wieser Jun 9, 2022
82f500a
Fix build errors
eric-wieser Jun 9, 2022
4736ecb
fix
jjaassoonn Jun 10, 2022
e413028
Merge remote-tracking branch 'origin/eric-wieser/direct_sum.decomposi…
jjaassoonn Jun 10, 2022
450579d
golf
eric-wieser Jun 13, 2022
15fb006
Merge remote-tracking branch 'origin/eric-wieser/direct_sum.decomposi…
jjaassoonn Jun 13, 2022
ec5ab40
Merge remote-tracking branch 'origin/master' into jjaassoonn/graded_m…
jjaassoonn Jun 16, 2022
7f50d4e
add linear_equiv
jjaassoonn Jun 17, 2022
462a917
add set_like.has_graded_smul
jjaassoonn Jun 17, 2022
ada7201
fix
jjaassoonn Jun 17, 2022
310a4ef
delete outdated doc
jjaassoonn Jun 17, 2022
981974e
add graded_monoid.ghas_scalar
jjaassoonn Jun 20, 2022
4eebabe
change
jjaassoonn Jun 20, 2022
0f48edb
change
jjaassoonn Jun 20, 2022
ba774d7
golf
jjaassoonn Jun 20, 2022
0d2bcd1
update docs
jjaassoonn Jun 20, 2022
c14c5c3
add doc
jjaassoonn Jun 21, 2022
fb5e93f
minor golf
jjaassoonn Jun 21, 2022
7a9805d
less @symbol
jjaassoonn Jun 21, 2022
476a52a
less @symbol
jjaassoonn Jun 21, 2022
46e5e99
Merge remote-tracking branch 'origin/master' into jjaassoonn/graded_m…
jjaassoonn Jun 30, 2022
0a8b5d8
generalize
jjaassoonn Jun 30, 2022
922dc35
change according to Eric
jjaassoonn Jun 30, 2022
d1d9308
Merge remote-tracking branch 'origin/master' into jjaassoonn/graded_m…
jjaassoonn Jul 23, 2022
dee0aa3
apply suggestion from code review @eric-wieser
jjaassoonn Jul 23, 2022
7de7405
golf
jjaassoonn Jul 23, 2022
b991037
fix
jjaassoonn Jul 23, 2022
6d8a403
fix
jjaassoonn Jul 23, 2022
7b4bffa
fix
jjaassoonn Jul 24, 2022
73745db
apply golf by @eric-wieser
jjaassoonn Jul 24, 2022
da5af6c
fix linter error
jjaassoonn Aug 15, 2022
2223d5f
Merge remote-tracking branch 'origin/master' into jjaassoonn/graded_m…
jjaassoonn Sep 7, 2022
c351bec
Apply suggestions from code review
jjaassoonn Sep 7, 2022
98a371c
Update src/algebra/graded_monoid.lean
jjaassoonn Sep 7, 2022
725ff2b
Update src/algebra/module/graded_module.lean
jjaassoonn Sep 7, 2022
891ebc9
add `gmul_action`
jjaassoonn Sep 7, 2022
bef9480
add `gmul_action`
jjaassoonn Sep 7, 2022
eef2a7b
fix
jjaassoonn Sep 8, 2022
953ee50
unused argument fix
jjaassoonn Sep 8, 2022
c8dea65
Add some docstrings, move around definitions
eric-wieser Jan 18, 2023
83e0eb0
Split a file
eric-wieser Jan 18, 2023
b1843bb
Merge remote-tracking branch 'origin/master' into jjaassoonn/graded_m…
eric-wieser Jan 18, 2023
ba994c5
fixes
alreadydone Jan 22, 2023
7c530de
Merge remote-tracking branch 'origin/master' into jyxu/graded_module
alreadydone Jan 22, 2023
71d4efd
address reviews
alreadydone Jan 22, 2023
798afc3
remove alias of set_like.has_graded_smul.smul_mem
alreadydone Jan 22, 2023
7e1ac31
Merge remote-tracking branch 'origin/master' into jyxu/graded_module
alreadydone Jan 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions src/algebra/module/graded_module.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/-
Copyright (c) 2022 Jujian Zhang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jujian Zhang
-/

import ring_theory.graded_algebra.basic

/-!
# Graded Module

Given a graded `R`-algebra `A` with grading `𝓐 : ι → submodule R A` and an `A`-module `M` with
decomposition `ι → addsubmonoid M`,
jjaassoonn marked this conversation as resolved.
Show resolved Hide resolved
we define the typeclass `graded_module 𝓐 𝓜` for internally graded modules.

## Main definitions

* `graded_module 𝓐 𝓜`: an `A`-module `M` is graded by `𝓜` if and only if the decomposition map
`M → ⨁ i, 𝓜 i` is inverse to the canonical map `⨁ i, 𝓜 i → M`.
* `graded_module.decompose`: `M` and `⨁ i, 𝓜 i` are isomorphic as `add_comm_monoid`.
* `graded_module.is_module`: `⨁ i, 𝓜 i` is an `A`-module.

## Tags

graded module
-/


open_locale direct_sum big_operators

variables {ι R A : Type*}
variables [decidable_eq ι] [add_monoid ι] [comm_semiring R] [semiring A] [algebra R A]
variables (𝓐 : ι → submodule R A) [graded_algebra 𝓐]
variables {M : Type*} [add_comm_monoid M] [module A M]
variables (𝓜 : ι → add_submonoid M)
jjaassoonn marked this conversation as resolved.
Show resolved Hide resolved

/--
Given a graded `R`-algebra `A` graded by `𝓐 : ι → submodule R A` and a decomposition of `A`-module
`M` into `𝓜 : ι → add_submonoid M`, we say that `M` is graded by `𝓜` if and only if the
decomposition map `M → ⨁ i, 𝓜 i` is inverse to the canonical map `⨁ i, 𝓜 i → M`.
-/
class graded_module :=
(decompose' : M → ⨁ i, 𝓜 i)
(left_inv : function.left_inverse decompose' (direct_sum.coe_add_monoid_hom 𝓜))
(right_inv : function.right_inverse decompose' (direct_sum.coe_add_monoid_hom 𝓜))
jjaassoonn marked this conversation as resolved.
Show resolved Hide resolved
(smul_mem : ∀ ⦃i j : ι⦄ {a : A} {m : M} (hi : a ∈ 𝓐 i) (hj : m ∈ 𝓜 j), a • m ∈ 𝓜 (i + j))
eric-wieser marked this conversation as resolved.
Show resolved Hide resolved

namespace graded_module

variables [graded_module 𝓐 𝓜]

protected lemma is_internal : direct_sum.is_internal 𝓜 :=
{ left := (@graded_module.left_inv ι R A _ _ _ _ _ 𝓐 _ M _ _ 𝓜 _).injective,
right := (@graded_module.right_inv ι R A _ _ _ _ _ 𝓐 _ M _ _ 𝓜 _).surjective }

/--
If `M` is graded by `𝓜`, then `M` is isomorphic to `⨁ i, 𝓜 i` as `add_comm_monoid`.
-/
def decompose : M ≃+ ⨁ i, 𝓜 i := add_equiv.symm
{ to_fun := direct_sum.coe_add_monoid_hom 𝓜,
inv_fun := graded_module.decompose' 𝓐,
left_inv := graded_module.left_inv,
right_inv := graded_module.right_inv,
map_add' := λ x y, by rw map_add }

@[simp] lemma decompose_symm_of {i : ι} (x : 𝓜 i) :
(graded_module.decompose 𝓐 𝓜).symm (direct_sum.of _ i x) = x :=
direct_sum.coe_add_monoid_hom_of _ _ _

instance self : graded_module 𝓐 (λ i, (𝓐 i).to_add_submonoid) :=
jjaassoonn marked this conversation as resolved.
Show resolved Hide resolved
{ decompose' := graded_algebra.decompose 𝓐,
left_inv := graded_algebra.left_inv,
right_inv := graded_algebra.right_inv,
smul_mem := λ i j x y hi hj, set_like.graded_monoid.mul_mem hi hj }

@[simp] lemma decompose_coe {i : ι} (x : 𝓜 i) :
graded_module.decompose 𝓐 𝓜 x = direct_sum.of _ i x :=
by rw [← decompose_symm_of 𝓐 𝓜, add_equiv.apply_symm_apply]

lemma decompose_of_mem {x : M} {i : ι} (hx : x ∈ 𝓜 i) :
graded_module.decompose 𝓐 𝓜 x = direct_sum.of _ i (⟨x, hx⟩ : 𝓜 i) :=
graded_module.decompose_coe _ _ ⟨x, hx⟩

lemma decompose_of_mem_ne {x : M} {i j : ι} (hx : x ∈ 𝓜 i) (hij : i ≠ j):
(graded_module.decompose 𝓐 𝓜 x j : M) = 0 :=
by rw [decompose_of_mem _ _ hx, direct_sum.of_eq_of_ne _ _ _ _ hij, add_submonoid.coe_zero]

/--
`⨁ i, 𝓜 i` is also an `A`-module, via `a • z = decompose (a • redecompose z)` where `decompose` and
`recompose` are the cannonical homomorphism `M → ⨁ i, 𝓜 i` and `⨁ i, 𝓜 i → M`.
-/
def is_module : module A (⨁ i, 𝓜 i) :=
{ smul := λ a z, graded_module.decompose 𝓐 𝓜 (a • (graded_module.decompose 𝓐 𝓜).symm z),
one_smul := λ b, begin
change graded_module.decompose 𝓐 𝓜 _ = _,
rw [one_smul, add_equiv.apply_symm_apply],
end,
mul_smul := λ x y z, begin
have m : ∀ x, x ∈ supr 𝓐,
from λ x, (graded_algebra.is_internal 𝓐).submodule_supr_eq_top.symm ▸ submodule.mem_top,
change graded_module.decompose _ _ _ = graded_module.decompose _ _ _,
rw [mul_smul],
refine submodule.supr_induction 𝓐 (m x) _ _ _,
{ intros j a hj,
refine submodule.supr_induction 𝓐 (m y) _ _ _,
{ intros j' b hj',
unfold has_scalar.smul,
rw add_equiv.symm_apply_apply, },
{ unfold has_scalar.smul,
simp only [zero_smul, map_zero, smul_zero], },
{ unfold has_scalar.smul,
intros b c hb hc,
simp only [smul_add, add_smul, hb, hc, map_add], }, },
{ simp only [smul_zero, zero_smul, map_zero], },
{ intros b c hb hc,
simp only [add_smul, smul_add, hb, hc, map_add], }

end,
smul_add := λ x y z, begin
change graded_module.decompose _ _ _ = _,
simp only [smul_add, map_add],
end,
smul_zero := λ r, begin
change graded_module.decompose _ _ _ = _,
simp only [map_zero, smul_zero],
end,
add_smul := λ x y z, begin
change graded_module.decompose _ _ _ = _,
simp only [add_smul, map_add],
end,
zero_smul := λ a, begin
change graded_module.decompose _ _ _ = _,
simp only [map_zero, zero_smul],
end }

end graded_module