@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Sina Hazratpour
55-/
66import Mathlib.CategoryTheory.Comma.Over.Pullback
7- import Mathlib.CategoryTheory.ChosenFiniteProducts
7+ import Mathlib.CategoryTheory.Monoidal.Cartesian.Basic
88import Mathlib.CategoryTheory.Limits.Constructions.Over.Basic
99import Mathlib.CategoryTheory.Monad.Products
1010import Poly.ForMathlib.CategoryTheory.Comma.Over.Basic
@@ -16,7 +16,9 @@ universe v₁ v₂ u₁ u₂
1616
1717namespace CategoryTheory
1818
19- open Category Limits Comonad MonoidalCategory
19+ open Category Limits Comonad MonoidalCategory CartesianMonoidalCategory
20+
21+ attribute [local instance ] CartesianMonoidalCategory.ofFiniteProducts
2022
2123variable {C : Type u₁} [Category.{v₁} C]
2224
@@ -32,8 +34,7 @@ namespace Reindex
3234variable [HasPullbacks C] {X : C}
3335
3436lemma hom {Y : Over X} {Z : Over X} :
35- (Reindex Y Z).hom = pullback.snd Z.hom Y.hom := by
36- rfl
37+ (Reindex Y Z).hom = pullback.snd Z.hom Y.hom := rfl
3738
3839/-- `Reindex` is symmetric in its first and second arguments up to an isomorphism. -/
3940def symmetryObjIso (Y Z : Over X) :
@@ -57,7 +58,7 @@ lemma symmetry_hom {Y Z : Over X} :
5758def fstProj (Y Z : Over X) : Sigma Y (Reindex Y Z) ⟶ Y :=
5859 Over.homMk (pullback.snd Z.hom Y.hom) (by simp)
5960
60- lemma fstProj_sigma_fst (Y Z : Over X) : fstProj Y Z = Sigma.fst (Reindex Y Z) := by rfl
61+ lemma fstProj_sigma_fst (Y Z : Over X) : fstProj Y Z = Sigma.fst (Reindex Y Z) := rfl
6162
6263/-- The second projection out of the reindexed sigma object. -/
6364def sndProj (Y Z : Over X) : Sigma Y (Reindex Y Z) ⟶ Z :=
@@ -87,7 +88,7 @@ end Reindex
8788
8889section BinaryProduct
8990
90- open ChosenFiniteProducts Sigma Reindex
91+ open Sigma Reindex
9192
9293variable [HasFiniteWidePullbacks C] {X : C}
9394
@@ -106,8 +107,6 @@ def isBinaryProductSigmaReindex (Y Z : Over X) :
106107 · exact congr_arg CommaMorphism.left (h ⟨ .right⟩)
107108 · exact congr_arg CommaMorphism.left (h ⟨ .left ⟩)
108109
109- attribute [local instance ] ChosenFiniteProducts.ofFiniteProducts
110-
111110/-- The object `(Sigma Y) (Reindex Y Z)` is isomorphic to the binary product `Y × Z`
112111in `Over X`. -/
113112@[simps!]
@@ -122,12 +121,12 @@ def sigmaReindexIsoProdMk {Y : C} (f : Y ⟶ X) (Z : Over X) :
122121 sigmaReindexIsoProd (Over.mk f) _
123122
124123lemma sigmaReindexIsoProd_hom_comp_fst {Y Z : Over X} :
125- (sigmaReindexIsoProd Y Z).hom ≫ ( fst Y Z) = (π_ Y Z) :=
124+ (sigmaReindexIsoProd Y Z).hom ≫ fst Y Z = (π_ Y Z) :=
126125 IsLimit.conePointUniqueUpToIso_hom_comp
127126 (isBinaryProductSigmaReindex Y Z) (Limits.prodIsProd Y Z) ⟨.left⟩
128127
129128lemma sigmaReindexIsoProd_hom_comp_snd {Y Z : Over X} :
130- (sigmaReindexIsoProd Y Z).hom ≫ ( snd Y Z) = (μ_ Y Z) :=
129+ (sigmaReindexIsoProd Y Z).hom ≫ snd Y Z = (μ_ Y Z) :=
131130 IsLimit.conePointUniqueUpToIso_hom_comp
132131 (isBinaryProductSigmaReindex Y Z) (Limits.prodIsProd Y Z) ⟨.right⟩
133132
@@ -137,10 +136,7 @@ end Over
137136
138137section TensorLeft
139138
140- open MonoidalCategory Over Functor ChosenFiniteProducts
141-
142- attribute [local instance ] ChosenFiniteProducts.ofFiniteProducts
143- attribute [local instance ] monoidalOfChosenFiniteProducts
139+ open Over Functor
144140
145141variable [HasFiniteWidePullbacks C] {X : C}
146142
@@ -150,16 +146,16 @@ def Over.sigmaReindexNatIsoTensorLeft (Y : Over X) :
150146 (pullback Y.hom) ⋙ (map Y.hom) ≅ tensorLeft Y := by
151147 fapply NatIso.ofComponents
152148 · intro Z
153- simp only [const_obj_obj, Functor.id_obj, comp_obj, tensorLeft_obj, tensorObj, Over.pullback]
149+ simp only [const_obj_obj, Functor.id_obj, comp_obj, Over.pullback]
154150 exact sigmaReindexIsoProd Y Z
155151 · intro Z Z' f
156- simp
152+ dsimp
157153 ext1 <;> simp_rw [assoc]
158- · simp_rw [whiskerLeft_fst]
154+ · rw [whiskerLeft_fst]
159155 iterate rw [sigmaReindexIsoProd_hom_comp_fst]
160156 ext
161157 simp
162- · simp_rw [whiskerLeft_snd]
158+ · rw [whiskerLeft_snd]
163159 iterate rw [sigmaReindexIsoProd_hom_comp_snd, ← assoc, sigmaReindexIsoProd_hom_comp_snd]
164160 ext
165161 simp [Reindex.sndProj]
@@ -187,7 +183,7 @@ def equivOverTerminal [HasTerminal C] : Over (⊤_ C) ≌ C :=
187183
188184namespace Over
189185
190- open MonoidalCategory
186+ open CartesianMonoidalCategory
191187
192188variable {C}
193189
@@ -201,15 +197,14 @@ lemma star_map [HasBinaryProducts C] {X : C} {Y Z : C} (f : Y ⟶ Z) :
201197instance [HasBinaryProducts C] (X : C) : (forget X).IsLeftAdjoint :=
202198 ⟨_, ⟨forgetAdjStar X⟩⟩
203199
204- attribute [local instance ] ChosenFiniteProducts.ofFiniteProducts
205- attribute [local instance ] monoidalOfChosenFiniteProducts
200+ attribute [local instance ] CartesianMonoidalCategory.ofFiniteProducts
206201
207202lemma whiskerLeftProdMapId [HasFiniteLimits C] {X : C} {A A' : C} {g : A ⟶ A'} :
208203 X ◁ g = prod.map (𝟙 X) g := by
209204 ext
210- · simp only [ChosenFiniteProducts. whiskerLeft_fst]
205+ · simp only [whiskerLeft_fst]
211206 exact (Category.comp_id _).symm.trans (prod.map_fst (𝟙 X) g).symm
212- · simp only [ChosenFiniteProducts. whiskerLeft_snd]
207+ · simp only [whiskerLeft_snd]
213208 exact (prod.map_snd (𝟙 X) g).symm
214209
215210def starForgetIsoTensorLeft [HasFiniteLimits C] (X : C) :
0 commit comments