Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzw12345 committed Feb 25, 2025
1 parent 6e651dc commit 0dcce80
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Mathlib/Algebra/DirectSum/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ section map
variable {ι : Type*} [DecidableEq ι] {α : ι → Type*} {β : ι → Type*} [∀ i, AddCommMonoid (α i)]
variable [∀ i, AddCommMonoid (β i)] (f : ∀(i : ι), α i →+ β i)

/-- create a homomorphism from `⨁ i, α i` to `⨁ i, β i` by giving the component-wise map `f`. -/
def map : (⨁ i, α i) →+ ⨁ i, β i :=
DirectSum.toAddMonoid (fun i : ι ↦ (of β i).comp (f i))

Expand Down
5 changes: 5 additions & 0 deletions Mathlib/RingTheory/GradedAlgebra/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,14 @@ section GradedRing
variable {σ : Type*} [SetLike σ A] [AddSubmonoidClass σ A] (𝒜 : ι → σ)
variable {M : ι → σ} [SetLike.GradedMonoid M]

/-- The canonical isomorphism of an internal direct sum with the ambient ring -/
noncomputable def coeRingEquiv (hM : DirectSum.IsInternal M) :
(DirectSum ι fun i => ↥(M i)) ≃+* A := RingEquiv.ofBijective (DirectSum.coeRingHom M) hM

/-- Given an `R`-algebra `A` and a family `ι → σ` of submonoids parameterized by an additive monoid
`ι` and satisfying `SetLike.GradedMonoid M` (essentially, is multiplicative), such that
`DirectSum.IsInternal M` (`A` is the direct sum of the `M i`), we endow `A` with the structure of a
graded ring. The submonoids are the *homogeneous* parts. -/
noncomputable def gradedRing (hM : DirectSum.IsInternal M) : GradedRing M :=
{ (inferInstance : SetLike.GradedMonoid M) with
decompose' := hM.coeRingEquiv.symm
Expand Down
7 changes: 5 additions & 2 deletions Mathlib/RingTheory/GradedAlgebra/HomogeneousRelation.lean
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ In this file, we define the property of an ideal being homogeneous.
variable {ι : Type*} [DecidableEq ι] [AddMonoid ι]
variable {A : Type*} [Semiring A]

/-- a relation `r : A → A → Prop` is homogeneous with respect to the grading `𝒜` if `r x y` implies
that for every index `i`, the projection of `x` and `y` onto the `i`-th grading piece satisfies
the equivalence relation generated by `r`. -/
class IsHomogeneousRelation {σ : Type*} [SetLike σ A] [AddSubmonoidClass σ A] (𝒜 : ι → σ)
[GradedRing 𝒜] (r : A → A → Prop) : Prop where
is_homogeneous' : ∀ {x y : A}, r x y →
Expand Down Expand Up @@ -92,7 +95,7 @@ lemma Finset.relation_sum_induction {α : Type*} {s : Finset α} [DecidableEq α
| insert _ _ => simp_all

lemma coe_mul_sum_support_subset {ι : Type*} {σ : Type*} {R : Type*} [DecidableEq ι] [Semiring R]
[SetLike σ R] [AddSubmonoidClass σ R] (A : ι → σ) [AddMonoid ι] [SetLike.GradedMonoid A]
[SetLike σ R] [AddSubmonoidClass σ R] (A : ι → σ) [AddMonoid ι]
[(i : ι) → (x : ↥(A i)) → Decidable (x ≠ 0)] (r r' : DirectSum ι fun i ↦ ↥(A i))
{S T: Finset ι} (hS : DFinsupp.support r ⊆ S) (hT : DFinsupp.support r' ⊆ T)
(p : ι × ι → Prop) [DecidablePred p] :
Expand All @@ -108,7 +111,7 @@ lemma coe_mul_sum_support_subset {ι : Type*} {σ : Type*} {R : Type*} [Decidabl
· simp [hx h]
simp [this]

noncomputable local instance : (i : ι) → (x : ↥(𝒜 i)) → Decidable (x ≠ 0) :=
noncomputable private instance : (i : ι) → (x : ↥(𝒜 i)) → Decidable (x ≠ 0) :=
fun _ x ↦ Classical.propDecidable (x ≠ 0)

theorem eqvGen_proj_mul_right {a b c : A} (n : ι)
Expand Down

0 comments on commit 0dcce80

Please sign in to comment.