Skip to content

Commit ae681ea

Browse files
committed
chore: rename ChosenFiniteProducts to CartesianMonoidalCategory (#24390)
Now that `ChosenFiniteProducts` extends `MonoidalCategory`, the name `ChosenFiniteProducts` is less relevant. `CartesianMonoidalCategory` is a better name for this class. From Toric
1 parent 358193a commit ae681ea

35 files changed

+335
-354
lines changed

Mathlib.lean

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import Mathlib.Algebra.Category.Grp.Abelian
9797
import Mathlib.Algebra.Category.Grp.Adjunctions
9898
import Mathlib.Algebra.Category.Grp.Basic
9999
import Mathlib.Algebra.Category.Grp.Biproducts
100-
import Mathlib.Algebra.Category.Grp.ChosenFiniteProducts
100+
import Mathlib.Algebra.Category.Grp.CartesianMonoidal
101101
import Mathlib.Algebra.Category.Grp.Colimits
102102
import Mathlib.Algebra.Category.Grp.EnoughInjectives
103103
import Mathlib.Algebra.Category.Grp.EpiMono
@@ -1933,11 +1933,6 @@ import Mathlib.CategoryTheory.Category.ULift
19331933
import Mathlib.CategoryTheory.Center.Basic
19341934
import Mathlib.CategoryTheory.Center.Linear
19351935
import Mathlib.CategoryTheory.Center.Localization
1936-
import Mathlib.CategoryTheory.ChosenFiniteProducts
1937-
import Mathlib.CategoryTheory.ChosenFiniteProducts.Cat
1938-
import Mathlib.CategoryTheory.ChosenFiniteProducts.FunctorCategory
1939-
import Mathlib.CategoryTheory.ChosenFiniteProducts.InfSemilattice
1940-
import Mathlib.CategoryTheory.ChosenFiniteProducts.Over
19411936
import Mathlib.CategoryTheory.Closed.Cartesian
19421937
import Mathlib.CategoryTheory.Closed.Enrichment
19431938
import Mathlib.CategoryTheory.Closed.Functor
@@ -2311,12 +2306,17 @@ import Mathlib.CategoryTheory.Monoidal.Bimon_
23112306
import Mathlib.CategoryTheory.Monoidal.Braided.Basic
23122307
import Mathlib.CategoryTheory.Monoidal.Braided.Opposite
23132308
import Mathlib.CategoryTheory.Monoidal.Braided.Reflection
2309+
import Mathlib.CategoryTheory.Monoidal.Cartesian.Basic
2310+
import Mathlib.CategoryTheory.Monoidal.Cartesian.Cat
23142311
import Mathlib.CategoryTheory.Monoidal.Cartesian.CommGrp_
23152312
import Mathlib.CategoryTheory.Monoidal.Cartesian.CommMon_
23162313
import Mathlib.CategoryTheory.Monoidal.Cartesian.Comon_
2314+
import Mathlib.CategoryTheory.Monoidal.Cartesian.FunctorCategory
23172315
import Mathlib.CategoryTheory.Monoidal.Cartesian.Grp_
2316+
import Mathlib.CategoryTheory.Monoidal.Cartesian.InfSemilattice
23182317
import Mathlib.CategoryTheory.Monoidal.Cartesian.Mod_
23192318
import Mathlib.CategoryTheory.Monoidal.Cartesian.Mon_
2319+
import Mathlib.CategoryTheory.Monoidal.Cartesian.Over
23202320
import Mathlib.CategoryTheory.Monoidal.Category
23212321
import Mathlib.CategoryTheory.Monoidal.Center
23222322
import Mathlib.CategoryTheory.Monoidal.CoherenceLemmas
@@ -2453,6 +2453,7 @@ import Mathlib.CategoryTheory.Sites.Abelian
24532453
import Mathlib.CategoryTheory.Sites.Adjunction
24542454
import Mathlib.CategoryTheory.Sites.Canonical
24552455
import Mathlib.CategoryTheory.Sites.CartesianClosed
2456+
import Mathlib.CategoryTheory.Sites.CartesianMonoidal
24562457
import Mathlib.CategoryTheory.Sites.ChosenFiniteProducts
24572458
import Mathlib.CategoryTheory.Sites.Closed
24582459
import Mathlib.CategoryTheory.Sites.Coherent.Basic

Mathlib/Algebra/Category/Grp/ChosenFiniteProducts.lean renamed to Mathlib/Algebra/Category/Grp/CartesianMonoidal.lean

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def binaryProductLimitCone (G H : Grp.{u}) : LimitCone (pair G H) where
2626

2727
/-- We choose `Grp.of (G × H)` as the product of `G` and `H` and `Grp.of PUnit` as
2828
the terminal object. -/
29-
noncomputable instance chosenFiniteProductsGrp : ChosenFiniteProducts Grp.{u} :=
29+
noncomputable instance cartesianMonoidalCategoryGrp : CartesianMonoidalCategory Grp.{u} :=
3030
.ofChosenFiniteProducts ⟨_, (isZero_of_subsingleton (Grp.of PUnit.{u + 1})).isTerminal⟩
3131
fun G H ↦ binaryProductLimitCone G H
3232

33-
noncomputable instance : BraidedCategory Grp.{u} := .ofChosenFiniteProducts
33+
noncomputable instance : BraidedCategory Grp.{u} := .ofCartesianMonoidalCategory
3434

3535
noncomputable instance : (forget Grp.{u}).Braided := .ofChosenFiniteProducts _
3636

@@ -56,11 +56,11 @@ def binaryProductLimitCone (G H : AddGrp.{u}) : LimitCone (pair G H) where
5656

5757
/-- We choose `AddGrp.of (G × H)` as the product of `G` and `H` and `AddGrp.of PUnit` as
5858
the terminal object. -/
59-
noncomputable instance chosenFiniteProductsAddGrp : ChosenFiniteProducts AddGrp.{u} :=
59+
noncomputable instance cartesianMonoidalCategoryAddGrp : CartesianMonoidalCategory AddGrp.{u} :=
6060
.ofChosenFiniteProducts ⟨_, (isZero_of_subsingleton (AddGrp.of PUnit.{u + 1})).isTerminal⟩
6161
fun G H ↦ binaryProductLimitCone G H
6262

63-
noncomputable instance : BraidedCategory AddGrp.{u} := .ofChosenFiniteProducts
63+
noncomputable instance : BraidedCategory AddGrp.{u} := .ofCartesianMonoidalCategory
6464

6565
noncomputable instance : (forget AddGrp.{u}).Braided := .ofChosenFiniteProducts _
6666

@@ -86,11 +86,11 @@ def binaryProductLimitCone (G H : CommGrp.{u}) : LimitCone (pair G H) where
8686

8787
/-- We choose `CommGrp.of (G × H)` as the product of `G` and `H` and `CommGrp.of PUnit` as
8888
the terminal object. -/
89-
noncomputable instance chosenFiniteProductsCommGrp : ChosenFiniteProducts CommGrp.{u} :=
89+
noncomputable instance cartesianMonoidalCategoryCommGrp : CartesianMonoidalCategory CommGrp.{u} :=
9090
.ofChosenFiniteProducts ⟨_, (isZero_of_subsingleton (CommGrp.of PUnit.{u + 1})).isTerminal⟩
9191
fun G H ↦ binaryProductLimitCone G H
9292

93-
noncomputable instance : BraidedCategory CommGrp.{u} := .ofChosenFiniteProducts
93+
noncomputable instance : BraidedCategory CommGrp.{u} := .ofCartesianMonoidalCategory
9494

9595
noncomputable instance : (forget CommGrp.{u}).Braided := .ofChosenFiniteProducts _
9696

@@ -109,13 +109,16 @@ namespace AddCommGrp
109109

110110
/-- We choose `AddCommGrp.of (G × H)` as the product of `G` and `H` and `AddGrp.of PUnit` as
111111
the terminal object. -/
112-
noncomputable def chosenFiniteProductsAddCommGrp : ChosenFiniteProducts AddCommGrp.{u} :=
112+
noncomputable def cartesianMonoidalCategoryAddCommGrp : CartesianMonoidalCategory AddCommGrp.{u} :=
113113
.ofChosenFiniteProducts ⟨_, (isZero_of_subsingleton (AddCommGrp.of PUnit.{u + 1})).isTerminal⟩
114114
fun G H ↦ binaryProductLimitCone G H
115115

116-
attribute [local instance] chosenFiniteProductsAddCommGrp
116+
@[deprecated (since := "2025-05-15")]
117+
alias chosenFiniteProductsAddCommGrp := cartesianMonoidalCategoryAddCommGrp
117118

118-
noncomputable instance : BraidedCategory AddCommGrp.{u} := .ofChosenFiniteProducts
119+
attribute [local instance] cartesianMonoidalCategoryAddCommGrp
120+
121+
noncomputable instance : BraidedCategory AddCommGrp.{u} := .ofCartesianMonoidalCategory
119122

120123
noncomputable instance : (forget AddCommGrp.{u}).Braided := .ofChosenFiniteProducts _
121124

Mathlib/Algebra/Category/Grp/LeftExactFunctor.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2025 Markus Himmel. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Markus Himmel
55
-/
6-
import Mathlib.Algebra.Category.Grp.ChosenFiniteProducts
6+
import Mathlib.Algebra.Category.Grp.CartesianMonoidal
77
import Mathlib.Algebra.Category.Grp.EquivalenceGroupAddGroup
88
import Mathlib.CategoryTheory.Monoidal.Internal.Types.CommGrp_
99
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
@@ -40,11 +40,11 @@ variable {C : Type u} [Category.{v} C] [Preadditive C] [HasFiniteBiproducts C]
4040
namespace leftExactFunctorForgetEquivalence
4141

4242
attribute [local instance] hasFiniteProducts_of_hasFiniteBiproducts
43-
attribute [local instance] AddCommGrp.chosenFiniteProductsAddCommGrp
43+
attribute [local instance] AddCommGrp.cartesianMonoidalCategoryAddCommGrp
4444

45-
private noncomputable local instance : ChosenFiniteProducts C := .ofHasFiniteProducts
45+
private noncomputable local instance : CartesianMonoidalCategory C := .ofHasFiniteProducts
4646

47-
private noncomputable local instance : BraidedCategory C := .ofChosenFiniteProducts
47+
private noncomputable local instance : BraidedCategory C := .ofCartesianMonoidalCategory
4848

4949
/-- Implementation, see `leftExactFunctorForgetEquivalence`. -/
5050
noncomputable def inverseAux : (C ⥤ₗ Type v) ⥤ C ⥤ AddCommGrp.{v} :=

Mathlib/AlgebraicGeometry/Limits.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ instance [IsAffine X] [IsAffine Y] : IsAffine (X ⨿ Y) :=
646646

647647
end Coproduct
648648

649-
instance : ChosenFiniteProducts Scheme := .ofHasFiniteProducts
650-
instance : BraidedCategory Scheme := .ofChosenFiniteProducts
649+
instance : CartesianMonoidalCategory Scheme := .ofHasFiniteProducts
650+
instance : BraidedCategory Scheme := .ofCartesianMonoidalCategory
651651

652652
end AlgebraicGeometry

Mathlib/AlgebraicGeometry/Pullbacks.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Andrew Yang
55
-/
6+
import Mathlib.AlgebraicGeometry.AffineScheme
67
import Mathlib.AlgebraicGeometry.Gluing
78
import Mathlib.CategoryTheory.Limits.Opposites
8-
import Mathlib.AlgebraicGeometry.AffineScheme
99
import Mathlib.CategoryTheory.Limits.Shapes.Diagonal
10-
import Mathlib.CategoryTheory.ChosenFiniteProducts.Over
10+
import Mathlib.CategoryTheory.Monoidal.Cartesian.Over
1111

1212
/-!
1313
# Fibred products of schemes
@@ -696,12 +696,12 @@ lemma diagonal_Spec_map :
696696

697697
end Spec
698698

699-
section ChosenFiniteProducts
699+
section CartesianMonoidalCategory
700700
variable {S : Scheme}
701701

702-
instance : ChosenFiniteProducts (Over S) := Over.chosenFiniteProducts _
703-
instance : BraidedCategory (Over S) := .ofChosenFiniteProducts
702+
instance : CartesianMonoidalCategory (Over S) := Over.cartesianMonoidalCategory _
703+
instance : BraidedCategory (Over S) := .ofCartesianMonoidalCategory
704704

705-
end ChosenFiniteProducts
705+
end CartesianMonoidalCategory
706706

707707
end AlgebraicGeometry

Mathlib/AlgebraicTopology/SimplicialSet/Monoidal.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joël Riou, Jack McKoen
55
-/
66
import Mathlib.AlgebraicTopology.SimplicialSet.Basic
7-
import Mathlib.CategoryTheory.ChosenFiniteProducts.FunctorCategory
7+
import Mathlib.CategoryTheory.Monoidal.Cartesian.FunctorCategory
88
import Mathlib.CategoryTheory.Monoidal.Types.Basic
99

1010
/-!
@@ -25,8 +25,8 @@ open Simplicial CategoryTheory MonoidalCategory
2525

2626
namespace SSet
2727

28-
noncomputable instance : ChosenFiniteProducts SSet.{u} :=
29-
(inferInstance : ChosenFiniteProducts (SimplexCategoryᵒᵖ ⥤ Type u))
28+
noncomputable instance : CartesianMonoidalCategory SSet.{u} :=
29+
(inferInstance : CartesianMonoidalCategory (SimplexCategoryᵒᵖ ⥤ Type u))
3030

3131
@[simp]
3232
lemma leftUnitor_hom_app_apply (K : SSet.{u}) {Δ : SimplexCategoryᵒᵖ} (x : (𝟙_ _ ⊗ K).obj Δ) :

Mathlib/CategoryTheory/Closed/Cartesian.lean

Lines changed: 26 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,13 @@ Copyright (c) 2020 Bhavik Mehta, Edward Ayers, Thomas Read. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Bhavik Mehta, Edward Ayers, Thomas Read
55
-/
6-
import Mathlib.CategoryTheory.EpiMono
7-
import Mathlib.CategoryTheory.Limits.Shapes.FiniteProducts
8-
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
9-
import Mathlib.CategoryTheory.ChosenFiniteProducts
10-
import Mathlib.CategoryTheory.Adjunction.Limits
11-
import Mathlib.CategoryTheory.Adjunction.Mates
126
import Mathlib.CategoryTheory.Closed.Monoidal
7+
import Mathlib.CategoryTheory.Monoidal.Cartesian.Basic
138

149
/-!
1510
# Cartesian closed categories
1611
17-
Given a category with chosen finite products, the cartesian monoidal structure is provided by the
18-
instance `monoidalOfChosenFiniteProducts`.
19-
20-
We define exponentiable objects to be closed objects with respect to this monoidal structure,
12+
We define exponentiable objects to be closed objects in a cartesian monoidal category,
2113
i.e. `(X × -)` is a left adjoint.
2214
2315
We say a category is cartesian closed if every object is exponentiable
@@ -27,10 +19,10 @@ Show that exponential forms a difunctor and define the exponential comparison mo
2719
2820
## Implementation Details
2921
30-
Cartesian closed categories require a `ChosenFiniteProducts` instance. If one whishes to state that
31-
a category that `hasFiniteProducts` is cartesian closed, they should first promote the
32-
`hasFiniteProducts` instance to a `ChosenFiniteProducts` one using
33-
`CategoryTheory.ChosenFiniteProducts.ofFiniteProducts`.
22+
Cartesian closed categories require a `CartesianMonoidalCategory` instance. If one wishes to state
23+
that a category that `hasFiniteProducts` is cartesian closed, they should first promote the
24+
`hasFiniteProducts` instance to a `CartesianMonoidalCategory` one using
25+
`CategoryTheory.ofChosenFiniteProducts`.
3426
3527
## TODO
3628
Some of the results here are true more generally for closed objects and
@@ -42,54 +34,45 @@ universe v v₂ u u₂
4234

4335
namespace CategoryTheory
4436

45-
open Category Limits MonoidalCategory
37+
open Category Limits MonoidalCategory CartesianMonoidalCategory
4638

47-
/-- An object `X` is *exponentiable* if `(X × -)` is a left adjoint.
48-
We define this as being `Closed` in the cartesian monoidal structure.
49-
-/
39+
variable {C : Type u} [Category.{v} C] [CartesianMonoidalCategory C] {X X' Y Y' Z : C}
5040

51-
abbrev Exponentiable {C : Type u} [Category.{v} C] [ChosenFiniteProducts C] (X : C) :=
52-
Closed X
41+
/-- An object `X` is *exponentiable* if `(X × -)` is a left adjoint.
42+
We define this as being `Closed` in the cartesian monoidal structure. -/
43+
abbrev Exponentiable (X : C) := Closed X
5344

5445
/-- Constructor for `Exponentiable X` which takes as an input an adjunction
5546
`MonoidalCategory.tensorLeft X ⊣ exp` for some functor `exp : C ⥤ C`. -/
56-
abbrev Exponentiable.mk {C : Type u} [Category.{v} C] [ChosenFiniteProducts C] (X : C)
57-
(exp : C ⥤ C) (adj : MonoidalCategory.tensorLeft X ⊣ exp) :
58-
Exponentiable X where
47+
abbrev Exponentiable.mk (X : C) (exp : C ⥤ C) (adj : tensorLeft X ⊣ exp) : Exponentiable X where
5948
rightAdj := exp
6049
adj := adj
6150

6251
/-- If `X` and `Y` are exponentiable then `X ⨯ Y` is.
6352
This isn't an instance because it's not usually how we want to construct exponentials, we'll usually
6453
prove all objects are exponential uniformly.
6554
-/
66-
def binaryProductExponentiable {C : Type u} [Category.{v} C] [ChosenFiniteProducts C] {X Y : C}
67-
(hX : Exponentiable X) (hY : Exponentiable Y) : Exponentiable (X ⊗ Y) :=
68-
tensorClosed hX hY
55+
def binaryProductExponentiable (hX : Exponentiable X) (hY : Exponentiable Y) :
56+
Exponentiable (X ⊗ Y) := tensorClosed hX hY
6957

7058
/-- The terminal object is always exponentiable.
7159
This isn't an instance because most of the time we'll prove cartesian closed for all objects
7260
at once, rather than just for this one.
7361
-/
74-
def terminalExponentiable {C : Type u} [Category.{v} C] [ChosenFiniteProducts C] :
75-
Exponentiable (𝟙_ C) :=
76-
unitClosed
62+
def terminalExponentiable : Exponentiable (𝟙_ C) := unitClosed
7763

64+
variable (C) in
7865
/-- A category `C` is cartesian closed if it has finite products and every object is exponentiable.
79-
We define this as `monoidal_closed` with respect to the cartesian monoidal structure.
80-
-/
81-
abbrev CartesianClosed (C : Type u) [Category.{v} C] [ChosenFiniteProducts C] :=
82-
MonoidalClosed C
66+
We define this as `MonoidalClosed` with respect to the cartesian monoidal structure. -/
67+
abbrev CartesianClosed := MonoidalClosed C
8368

69+
variable (C) in
8470
-- Porting note: added to ease the port of `CategoryTheory.Closed.Types`
8571
/-- Constructor for `CartesianClosed C`. -/
86-
def CartesianClosed.mk (C : Type u) [Category.{v} C] [ChosenFiniteProducts C]
87-
(exp : ∀ (X : C), Exponentiable X) :
88-
CartesianClosed C where
72+
def CartesianClosed.mk (exp : ∀ (X : C), Exponentiable X) : CartesianClosed C where
8973
closed X := exp X
9074

91-
variable {C : Type u} [Category.{v} C] (A B : C) {X X' Y Y' Z : C}
92-
variable [ChosenFiniteProducts C] [Exponentiable A]
75+
variable (A B : C) [Exponentiable A]
9376

9477
/-- This is (-)^A. -/
9578
abbrev exp : C ⥤ C :=
@@ -238,7 +221,7 @@ def expUnitIsoSelf [Exponentiable (𝟙_ C)] : (𝟙_ C) ⟹ X ≅ X :=
238221

239222
/-- The internal element which points at the given morphism. -/
240223
def internalizeHom (f : A ⟶ Y) : 𝟙_ C ⟶ A ⟹ Y :=
241-
CartesianClosed.curry (ChosenFiniteProducts.fst _ _ ≫ f)
224+
CartesianClosed.curry (fst _ _ ≫ f)
242225

243226
section Pre
244227

@@ -284,10 +267,10 @@ def internalHom [CartesianClosed C] : Cᵒᵖ ⥤ C ⥤ C where
284267
/-- If an initial object `I` exists in a CCC, then `A ⨯ I ≅ I`. -/
285268
@[simps]
286269
def zeroMul {I : C} (t : IsInitial I) : A ⊗ I ≅ I where
287-
hom := ChosenFiniteProducts.snd _ _
270+
hom := snd _ _
288271
inv := t.to _
289272
hom_inv_id := by
290-
have : ChosenFiniteProducts.snd A I = CartesianClosed.uncurry (t.to _) := by
273+
have : snd A I = CartesianClosed.uncurry (t.to _) := by
291274
rw [← curry_eq_iff]
292275
apply t.hom_ext
293276
rw [this, ← uncurry_natural_right, ← eq_curry_iff]
@@ -334,7 +317,7 @@ exponentiable object is an isomorphism.
334317
-/
335318
theorem strict_initial {I : C} (t : IsInitial I) (f : A ⟶ I) : IsIso f := by
336319
haveI : Mono f := by
337-
rw [← ChosenFiniteProducts.lift_snd (𝟙 A) f, ← zeroMul_hom t]
320+
rw [← lift_snd (𝟙 A) f, ← zeroMul_hom t]
338321
exact mono_comp _ _
339322
haveI : IsSplitEpi f := IsSplitEpi.mk' ⟨t.to _, t.hom_ext _ _⟩
340323
apply isIso_of_mono_of_isSplitEpi
@@ -356,7 +339,7 @@ variable {D : Type u₂} [Category.{v₂} D]
356339

357340
section Functor
358341

359-
variable [ChosenFiniteProducts D]
342+
variable [CartesianMonoidalCategory D]
360343

361344
/-- Transport the property of being cartesian closed across an equivalence of categories.
362345

Mathlib/CategoryTheory/Closed/Functor.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ noncomputable section
3434

3535
namespace CategoryTheory
3636

37-
open Category CartesianClosed MonoidalCategory ChosenFiniteProducts TwoSquare
37+
open Category CartesianClosed MonoidalCategory CartesianMonoidalCategory TwoSquare
3838

3939
universe v u u'
4040

4141
variable {C : Type u} [Category.{v} C]
4242
variable {D : Type u'} [Category.{v} D]
43-
variable [ChosenFiniteProducts C] [ChosenFiniteProducts D]
43+
variable [CartesianMonoidalCategory C] [CartesianMonoidalCategory D]
4444
variable (F : C ⥤ D) {L : D ⥤ C}
4545

4646
/-- The Frobenius morphism for an adjunction `L ⊣ F` at `A` is given by the morphism

0 commit comments

Comments
 (0)