@@ -3,21 +3,13 @@ Copyright (c) 2020 Bhavik Mehta, Edward Ayers, Thomas Read. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Bhavik Mehta, Edward Ayers, Thomas Read
5
5
-/
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
12
6
import Mathlib.CategoryTheory.Closed.Monoidal
7
+ import Mathlib.CategoryTheory.Monoidal.Cartesian.Basic
13
8
14
9
/-!
15
10
# Cartesian closed categories
16
11
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,
21
13
i.e. `(X × -)` is a left adjoint.
22
14
23
15
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
27
19
28
20
## Implementation Details
29
21
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 `.
34
26
35
27
## TODO
36
28
Some of the results here are true more generally for closed objects and
@@ -42,54 +34,45 @@ universe v v₂ u u₂
42
34
43
35
namespace CategoryTheory
44
36
45
- open Category Limits MonoidalCategory
37
+ open Category Limits MonoidalCategory CartesianMonoidalCategory
46
38
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}
50
40
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
53
44
54
45
/-- Constructor for `Exponentiable X` which takes as an input an adjunction
55
46
`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
59
48
rightAdj := exp
60
49
adj := adj
61
50
62
51
/-- If `X` and `Y` are exponentiable then `X ⨯ Y` is.
63
52
This isn't an instance because it's not usually how we want to construct exponentials, we'll usually
64
53
prove all objects are exponential uniformly.
65
54
-/
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
69
57
70
58
/-- The terminal object is always exponentiable.
71
59
This isn't an instance because most of the time we'll prove cartesian closed for all objects
72
60
at once, rather than just for this one.
73
61
-/
74
- def terminalExponentiable {C : Type u} [Category.{v} C] [ChosenFiniteProducts C] :
75
- Exponentiable (𝟙_ C) :=
76
- unitClosed
62
+ def terminalExponentiable : Exponentiable (𝟙_ C) := unitClosed
77
63
64
+ variable (C) in
78
65
/-- 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
83
68
69
+ variable (C) in
84
70
-- Porting note: added to ease the port of `CategoryTheory.Closed.Types`
85
71
/-- 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
89
73
closed X := exp X
90
74
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]
93
76
94
77
/-- This is (-)^A. -/
95
78
abbrev exp : C ⥤ C :=
@@ -238,7 +221,7 @@ def expUnitIsoSelf [Exponentiable (𝟙_ C)] : (𝟙_ C) ⟹ X ≅ X :=
238
221
239
222
/-- The internal element which points at the given morphism. -/
240
223
def internalizeHom (f : A ⟶ Y) : 𝟙_ C ⟶ A ⟹ Y :=
241
- CartesianClosed.curry (ChosenFiniteProducts. fst _ _ ≫ f)
224
+ CartesianClosed.curry (fst _ _ ≫ f)
242
225
243
226
section Pre
244
227
@@ -284,10 +267,10 @@ def internalHom [CartesianClosed C] : Cᵒᵖ ⥤ C ⥤ C where
284
267
/-- If an initial object `I` exists in a CCC, then `A ⨯ I ≅ I`. -/
285
268
@[simps]
286
269
def zeroMul {I : C} (t : IsInitial I) : A ⊗ I ≅ I where
287
- hom := ChosenFiniteProducts. snd _ _
270
+ hom := snd _ _
288
271
inv := t.to _
289
272
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
291
274
rw [← curry_eq_iff]
292
275
apply t.hom_ext
293
276
rw [this, ← uncurry_natural_right, ← eq_curry_iff]
@@ -334,7 +317,7 @@ exponentiable object is an isomorphism.
334
317
-/
335
318
theorem strict_initial {I : C} (t : IsInitial I) (f : A ⟶ I) : IsIso f := by
336
319
haveI : Mono f := by
337
- rw [← ChosenFiniteProducts. lift_snd (𝟙 A) f, ← zeroMul_hom t]
320
+ rw [← lift_snd (𝟙 A) f, ← zeroMul_hom t]
338
321
exact mono_comp _ _
339
322
haveI : IsSplitEpi f := IsSplitEpi.mk' ⟨t.to _, t.hom_ext _ _⟩
340
323
apply isIso_of_mono_of_isSplitEpi
@@ -356,7 +339,7 @@ variable {D : Type u₂} [Category.{v₂} D]
356
339
357
340
section Functor
358
341
359
- variable [ChosenFiniteProducts D]
342
+ variable [CartesianMonoidalCategory D]
360
343
361
344
/-- Transport the property of being cartesian closed across an equivalence of categories.
362
345
0 commit comments