forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOfLocalizedEquivalences.lean
More file actions
185 lines (161 loc) · 8.36 KB
/
Copy pathOfLocalizedEquivalences.lean
File metadata and controls
185 lines (161 loc) · 8.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/-
Copyright (c) 2026 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/
module
public import Mathlib.CategoryTheory.Localization.DerivabilityStructure.Basic
public import Mathlib.CategoryTheory.GuitartExact.HorizontalComposition
/-!
# Derivability structures deduced from localized equivalences
Assume that we have a diagram of localizer morphisms, in the
sense that we have an isomorphism `T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor`.
```
T
W₁ ---> W₂
| |
L| |R
v v
W₁' ---> W₂'
B
```
In this file, we obtain the lemma
`LocalizerMorphism.isRightDerivabilityStructure_of_isLocalizedEquivalence` which shows
that if both `L` and `R` are localized equivalences (with `R.functor` essentially surjective),
then `B` is a right derivability structure when `T` is a right derivability structure,
the `2`-square above is Guitart exact (and `W₂'` respects isomorphisms).
In addition, if we require that `L.functor` is also essentially surjective,
that `R.functor` is full and that `W₂` is induced by `W₂'`, then
`B` is a right derivability structure iff `T` is.
The dual results for left derivability structures are also obtained.
This will be particularly useful when `L.functor` and `R.functor` are functors
from a category to a quotient category (e.g. functors from categories of homological
complexes to homotopy categories).
-/
@[expose] public section
namespace CategoryTheory
namespace LocalizerMorphism
variable {C₁ C₂ D₁ D₂ : Type*} [Category* C₁] [Category* C₂] [Category* D₁] [Category* D₂]
{W₁ : MorphismProperty C₁} {W₁' : MorphismProperty D₁}
{W₂ : MorphismProperty C₂} {W₂' : MorphismProperty D₂}
{T : LocalizerMorphism W₁ W₂} {L : LocalizerMorphism W₁ W₁'}
{R : LocalizerMorphism W₂ W₂'} {B : LocalizerMorphism W₁' W₂'}
section
variable [W₂'.RespectsIso]
[L.IsLocalizedEquivalence] [R.IsLocalizedEquivalence] [R.functor.EssSurj]
set_option backward.isDefEq.respectTransparency false in
lemma isLeftDerivabilityStructure_of_isLocalizedEquivalence
[T.IsLeftDerivabilityStructure]
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor)
[TwoSquare.GuitartExact iso.inv] :
B.IsLeftDerivabilityStructure := by
have : B.HasLeftResolutions := fun Y₂ ↦ by
obtain ⟨X₂, ⟨e₂⟩⟩ := Functor.EssSurj.mem_essImage R.functor Y₂
have ρ : T.LeftResolution X₂ := Classical.arbitrary _
exact ⟨{
X₁ := L.functor.obj ρ.X₁
w := iso.inv.app _ ≫ R.functor.map ρ.w ≫ e₂.hom
hw := (W₂'.arrow_mk_iso_iff (Arrow.isoMk (iso.app _) e₂)).1 (R.map _ ρ.hw) }⟩
let F := B.localizedFunctor W₁'.Q W₂'.Q
let e' := CatCommSq.iso B.functor W₁'.Q W₂'.Q F
letI iso' : CatCommSq T.functor L.functor R.functor B.functor := ⟨iso⟩
letI : CatCommSq T.functor (L.functor ⋙ W₁'.Q) (R.functor ⋙ W₂'.Q) F :=
CatCommSq.vComp (H₂ := B.functor) _ _ _ _ _ _
have : (TwoSquare.hComp iso.inv e'.inv).GuitartExact := by
convert T.guitartExact_of_isLeftDerivabilityStructure' (L.functor ⋙ W₁'.Q)
(R.functor ⋙ W₂'.Q) F (CatCommSq.iso _ _ _ _)
ext
simp [e', CatCommSq.iso, iso']
rw [B.isLeftDerivabilityStructure_iff W₁'.Q W₂'.Q F e']
apply TwoSquare.GuitartExact.of_hComp iso.inv
set_option backward.defeqAttrib.useBackward true in
lemma isLeftDerivabilityStructure_iff_of_isLocalizedEquivalence
[L.functor.EssSurj] [R.functor.Full] [R.IsInduced]
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor)
[TwoSquare.GuitartExact iso.inv] :
T.IsLeftDerivabilityStructure ↔ B.IsLeftDerivabilityStructure := by
refine ⟨fun _ ↦ isLeftDerivabilityStructure_of_isLocalizedEquivalence iso, fun _ ↦ ?_⟩
have : T.HasLeftResolutions := fun X₂ ↦ by
let ρ : B.LeftResolution (R.functor.obj X₂) := Classical.arbitrary _
exact ⟨{
X₁ := L.functor.objPreimage ρ.X₁
w :=
R.functor.preimage (iso.hom.app _ ≫
B.functor.map (L.functor.objObjPreimageIso ρ.X₁).hom ≫ ρ.w)
hw := by
simp only [← R.inverseImage_eq, Functor.comp_obj,
MorphismProperty.inverseImage_iff, Functor.map_preimage]
refine (W₂'.arrow_mk_iso_iff ?_).2 ρ.hw
exact Arrow.isoMk (iso.app _ ≪≫ B.functor.mapIso (L.functor.objObjPreimageIso ρ.X₁))
(Iso.refl _) }⟩
let F := B.localizedFunctor W₁'.Q W₂'.Q
let e' := CatCommSq.iso B.functor W₁'.Q W₂'.Q F
let e : T.functor ⋙ R.functor ⋙ W₂'.Q ≅ (L.functor ⋙ W₁'.Q) ⋙ F :=
(Functor.associator _ _ _).symm ≪≫ Functor.isoWhiskerRight iso _ ≪≫
Functor.associator _ _ _ ≪≫
Functor.isoWhiskerLeft _ e' ≪≫ (Functor.associator _ _ _).symm
have he' : TwoSquare.GuitartExact e'.inv := inferInstance
have : TwoSquare.hComp iso.inv e'.inv = e.inv := by ext; simp [e]
rw [T.isLeftDerivabilityStructure_iff (L.functor ⋙ W₁'.Q)
(R.functor ⋙ W₂'.Q) F e, ← this]
infer_instance
lemma isRightDerivabilityStructure_of_isLocalizedEquivalence
[T.IsRightDerivabilityStructure]
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor)
[TwoSquare.GuitartExact iso.hom] :
B.IsRightDerivabilityStructure := by
rw [isRightDerivabilityStructure_iff_op]
let iso' : T.op.functor ⋙ R.op.functor ≅ L.op.functor ⋙ B.op.functor := NatIso.op iso.symm
have : TwoSquare.GuitartExact iso'.inv :=
inferInstanceAs (TwoSquare.op iso.hom).GuitartExact
exact isLeftDerivabilityStructure_of_isLocalizedEquivalence iso'
lemma isRightDerivabilityStructure_iff_of_isLocalizedEquivalence
[L.functor.EssSurj] [R.functor.Full] [R.IsInduced]
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor)
[TwoSquare.GuitartExact iso.hom] :
T.IsRightDerivabilityStructure ↔ B.IsRightDerivabilityStructure := by
simp only [isRightDerivabilityStructure_iff_op]
let iso' : T.op.functor ⋙ R.op.functor ≅ L.op.functor ⋙ B.op.functor := NatIso.op iso.symm
have : TwoSquare.GuitartExact iso'.inv :=
inferInstanceAs (TwoSquare.op iso.hom).GuitartExact
exact isLeftDerivabilityStructure_iff_of_isLocalizedEquivalence iso'
end
variable [W₁'.RespectsIso] [W₂'.RespectsIso] [L.IsInduced] [L.functor.IsEquivalence]
[R.IsInduced] [R.functor.IsEquivalence]
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor)
lemma isLeftDerivabilityStructure_of_equivalences
[T.IsLeftDerivabilityStructure]
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor) :
B.IsLeftDerivabilityStructure := by
have := L.isLocalizedEquivalence_of_isInduced
have := R.isLocalizedEquivalence_of_isInduced
exact isLeftDerivabilityStructure_of_isLocalizedEquivalence iso
open Functor in
lemma isLeftDerivabilityStructure_iff_of_equivalences
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor) :
T.IsLeftDerivabilityStructure ↔ B.IsLeftDerivabilityStructure :=
⟨fun _ ↦ isLeftDerivabilityStructure_of_equivalences iso, fun _ ↦ by
let e : B.functor ⋙ R.inv.functor ≅ L.inv.functor ⋙ T.functor :=
(leftUnitor _).symm ≪≫
isoWhiskerRight L.functor.asEquivalence.counitIso.symm _ ≪≫
associator _ _ _ ≪≫ isoWhiskerLeft _ (associator _ _ _).symm ≪≫
isoWhiskerLeft _ (isoWhiskerRight iso.symm R.inv.functor) ≪≫
isoWhiskerLeft _ (associator _ _ _) ≪≫
isoWhiskerLeft _ (isoWhiskerLeft _ R.functor.asEquivalence.unitIso.symm) ≪≫
(associator _ _ _).symm ≪≫ rightUnitor _
have : W₁.RespectsIso := by rw [← L.inverseImage_eq]; infer_instance
have : W₂.RespectsIso := by rw [← R.inverseImage_eq]; infer_instance
exact isLeftDerivabilityStructure_of_equivalences e⟩
lemma isRightDerivabilityStructure_iff_of_equivalences
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor) :
T.IsRightDerivabilityStructure ↔ B.IsRightDerivabilityStructure := by
let e : T.op.functor ⋙ R.op.functor ≅ L.op.functor ⋙ B.op.functor := NatIso.op iso.symm
simp only [isRightDerivabilityStructure_iff_op,
isLeftDerivabilityStructure_iff_of_equivalences e]
lemma isRightDerivabilityStructure_of_equivalences
[T.IsRightDerivabilityStructure]
(iso : T.functor ⋙ R.functor ≅ L.functor ⋙ B.functor) :
B.IsRightDerivabilityStructure := by
rwa [← isRightDerivabilityStructure_iff_of_equivalences iso]
end LocalizerMorphism
end CategoryTheory