1
1
/-
2
2
Copyright (c) 2022 Scott Morrison. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
- Authors: Scott Morrison
4
+ Authors: Scott Morrison, Joël Riou
5
5
-/
6
+ import category_theory.comm_sq
6
7
import category_theory.limits.preserves.shapes.pullbacks
7
8
import category_theory.limits.shapes.zero_morphisms
8
9
import category_theory.limits.constructions.binary_products
10
+ import category_theory.limits.opposites
9
11
10
12
/-!
11
13
# Pullback and pushout squares
@@ -49,31 +51,10 @@ namespace category_theory
49
51
50
52
variables {C : Type u₁} [category.{v₁} C]
51
53
52
- /-- The proposition that a square
53
- ```
54
- W ---f---> X
55
- | |
56
- g h
57
- | |
58
- v v
59
- Y ---i---> Z
60
-
61
- ```
62
- is a commuting square.
63
- -/
64
- structure comm_sq {W X Y Z : C} (f : W ⟶ X) (g : W ⟶ Y) (h : X ⟶ Z) (i : Y ⟶ Z) : Prop :=
65
- (w : f ≫ h = g ≫ i)
66
-
67
- attribute [reassoc] comm_sq.w
68
-
69
54
namespace comm_sq
70
55
71
56
variables {W X Y Z : C} {f : W ⟶ X} {g : W ⟶ Y} {h : X ⟶ Z} {i : Y ⟶ Z}
72
57
73
- lemma flip (p : comm_sq f g h i) : comm_sq g f i h := ⟨p.w.symm⟩
74
-
75
- lemma of_arrow {f g : arrow C} (h : f ⟶ g) : comm_sq f.hom h.left h.right g.hom := ⟨h.w.symm⟩
76
-
77
58
/--
78
59
The (not necessarily limiting) `pullback_cone h i` implicit in the statement
79
60
that we have `comm_sq f g h i`.
@@ -86,6 +67,32 @@ that we have `comm_sq f g h i`.
86
67
-/
87
68
def cocone (s : comm_sq f g h i) : pushout_cocone f g := pushout_cocone.mk _ _ s.w
88
69
70
+ /-- The pushout cocone in the opposite category associated to the cone of
71
+ a commutative square identifies to the cocone of the flipped commutative square in
72
+ the opposite category -/
73
+ def cone_op (p : comm_sq f g h i) : p.cone.op ≅ p.flip.op.cocone :=
74
+ pushout_cocone.ext (iso.refl _) (by tidy) (by tidy)
75
+
76
+ /-- The pullback cone in the opposite category associated to the cocone of
77
+ a commutative square identifies to the cone of the flipped commutative square in
78
+ the opposite category -/
79
+ def cocone_op (p : comm_sq f g h i) : p.cocone.op ≅ p.flip.op.cone :=
80
+ pullback_cone.ext (iso.refl _) (by tidy) (by tidy)
81
+
82
+ /-- The pushout cocone obtained from the pullback cone associated to a
83
+ commutative square in the opposite category identifies to the cocone associated
84
+ to the flipped square. -/
85
+ def cone_unop {W X Y Z : Cᵒᵖ} {f : W ⟶ X} {g : W ⟶ Y} {h : X ⟶ Z} {i : Y ⟶ Z}
86
+ (p : comm_sq f g h i) : p.cone.unop ≅ p.flip.unop.cocone :=
87
+ pushout_cocone.ext (iso.refl _) (by tidy) (by tidy)
88
+
89
+ /-- The pullback cone obtained from the pushout cone associated to a
90
+ commutative square in the opposite category identifies to the cone associated
91
+ to the flipped square. -/
92
+ def cocone_unop {W X Y Z : Cᵒᵖ} {f : W ⟶ X} {g : W ⟶ Y} {h : X ⟶ Z} {i : Y ⟶ Z}
93
+ (p : comm_sq f g h i) : p.cocone.unop ≅ p.flip.unop.cone :=
94
+ pullback_cone.ext (iso.refl _) (by tidy) (by tidy)
95
+
89
96
end comm_sq
90
97
91
98
/-- The proposition that a square
@@ -357,6 +364,17 @@ lemma of_right {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C}
357
364
is_pullback h₁₁ v₁₁ v₁₂ h₂₁ :=
358
365
(of_bot s.flip p.symm t.flip).flip
359
366
367
+ lemma op (h : is_pullback fst snd f g) : is_pushout g.op f.op snd.op fst.op :=
368
+ is_pushout.of_is_colimit (is_colimit.of_iso_colimit
369
+ (limits.pullback_cone.is_limit_equiv_is_colimit_op h.flip.cone h.flip.is_limit)
370
+ h.to_comm_sq.flip.cone_op)
371
+
372
+ lemma unop {P X Y Z : Cᵒᵖ} {fst : P ⟶ X} {snd : P ⟶ Y} {f : X ⟶ Z} {g : Y ⟶ Z}
373
+ (h : is_pullback fst snd f g) : is_pushout g.unop f.unop snd.unop fst.unop :=
374
+ is_pushout.of_is_colimit (is_colimit.of_iso_colimit
375
+ (limits.pullback_cone.is_limit_equiv_is_colimit_unop h.flip.cone h.flip.is_limit)
376
+ h.to_comm_sq.flip.cone_unop)
377
+
360
378
end is_pullback
361
379
362
380
namespace is_pushout
@@ -429,16 +447,24 @@ lemma of_right {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C}
429
447
is_pushout h₁₂ v₁₂ v₁₃ h₂₂ :=
430
448
(of_bot s.flip p.symm t.flip).flip
431
449
450
+ lemma op (h : is_pushout f g inl inr) : is_pullback inr.op inl.op g.op f.op :=
451
+ is_pullback.of_is_limit (is_limit.of_iso_limit
452
+ (limits.pushout_cocone.is_colimit_equiv_is_limit_op h.flip.cocone h.flip.is_colimit)
453
+ h.to_comm_sq.flip.cocone_op)
454
+
455
+ lemma unop {Z X Y P : Cᵒᵖ} {f : Z ⟶ X} {g : Z ⟶ Y} {inl : X ⟶ P} {inr : Y ⟶ P}
456
+ (h : is_pushout f g inl inr) : is_pullback inr.unop inl.unop g.unop f.unop :=
457
+ is_pullback.of_is_limit (is_limit.of_iso_limit
458
+ (limits.pushout_cocone.is_colimit_equiv_is_limit_unop h.flip.cocone h.flip.is_colimit)
459
+ h.to_comm_sq.flip.cocone_unop)
460
+
432
461
end is_pushout
433
462
434
463
namespace functor
435
464
436
465
variables {D : Type u₂} [category.{v₂} D]
437
466
variables (F : C ⥤ D) {W X Y Z : C} {f : W ⟶ X} {g : W ⟶ Y} {h : X ⟶ Z} {i : Y ⟶ Z}
438
467
439
- lemma map_comm_sq (s : comm_sq f g h i) : comm_sq (F.map f) (F.map g) (F.map h) (F.map i) :=
440
- ⟨by simpa using congr_arg (λ k : W ⟶ Z, F.map k) s.w⟩
441
-
442
468
lemma map_is_pullback [preserves_limit (cospan h i) F] (s : is_pullback f g h i) :
443
469
is_pullback (F.map f) (F.map g) (F.map h) (F.map i) :=
444
470
-- This is made slightly awkward because `C` and `D` have different universes,
465
491
466
492
end functor
467
493
468
- alias functor.map_comm_sq ← comm_sq.map
469
494
alias functor.map_is_pullback ← is_pullback.map
470
495
alias functor.map_is_pushout ← is_pushout.map
471
496
0 commit comments