Skip to content

Commit 8509bc5

Browse files
Merge pull request #449 from frederikgebert/pullback-properties
Pullback properties
2 parents a66830c + 7d87911 commit 8509bc5

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

src/Categories/Diagram/Pullback/Properties.agda

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,96 @@ module IsoPb {X Y Z} {f : X ⇒ Z} {g : Y ⇒ Z} (pull₀ pull₁ : Pullback f g
189189

190190
p₂-≈ : p₂ pull₁ ∘ P₀⇒P₁ ≈ p₂ pull₀
191191
p₂-≈ = p₂∘universal≈h₂ pull₁ {eq = commute pull₀}
192+
193+
194+
-- pasting law for pullbacks:
195+
-- in a commutative diagram of the form
196+
-- A -> B -> C
197+
-- | | |
198+
-- D -> E -> F
199+
-- if the right square (BCEF) is a pullback,
200+
-- then the left square (ABDE) is a pullback
201+
-- iff the big square (ACDF) is a pullback.
202+
module PullbackPastingLaw {A B C D E F : Obj}
203+
{f : A ⇒ B} {g : B ⇒ C} {h : A ⇒ D} {i : B ⇒ E} {j : C ⇒ F} {k : D ⇒ E} {l : E ⇒ F}
204+
(ABDE : i ∘ f ≈ k ∘ h) (BCEF : j ∘ g ≈ l ∘ i) (pbᵣ : IsPullback g i j l) where
205+
206+
open IsPullback using (p₁∘universal≈h₁; p₂∘universal≈h₂; universal; unique-diagram)
207+
208+
leftPullback⇒bigPullback : IsPullback f h i k IsPullback (g ∘ f) h j (l ∘ k)
209+
leftPullback⇒bigPullback pbₗ = record
210+
{ commute = ACDF
211+
; universal = universalb
212+
; p₁∘universal≈h₁ = [g∘f]∘universalb≈h₁
213+
; p₂∘universal≈h₂ = p₂∘universal≈h₂ pbₗ
214+
; unique-diagram = unique-diagramb
215+
} where
216+
ACDF : j ∘ (g ∘ f) ≈ (l ∘ k) ∘ h
217+
ACDF = begin
218+
j ∘ g ∘ f ≈⟨ extendʳ BCEF ⟩
219+
l ∘ i ∘ f ≈⟨ pushʳ ABDE ⟩
220+
(l ∘ k) ∘ h ∎
221+
222+
-- first apply universal property of (BCEF) to get a morphism H -> B,
223+
-- then apply universal property of (ABDE) to get a morphism H -> A.
224+
universalb : {H : Obj} {h₁ : H ⇒ C} {h₂ : H ⇒ D} j ∘ h₁ ≈ (l ∘ k) ∘ h₂ H ⇒ A
225+
universalb {_} {h₁} {h₂} eq = universal pbₗ (p₂∘universal≈h₂ pbᵣ {eq = j∘h₁≈l∘k∘h₂}) where
226+
j∘h₁≈l∘k∘h₂ : j ∘ h₁ ≈ l ∘ k ∘ h₂
227+
j∘h₁≈l∘k∘h₂ = begin
228+
j ∘ h₁ ≈⟨ eq ⟩
229+
(l ∘ k) ∘ h₂ ≈⟨ assoc ⟩
230+
l ∘ k ∘ h₂ ∎
231+
232+
[g∘f]∘universalb≈h₁ : {H : Obj} {h₁ : H ⇒ C} {h₂ : H ⇒ D} {eq : j ∘ h₁ ≈ (l ∘ k) ∘ h₂} (g ∘ f) ∘ universalb eq ≈ h₁
233+
[g∘f]∘universalb≈h₁ {h₁ = h₁} = begin
234+
(g ∘ f) ∘ universalb _ ≈⟨ pullʳ (p₁∘universal≈h₁ pbₗ) ⟩
235+
g ∘ universal pbᵣ _ ≈⟨ p₁∘universal≈h₁ pbᵣ ⟩
236+
h₁ ∎
237+
238+
unique-diagramb : {H : Obj} {s t : H ⇒ A} (g ∘ f) ∘ s ≈ (g ∘ f) ∘ t h ∘ s ≈ h ∘ t s ≈ t
239+
unique-diagramb {_} {s} {t} eq eq' = unique-diagram pbₗ (unique-diagram pbᵣ g∘f∘s≈g∘f∘t i∘f∘s≈i∘f∘t) eq' where
240+
g∘f∘s≈g∘f∘t : g ∘ f ∘ s ≈ g ∘ f ∘ t
241+
g∘f∘s≈g∘f∘t = begin
242+
g ∘ f ∘ s ≈⟨ sym-assoc ⟩
243+
(g ∘ f) ∘ s ≈⟨ eq ⟩
244+
(g ∘ f) ∘ t ≈⟨ assoc ⟩
245+
g ∘ f ∘ t ∎
246+
i∘f∘s≈i∘f∘t : i ∘ f ∘ s ≈ i ∘ f ∘ t
247+
i∘f∘s≈i∘f∘t = begin
248+
i ∘ f ∘ s ≈⟨ pullˡ ABDE ⟩
249+
(k ∘ h) ∘ s ≈⟨ pullʳ eq' ⟩
250+
k ∘ h ∘ t ≈⟨ extendʳ (sym ABDE) ⟩
251+
i ∘ f ∘ t ∎
252+
253+
bigPullback⇒leftPullback : IsPullback (g ∘ f) h j (l ∘ k) IsPullback f h i k
254+
bigPullback⇒leftPullback pbb = record
255+
{ commute = ABDE
256+
; universal = universalₗ
257+
; p₁∘universal≈h₁ = f∘universalₗ≈h₁
258+
; p₂∘universal≈h₂ = p₂∘universal≈h₂ pbb
259+
; unique-diagram = unique-diagramb
260+
} where
261+
universalₗ : {H : Obj} {h₁ : H ⇒ B} {h₂ : H ⇒ D} i ∘ h₁ ≈ k ∘ h₂ H ⇒ A
262+
universalₗ {_} {h₁} {h₂} eq = universal pbb j∘g∘h₁≈[l∘k]∘h₂ where
263+
j∘g∘h₁≈[l∘k]∘h₂ : j ∘ g ∘ h₁ ≈ (l ∘ k) ∘ h₂
264+
j∘g∘h₁≈[l∘k]∘h₂ = begin
265+
j ∘ g ∘ h₁ ≈⟨ pullˡ BCEF ⟩
266+
(l ∘ i) ∘ h₁ ≈⟨ extendˡ eq ⟩
267+
(l ∘ k) ∘ h₂ ∎
268+
269+
f∘universalₗ≈h₁ : {H : Obj} {h₁ : H ⇒ B} {h₂ : H ⇒ D} {eq : i ∘ h₁ ≈ k ∘ h₂} f ∘ universalₗ eq ≈ h₁
270+
f∘universalₗ≈h₁ {_} {h₁} {h₂} {eq} = unique-diagram pbᵣ g∘f∘universalₗ≈g∘h₁ i∘f∘universalₗ≈i∘h₁ where
271+
g∘f∘universalₗ≈g∘h₁ : g ∘ f ∘ universalₗ _ ≈ g ∘ h₁
272+
g∘f∘universalₗ≈g∘h₁ = begin
273+
g ∘ f ∘ universalₗ _ ≈⟨ sym-assoc ⟩
274+
(g ∘ f) ∘ universalₗ _ ≈⟨ p₁∘universal≈h₁ pbb ⟩
275+
g ∘ h₁ ∎
276+
i∘f∘universalₗ≈i∘h₁ : i ∘ f ∘ universalₗ _ ≈ i ∘ h₁
277+
i∘f∘universalₗ≈i∘h₁ = begin
278+
i ∘ f ∘ universalₗ _ ≈⟨ pullˡ ABDE ⟩
279+
(k ∘ h) ∘ universalₗ _ ≈⟨ pullʳ (p₂∘universal≈h₂ pbb) ⟩
280+
k ∘ h₂ ≈⟨ sym eq ⟩
281+
i ∘ h₁ ∎
282+
283+
unique-diagramb : {H : Obj} {s t : H ⇒ A} f ∘ s ≈ f ∘ t h ∘ s ≈ h ∘ t s ≈ t
284+
unique-diagramb eq eq' = unique-diagram pbb (extendˡ eq) eq'

0 commit comments

Comments
 (0)