Skip to content

Commit eaf3ffb

Browse files
committed
feat(Algebra): SemimoduleCat, category of modules over semiring (#31023)
+ Introduce SemimoduleCat, the category of semimodules (mathlib's Module) over a Semiring. The new file ModuleCat/Semi.lean is copied from ModuleCat/Basic.lean. The additive/linear instances would require #28826.
1 parent 4ca9b01 commit eaf3ffb

File tree

3 files changed

+496
-3
lines changed

3 files changed

+496
-3
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ import Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafify
175175
import Mathlib.Algebra.Category.ModuleCat.Products
176176
import Mathlib.Algebra.Category.ModuleCat.Projective
177177
import Mathlib.Algebra.Category.ModuleCat.Pseudofunctor
178+
import Mathlib.Algebra.Category.ModuleCat.Semi
178179
import Mathlib.Algebra.Category.ModuleCat.Sheaf
179180
import Mathlib.Algebra.Category.ModuleCat.Sheaf.Abelian
180181
import Mathlib.Algebra.Category.ModuleCat.Sheaf.ChangeOfRings

Mathlib/Algebra/Category/ModuleCat/Basic.lean

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ Copyright (c) 2019 Robert A. Spencer. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Robert A. Spencer, Markus Himmel
55
-/
6+
import Mathlib.Algebra.Category.ModuleCat.Semi
67
import Mathlib.Algebra.Category.Grp.Preadditive
7-
import Mathlib.Algebra.Module.Equiv.Basic
8-
import Mathlib.Algebra.Module.PUnit
9-
import Mathlib.CategoryTheory.Conj
108
import Mathlib.CategoryTheory.Linear.Basic
119
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
1210

@@ -184,6 +182,20 @@ def homEquiv {M N : ModuleCat.{v} R} : (M ⟶ N) ≃ (M →ₗ[R] N) where
184182
toFun := Hom.hom
185183
invFun := ofHom
186184

185+
/-- The categorical equivalence between `ModuleCat` and `SemimoduleCat`.
186+
187+
In the inverse direction, data (such as the negation operation) is created which may lead to
188+
diamonds when applied to semi-modules that already have an existing additive group structure. -/
189+
def equivalenceSemimoduleCat : ModuleCat.{v} R ≌ SemimoduleCat.{v} R where
190+
functor :=
191+
{ obj M := .of R M
192+
map f := SemimoduleCat.ofHom f.hom' }
193+
inverse := letI := Module.addCommMonoidToAddCommGroup
194+
{ obj M := of R M
195+
map {M N} f := ofHom f.hom }
196+
unitIso := NatIso.ofComponents fun _ ↦ { hom := ⟨.id⟩, inv := ⟨.id⟩ }
197+
counitIso := NatIso.ofComponents fun _ ↦ { hom := ⟨.id⟩, inv := ⟨.id⟩ }
198+
187199
end
188200

189201
/- Not a `@[simp]` lemma since it will rewrite the (co)domain of maps and cause

0 commit comments

Comments
 (0)