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

Commit 461130b

Browse files
kim-emjcommelin
andcommitted
feat(category_theory/monoidal): the definition of Tor (#7512)
# Tor, the left-derived functor of tensor product We define `tor C n : C ⥤ C ⥤ C`, by left-deriving in the second factor of `(X, Y) ↦ X ⊗ Y`. For now we have almost nothing to say about it! It would be good to show that this is naturally isomorphic to the functor obtained by left-deriving in the first factor, instead. Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Johan Commelin <johan@commelin.net>
1 parent b091c3f commit 461130b

File tree

3 files changed

+139
-1
lines changed

3 files changed

+139
-1
lines changed

src/category_theory/monoidal/category.lean

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,13 +439,32 @@ def tensor_right (X : C) : C ⥤ C :=
439439

440440
variables (C)
441441

442+
/--
443+
Tensoring on the left, as a functor from `C` into endofunctors of `C`.
444+
445+
TODO: show this is a op-monoidal functor.
446+
-/
447+
@[simps]
448+
def tensoring_left : C ⥤ C ⥤ C :=
449+
{ obj := tensor_left,
450+
map := λ X Y f,
451+
{ app := λ Z, f ⊗ (𝟙 Z) } }
452+
453+
instance : faithful (tensoring_left C) :=
454+
{ map_injective' := λ X Y f g h,
455+
begin
456+
injections with h,
457+
replace h := congr_fun h (𝟙_ C),
458+
simpa using h,
459+
end }
460+
442461
/--
443462
Tensoring on the right, as a functor from `C` into endofunctors of `C`.
444463
445464
We later show this is a monoidal functor.
446465
-/
447466
@[simps]
448-
def tensoring_right : C ⥤ (C ⥤ C) :=
467+
def tensoring_right : C ⥤ C ⥤ C :=
449468
{ obj := tensor_right,
450469
map := λ X Y f,
451470
{ app := λ Z, (𝟙 Z) ⊗ f } }
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/-
2+
Copyright (c) 2021 Scott Morrison. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Scott Morrison
5+
-/
6+
import category_theory.preadditive.additive_functor
7+
import category_theory.monoidal.category
8+
9+
/-!
10+
# Preadditive monoidal categories
11+
12+
A monoidal category is `monoidal_preadditive` if it is preadditive and tensor product of morphisms
13+
is linear in both factors.
14+
-/
15+
16+
noncomputable theory
17+
18+
namespace category_theory
19+
20+
open category_theory.limits
21+
open category_theory.monoidal_category
22+
23+
variables (C : Type*) [category C] [preadditive C] [monoidal_category C]
24+
25+
/--
26+
A category is `monoidal_preadditive` if tensoring is linear in both factors.
27+
28+
Note we don't `extend preadditive C` here, as `abelian C` already extends it,
29+
and we'll need to have both typeclasses sometimes.
30+
-/
31+
class monoidal_preadditive :=
32+
(tensor_zero' : ∀ {W X Y Z : C} (f : W ⟶ X), f ⊗ (0 : Y ⟶ Z) = 0 . obviously)
33+
(zero_tensor' : ∀ {W X Y Z : C} (f : Y ⟶ Z), (0 : W ⟶ X) ⊗ f = 0 . obviously)
34+
(tensor_add' : ∀ {W X Y Z : C} (f : W ⟶ X) (g h : Y ⟶ Z), f ⊗ (g + h) = f ⊗ g + f ⊗ h . obviously)
35+
(add_tensor' : ∀ {W X Y Z : C} (f g : W ⟶ X) (h : Y ⟶ Z), (f + g) ⊗ h = f ⊗ h + g ⊗ h . obviously)
36+
37+
restate_axiom monoidal_preadditive.tensor_zero'
38+
restate_axiom monoidal_preadditive.zero_tensor'
39+
restate_axiom monoidal_preadditive.tensor_add'
40+
restate_axiom monoidal_preadditive.add_tensor'
41+
attribute [simp] monoidal_preadditive.tensor_zero monoidal_preadditive.zero_tensor
42+
43+
variables [monoidal_preadditive C]
44+
45+
local attribute [simp] monoidal_preadditive.tensor_add monoidal_preadditive.add_tensor
46+
47+
instance tensoring_left_additive (X : C) : ((tensoring_left C).obj X).additive := {}
48+
instance tensoring_right_additive (X : C) : ((tensoring_right C).obj X).additive := {}
49+
50+
end category_theory

src/category_theory/monoidal/tor.lean

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/-
2+
Copyright (c) 2021 Scott Morrison. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Scott Morrison
5+
-/
6+
import category_theory.derived
7+
import category_theory.monoidal.preadditive
8+
9+
/-!
10+
# Tor, the left-derived functor of tensor product
11+
12+
We define `Tor C n : C ⥤ C ⥤ C`, by left-deriving in the second factor of `(X, Y) ↦ X ⊗ Y`.
13+
14+
For now we have almost nothing to say about it!
15+
16+
It would be good to show that this is naturally isomorphic to the functor obtained
17+
by left-deriving in the first factor, instead.
18+
For now we define `Tor'` by left-deriving in the first factor,
19+
but showing `Tor C n ≅ Tor' C n` will require a bit more theory!
20+
Possibly it's best to axiomatize delta functors, and obtain a unique characterisation?
21+
22+
-/
23+
24+
noncomputable theory
25+
26+
open category_theory.limits
27+
open category_theory.monoidal_category
28+
29+
namespace category_theory
30+
31+
variables {C : Type*} [category C] [monoidal_category C] [preadditive C] [monoidal_preadditive C]
32+
[has_zero_object C] [has_equalizers C] [has_cokernels C] [has_images C] [has_image_maps C]
33+
[has_projective_resolutions C]
34+
35+
variables (C)
36+
37+
/-- We define `Tor C n : C ⥤ C ⥤ C` by left-deriving in the second factor of `(X, Y) ↦ X ⊗ Y`. -/
38+
@[simps]
39+
def Tor (n : ℕ) : C ⥤ C ⥤ C :=
40+
{ obj := λ X, functor.left_derived ((tensoring_left C).obj X) n,
41+
map := λ X Y f, nat_trans.left_derived ((tensoring_left C).map f) n,
42+
map_id' := λ X, by rw [(tensoring_left C).map_id, nat_trans.left_derived_id],
43+
map_comp' := λ X Y Z f g, by rw [(tensoring_left C).map_comp, nat_trans.left_derived_comp], }
44+
45+
/-- An alternative definition of `Tor`, where we left-derive in the first factor instead. -/
46+
@[simps]
47+
def Tor' (n : ℕ) : C ⥤ C ⥤ C :=
48+
functor.flip
49+
{ obj := λ X, functor.left_derived ((tensoring_right C).obj X) n,
50+
map := λ X Y f, nat_trans.left_derived ((tensoring_right C).map f) n,
51+
map_id' := λ X, by rw [(tensoring_right C).map_id, nat_trans.left_derived_id],
52+
map_comp' := λ X Y Z f g, by rw [(tensoring_right C).map_comp, nat_trans.left_derived_comp], }
53+
54+
open_locale zero_object
55+
56+
/-- The higher `Tor` groups for `X` and `Y` are zero if `Y` is projective. -/
57+
def Tor_succ_of_projective (X Y : C) [projective Y] (n : ℕ) : ((Tor C (n + 1)).obj X).obj Y ≅ 0 :=
58+
((tensoring_left C).obj X).left_derived_obj_projective_succ n Y
59+
60+
/-- The higher `Tor'` groups for `X` and `Y` are zero if `X` is projective. -/
61+
def Tor'_succ_of_projective (X Y : C) [projective X] (n : ℕ) :
62+
((Tor' C (n + 1)).obj X).obj Y ≅ 0 :=
63+
-- This unfortunately needs a manual `dsimp`, to avoid a slow unification problem.
64+
begin
65+
dsimp only [Tor', functor.flip],
66+
exact ((tensoring_right C).obj Y).left_derived_obj_projective_succ n X
67+
end
68+
69+
end category_theory

0 commit comments

Comments
 (0)