{-# OPTIONS --without-K --safe #-}
open import Categories.Category
import Categories.Morphism.Reasoning
module Categories.Morphism.Lifts {o β e} (π : Category o β e) where
open import Level
open Category π
open Definitions π
open Categories.Morphism.Reasoning π using (pullΛ‘)
record Filler {A B X Y} {i : A β B} {f : A β X} {g : B β Y} {p : X β Y}
(comm : CommutativeSquare i f g p) : Set (β β e) where
field
filler : B β X
fill-commΛ‘ : filler β i β f
fill-commΚ³ : p β filler β g
Lifts : β {A B X Y} β (i : A β B) β (p : X β Y) β Set (β β e)
Lifts i p = β {f g} β (comm : CommutativeSquare i f g p) β Filler comm
record Diagonal {A B C D} (i : A β B) (f : A β C)
(g : B β D) (p : C β D) : Set (β β e) where
field
d : B β C
commΛ‘ : d β i β f
commΚ³ : p β d β g
comm : CommutativeSquare i f g p
comm = begin
g β i ββ¨ pullΛ‘ commΚ³ β¨
p β d β i ββ¨ reflβ©ββ¨ commΛ‘ β©
p β f β
where open HomReasoning
toFiller : Filler comm
toFiller = Filler.constructor d commΛ‘ commΚ³
FillerβDiagonal : β {A B X Y} {i : A β B} {f : A β X} {g : B β Y} {p : X β Y}
{comm : CommutativeSquare i f g p}
β Filler comm
β Diagonal i f g p
FillerβDiagonal f = record { d = filler ; commΛ‘ = fill-commΛ‘ ; commΚ³ = fill-commΚ³ }
where open Filler f
record UniqueDiagonal {A B X Y} (i : A β B) (f : A β X)
(g : B β Y) (p : X β Y) : Set (β β e) where
field
diagonal : Diagonal i f g p
open Diagonal diagonal public
field
unique : β (v : Diagonal i f g p) β d β Diagonal.d v
uniqueβ : β (v w : Diagonal i f g p) β Diagonal.d v β Diagonal.d w
uniqueβ v w = begin
Diagonal.d v ββ¨ unique v β¨
d ββ¨ unique w β©
Diagonal.d w β
where open HomReasoning
MorphismClass : (p : Level) β Set (o β β β suc p)
MorphismClass p = β {X Y} β X β Y β Set p
β-closed : {p : Level} β (M : MorphismClass p) β Set (o β β β e β p)
β-closed M = β {X Y} β {f g : X β Y} β f β g β M f β M g
record MorphismClassMember {p : Level} (M : MorphismClass p) (A B : Obj) : Set (p β β) where
field
mor : A β B
in-class : M mor
Projective : β {j} {A B} β MorphismClass j β (i : A β B) β Set (o β β β e β j)
Projective J i = β {X Y} β (f : X β Y) β J f β Lifts i f
Injective : β {j} {A B} β MorphismClass j β (i : A β B) β Set (o β β β e β j)
Injective J i = β {X Y} β (f : X β Y) β J f β Lifts f i
Proj : β {j} (J : MorphismClass j) β MorphismClass (o β β β e β j)
Proj J = Projective J
Inj : β {j} (J : MorphismClass j) β MorphismClass (o β β β e β j)
Inj J = Injective J