Skip to content

Commit cebb20d

Browse files
committed
chore(CategoryTheory): dsimp the apply lemmas in the monoidal structure on types (leanprover-community#37168)
1 parent 3871d9a commit cebb20d

7 files changed

Lines changed: 25 additions & 24 deletions

File tree

Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ lemma μIso_inv_freeMk {X Y : Type u} (z : X ⊗ Y) :
158158
erw [finsuppTensorFinsupp'_symm_single_eq_single_one_tmul]
159159

160160
end FreeMonoidal
161-
162-
set_option backward.isDefEq.respectTransparency false in
163161
open FreeMonoidal in
164162
/-- The free functor `Type u ⥤ ModuleCat R` is a monoidal functor. -/
165163
instance : (free R).Monoidal :=

Mathlib/CategoryTheory/Action/Monoidal.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ theorem diagonalSuccIsoTensorTrivial_hom_hom_apply {n : ℕ} (f : Fin (n + 1)
266266
leftRegularTensorIso_hom_hom, tensor_ρ, tensor_apply, ofMulAction_apply]
267267
<;> simp [ofMulAction_V, types_tensorObj_def, Fin.tail]
268268

269+
attribute [local simp] types_tensorObj_def types_tensorUnit_def in
269270
set_option backward.isDefEq.respectTransparency false in
270271
@[simp]
271272
theorem diagonalSuccIsoTensorTrivial_inv_hom_apply {n : ℕ} (g : G) (f : Fin n → G) :

Mathlib/CategoryTheory/Monoidal/Functor/Types.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ section
2727
variable (F : Type* → Type*) [Applicative F] [LawfulApplicative F]
2828

2929
set_option backward.isDefEq.respectTransparency false in
30-
attribute [local simp] map_seq seq_map_assoc
30+
attribute [local simp] map_seq seq_map_assoc types_tensorObj_def types_tensorUnit_def
3131
LawfulApplicative.pure_seq LawfulApplicative.seq_assoc in
3232
/-- A lawful `Applicative` gives a category theory `LaxMonoidal` functor
3333
between categories of types. -/

Mathlib/CategoryTheory/Monoidal/Internal/Types/Basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ noncomputable def functor : Mon (Type u) ⥤ MonCat.{u} where
4444
map_one' := congr_fun (IsMonHom.one_hom f.hom) PUnit.unit
4545
map_mul' x y := congr_fun (IsMonHom.mul_hom f.hom) (x, y) }
4646

47+
attribute [local simp] types_tensorObj_def types_tensorUnit_def in
4748
/-- Converting a bundled monoid to a monoid object in `Type`.
4849
-/
4950
noncomputable def inverse : MonCat.{u} ⥤ Mon (Type u) where

Mathlib/CategoryTheory/Monoidal/Types/Basic.lean

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,88 +33,90 @@ theorem types_tensorObj_def {X Y : Type u} : X ⊗ Y = (X × Y) := rfl
3333

3434
theorem types_tensorUnit_def : 𝟙_ (Type u) = PUnit := rfl
3535

36+
attribute [local simp] types_tensorObj_def types_tensorUnit_def
37+
3638
@[simp]
3739
theorem tensor_apply {W X Y Z : Type u} (f : W ⟶ X) (g : Y ⟶ Z) (p : W ⊗ Y) :
38-
(f ⊗ₘ g) p = (f p.1, g p.2) :=
40+
dsimp% (f ⊗ₘ g) p = (f p.1, g p.2) :=
3941
rfl
4042

4143
@[simp]
4244
theorem whiskerLeft_apply (X : Type u) {Y Z : Type u} (f : Y ⟶ Z) (p : X ⊗ Y) :
43-
(X ◁ f) p = (p.1, f p.2) :=
45+
dsimp% (X ◁ f) p = (p.1, f p.2) :=
4446
rfl
4547

4648
@[simp]
4749
theorem whiskerRight_apply {Y Z : Type u} (f : Y ⟶ Z) (X : Type u) (p : Y ⊗ X) :
48-
(f ▷ X) p = (f p.1, p.2) :=
50+
dsimp% (f ▷ X) p = (f p.1, p.2) :=
4951
rfl
5052

5153
@[simp]
5254
theorem leftUnitor_hom_apply {X : Type u} {x : X} {p : PUnit} :
53-
((λ_ X).hom : 𝟙_ (Type u) ⊗ X → X) (p, x) = x :=
55+
dsimp% (λ_ X).hom (p, x) = x :=
5456
rfl
5557

5658
@[simp]
5759
theorem leftUnitor_inv_apply {X : Type u} {x : X} :
58-
((λ_ X).inv : X ⟶ 𝟙_ (Type u) ⊗ X) x = (PUnit.unit, x) :=
60+
dsimp% (λ_ X).inv x = (PUnit.unit, x) :=
5961
rfl
6062

6163
@[simp]
6264
theorem rightUnitor_hom_apply {X : Type u} {x : X} {p : PUnit} :
63-
((ρ_ X).hom : X ⊗ 𝟙_ (Type u) → X) (x, p) = x :=
65+
dsimp% (ρ_ X).hom (x, p) = x :=
6466
rfl
6567

6668
@[simp]
6769
theorem rightUnitor_inv_apply {X : Type u} {x : X} :
68-
((ρ_ X).inv : X ⟶ X ⊗ 𝟙_ (Type u)) x = (x, PUnit.unit) :=
70+
dsimp% (ρ_ X).inv x = (x, PUnit.unit) :=
6971
rfl
7072

7173
@[simp]
7274
theorem associator_hom_apply {X Y Z : Type u} {x : X} {y : Y} {z : Z} :
73-
((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) ((x, y), z) = (x, (y, z)) :=
75+
dsimp% (α_ X Y Z).hom ((x, y), z) = (x, (y, z)) :=
7476
rfl
7577

7678
@[simp]
7779
theorem associator_inv_apply {X Y Z : Type u} {x : X} {y : Y} {z : Z} :
78-
((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) (x, (y, z)) = ((x, y), z) :=
80+
dsimp% (α_ X Y Z).inv (x, (y, z)) = ((x, y), z) :=
7981
rfl
8082

8183
@[simp] theorem associator_hom_apply_1 {X Y Z : Type u} {x} :
82-
(((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) x).1 = x.1.1 :=
84+
dsimp% ((α_ X Y Z).hom x).1 = x.1.1 :=
8385
rfl
8486

8587
@[simp] theorem associator_hom_apply_2_1 {X Y Z : Type u} {x} :
86-
(((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) x).2.1 = x.1.2 :=
88+
dsimp% ((α_ X Y Z).hom x).2.1 = x.1.2 :=
8789
rfl
8890

8991
@[simp] theorem associator_hom_apply_2_2 {X Y Z : Type u} {x} :
90-
(((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) x).2.2 = x.2 :=
92+
dsimp% ((α_ X Y Z).hom x).2.2 = x.2 :=
9193
rfl
9294

9395
@[simp] theorem associator_inv_apply_1_1 {X Y Z : Type u} {x} :
94-
(((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) x).1.1 = x.1 :=
96+
dsimp% ((α_ X Y Z).inv x).1.1 = x.1 :=
9597
rfl
9698

9799
@[simp] theorem associator_inv_apply_1_2 {X Y Z : Type u} {x} :
98-
(((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) x).1.2 = x.2.1 :=
100+
dsimp% ((α_ X Y Z).inv x).1.2 = x.2.1 :=
99101
rfl
100102

101103
@[simp] theorem associator_inv_apply_2 {X Y Z : Type u} {x} :
102-
(((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) x).2 = x.2.2 :=
104+
dsimp% ((α_ X Y Z).inv x).2 = x.2.2 :=
103105
rfl
104106

105107
@[simp]
106108
theorem braiding_hom_apply {X Y : Type u} {x : X} {y : Y} :
107-
((β_ X Y).hom : X ⊗ Y → Y ⊗ X) (x, y) = (y, x) :=
109+
dsimp% (β_ X Y).hom (x, y) = (y, x) :=
108110
rfl
109111

110112
@[simp]
111113
theorem braiding_inv_apply {X Y : Type u} {x : X} {y : Y} :
112-
((β_ X Y).inv : Y ⊗ X → X ⊗ Y) (y, x) = (x, y) :=
114+
dsimp% (β_ X Y).inv (y, x) = (x, y) :=
113115
rfl
114116

115117
@[simp]
116118
theorem CartesianMonoidalCategory.lift_apply {X Y Z : Type u} {f : X ⟶ Y} {g : X ⟶ Z} {x : X} :
117-
lift f g x = (f x, g x) :=
119+
dsimp% lift f g x = (f x, g x) :=
118120
rfl
119121

120122
-- We don't yet have an API for tensor products indexed by finite ordered types,

Mathlib/CategoryTheory/Monoidal/Types/Coyoneda.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace CategoryTheory
2020

2121
open Opposite MonoidalCategory
2222

23+
attribute [local simp] types_tensorObj_def types_tensorUnit_def in
2324
instance (C : Type u) [Category.{v} C] [MonoidalCategory C] :
2425
(coyoneda.obj (op (𝟙_ C))).LaxMonoidal :=
2526
Functor.LaxMonoidal.ofTensorHom

Mathlib/RepresentationTheory/Action.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ lemma μ_comp_assoc : ((linearizeMap (α_ X Y Z).hom).comp
156156
-- after fixing the defeq problems in `Action` and in the monoidal category structure of `types`
157157
-- this line should close the goal so this is left as an indicator.
158158
with_reducible convert linearizeMap_single (α_ X Y Z).hom ((x, y), z) _
159-
with_reducible simp only [Action.tensorObj_V, types_tensorObj_def, Action.associator_hom_hom]
160-
with_reducible refine Prod.ext ?_ (Prod.ext ?_ ?_)
161-
<;> with_reducible simp
159+
with_reducible simp
162160

163161
variable (X) in
164162
lemma μ_leftUnitor : (lid k (linearize k G X)).toIntertwiningMap =

0 commit comments

Comments
 (0)