Skip to content

Commit e50af85

Browse files
committed
feat(CategoryTheory/Join): Opposites of joins of categories (#24657)
Record the equivalence `(C ⋆ D)ᵒᵖ ≌ Dᵒᵖ ⋆ Cᵒᵖ` and characterize both of its directions with respect to the left/right inclusions.
1 parent d5f3cef commit e50af85

File tree

2 files changed

+152
-0
lines changed

2 files changed

+152
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,7 @@ import Mathlib.CategoryTheory.Iso
21282128
import Mathlib.CategoryTheory.IsomorphismClasses
21292129
import Mathlib.CategoryTheory.Join.Basic
21302130
import Mathlib.CategoryTheory.Join.Final
2131+
import Mathlib.CategoryTheory.Join.Opposites
21312132
import Mathlib.CategoryTheory.Join.Sum
21322133
import Mathlib.CategoryTheory.LiftingProperties.Adjunction
21332134
import Mathlib.CategoryTheory.LiftingProperties.Basic
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/-
2+
Copyright (c) 2025 Robin Carlier. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Robin Carlier
5+
-/
6+
import Mathlib.CategoryTheory.Join.Basic
7+
import Mathlib.CategoryTheory.Opposites
8+
9+
/-!
10+
# Opposites of joins of categories
11+
12+
This file constructs the canonical equivalence of categories `(C ⋆ D)ᵒᵖ ≌ Dᵒᵖ ⋆ Cᵒᵖ`.
13+
The equivalence gets characterized in both directions.
14+
15+
-/
16+
17+
namespace CategoryTheory.Join
18+
open Opposite
19+
20+
universe v₁ v₂ u₁ u₂
21+
22+
variable (C : Type u₁) (D : Type u₂) [Category.{v₁} C] [Category.{v₂} D]
23+
24+
/-- The equivalence `(C ⋆ D)ᵒᵖ ≌ Dᵒᵖ ⋆ Cᵒᵖ` induced by `Join.opEquivFunctor` and
25+
`Join.opEquivInverse`. -/
26+
def opEquiv : (C ⋆ D)ᵒᵖ ≌ Dᵒᵖ ⋆ Cᵒᵖ where
27+
functor := Functor.leftOp <|
28+
Join.mkFunctor (inclRight _ _).rightOp (inclLeft _ _).rightOp {app _ := (edge _ _).op}
29+
inverse := Join.mkFunctor (inclRight _ _).op (inclLeft _ _).op {app _ := (edge _ _).op}
30+
unitIso := NatIso.ofComponents
31+
(fun
32+
| op (left _) => Iso.refl _
33+
| op (right _) => Iso.refl _ )
34+
(@fun
35+
| op (left _), op (left _), _ => by aesop_cat
36+
| op (right _), op (left _), _ => by aesop_cat
37+
| op (right _), op (right _), _ => by aesop_cat)
38+
counitIso := NatIso.ofComponents
39+
(fun
40+
| left _ => Iso.refl _
41+
| right _ => Iso.refl _)
42+
functor_unitIso_comp
43+
| op (left _) => by aesop_cat
44+
| op (right _) => by aesop_cat
45+
46+
variable {C} in
47+
@[simp]
48+
lemma opEquiv_functor_obj_op_left (c : C) :
49+
(opEquiv C D).functor.obj (op <| left c) = right (op c) :=
50+
rfl
51+
52+
variable {D} in
53+
@[simp]
54+
lemma opEquiv_functor_obj_op_right (d : D) :
55+
(opEquiv C D).functor.obj (op <| right d) = left (op d) :=
56+
rfl
57+
58+
variable {C} in
59+
@[simp]
60+
lemma opEquiv_functor_map_op_inclLeft {c c' : C} (f : c ⟶ c') :
61+
(opEquiv C D).functor.map (op <| (inclLeft C D).map f) = (inclRight _ _).map (op f) :=
62+
rfl
63+
64+
variable {D} in
65+
@[simp]
66+
lemma opEquiv_functor_map_op_inclRight {d d' : D} (f : d ⟶ d') :
67+
(opEquiv C D).functor.map (op <| (inclRight C D).map f) = (inclLeft _ _).map (op f) :=
68+
rfl
69+
70+
variable {C D} in
71+
lemma opEquiv_functor_map_op_edge (c : C) (d : D) :
72+
(opEquiv C D).functor.map (op <| edge c d) = edge (op d) (op c) :=
73+
rfl
74+
75+
/-- Characterize (up to a rightOp) the action of the left inclusion on `Join.opEquivFunctor`. -/
76+
@[simps!]
77+
def InclLeftCompRightOpOpEquivFunctor :
78+
inclLeft C D ⋙ (opEquiv C D).functor.rightOp ≅ (inclRight _ _).rightOp :=
79+
isoWhiskerLeft _ (Functor.leftOpRightOpIso _) ≪≫ mkFunctorLeft _ _ _
80+
81+
/-- Characterize (up to a rightOp) the action of the right inclusion on `Join.opEquivFunctor`. -/
82+
@[simps!]
83+
def InclRightCompRightOpOpEquivFunctor :
84+
inclRight C D ⋙ (opEquiv C D).functor.rightOp ≅ (inclLeft _ _).rightOp :=
85+
isoWhiskerLeft _ (Functor.leftOpRightOpIso _) ≪≫ mkFunctorRight _ _ _
86+
87+
variable {D} in
88+
@[simp]
89+
lemma opEquiv_inverse_obj_left_op (d : D) :
90+
(opEquiv C D).inverse.obj (left <| op d) = op (right d) :=
91+
rfl
92+
93+
variable {C} in
94+
@[simp]
95+
lemma opEquiv_inverse_obj_right_op (c : C) :
96+
(opEquiv C D).inverse.obj (right <| op c) = op (left c) :=
97+
rfl
98+
99+
variable {D} in
100+
@[simp]
101+
lemma opEquiv_inverse_map_inclLeft_op {d d' : D} (f : d ⟶ d') :
102+
(opEquiv C D).inverse.map ((inclLeft Dᵒᵖ Cᵒᵖ).map f.op) = op ((inclRight _ _).map f) :=
103+
rfl
104+
105+
variable {D} in
106+
@[simp]
107+
lemma opEquiv_inverse_map_inclRight_op {c c' : C} (f : c ⟶ c') :
108+
(opEquiv C D).inverse.map ((inclRight Dᵒᵖ Cᵒᵖ).map f.op) = op ((inclLeft _ _).map f) :=
109+
rfl
110+
111+
variable {C D} in
112+
@[simp]
113+
lemma opEquiv_inverse_map_edge_op (c : C) (d : D) :
114+
(opEquiv C D).inverse.map (edge (op d) (op c)) = op (edge c d) :=
115+
rfl
116+
117+
/-- Characterize `Join.opEquivInverse` with respect to the left inclusion -/
118+
def inclLeftCompOpEquivInverse :
119+
Join.inclLeft Dᵒᵖ Cᵒᵖ ⋙ (opEquiv C D).inverse ≅ (inclRight _ _).op :=
120+
Join.mkFunctorLeft _ _ _
121+
122+
/-- Characterize `Join.opEquivInverse` with respect to the right inclusion -/
123+
def inclRightCompOpEquivInverse :
124+
Join.inclRight Dᵒᵖ Cᵒᵖ ⋙ (opEquiv C D).inverse ≅ (inclLeft _ _).op :=
125+
Join.mkFunctorRight _ _ _
126+
127+
variable {D} in
128+
@[simp]
129+
lemma inclLeftCompOpEquivInverse_hom_app_op (d : D) :
130+
(inclLeftCompOpEquivInverse C D).hom.app (op d) = 𝟙 (op <| right d) :=
131+
rfl
132+
133+
variable {C} in
134+
@[simp]
135+
lemma inclRightCompOpEquivInverse_hom_app_op (c : C) :
136+
(inclRightCompOpEquivInverse C D).hom.app (op c) = 𝟙 (op <| left c) :=
137+
rfl
138+
139+
variable {D} in
140+
@[simp]
141+
lemma inclLeftCompOpEquivInverse_inv_app_op (d : D) :
142+
(inclLeftCompOpEquivInverse C D).inv.app (op d) = 𝟙 (op <| right d) :=
143+
rfl
144+
145+
variable {C} in
146+
@[simp]
147+
lemma inclRightCompOpEquivInverse_inv_app_op (c : C) :
148+
(inclRightCompOpEquivInverse C D).inv.app (op c) = 𝟙 (op <| left c) :=
149+
rfl
150+
151+
end CategoryTheory.Join

0 commit comments

Comments
 (0)