src/library/Abstract/Category/Finitary.hs
Use camelCase Open
Open
class Category morph => E'PairCofinitary morph where
-- | Check if the given pair of morphisms \(X \overset{f}{\to} Z
-- \overset{g}{\leftarrow} Y\) belongs to the class \(\mathcal{E}'\) of joint
-- surjections. The behaviour is undefined if the given morphisms have
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Found
class Category morph => E'PairCofinitary morph where
isJointSurjection :: (morph, morph) -> Bool
findJointSurjections ::
(MorphismClass morph, Obj morph)
-> (MorphismClass morph, Obj morph) -> [(morph, morph)]
default findJointSurjections ::
(ECofinitary morph, Cocomplete morph) =>
(MorphismClass morph, Obj morph)
-> (MorphismClass morph, Obj morph) -> [(morph, morph)]
findJointSurjections (c1, x) (c2, y)
= let (jx, jy) = calculateCoproduct x y
in
[(f, g) |
e <- findAllQuotientsOf (codomain jx),
let (f, g) = (e <&> jx, e <&> jy),
f `belongsToClass` c1,
g `belongsToClass` c2]
findJointSurjectionSquares ::
(MorphismClass morph, morph)
-> (MorphismClass morph, morph) -> [(morph, morph)]
findJointSurjectionSquares (cf, f) (cg, g)
= [(f', g') |
(g', f') <- findJointSurjections (cf, codomain f) (cg, codomain g),
g' <&> f == f' <&> g]
Perhaps
class Category morph => EPairCofinitary morph where
isJointSurjection :: (morph, morph) -> Bool
findJointSurjections ::
(MorphismClass morph, Obj morph)
-> (MorphismClass morph, Obj morph) -> [(morph, morph)]
default findJointSurjections ::
(ECofinitary morph, Cocomplete morph) =>
(MorphismClass morph, Obj morph)
-> (MorphismClass morph, Obj morph) -> [(morph, morph)]
findJointSurjections (c1, x) (c2, y)
= let (jx, jy) = calculateCoproduct x y
in
[(f, g) |
e <- findAllQuotientsOf (codomain jx),
let (f, g) = (e `<&>` jx, e `<&>` jy),
f `belongsToClass` c1,
g `belongsToClass` c2]
findJointSurjectionSquares ::
(MorphismClass morph, morph)
-> (MorphismClass morph, morph) -> [(morph, morph)]
findJointSurjectionSquares (cf, f) (cg, g)
= [(f', g') |
(g', f') <- findJointSurjections (cf, codomain f) (cg, codomain g),
g' `<&>` f `==` f' `<&>` g]