{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
module OAlg.Limes.Limits.Core
(
limes, LimitsG(..), Limits
, limesCone, limitsCone
, lmsMltPrjOrnt, lmsMltInjOrnt
) where
import OAlg.Prelude
import OAlg.Structure.Oriented
import OAlg.Structure.Multiplicative
import OAlg.Entity.Diagram
import OAlg.Limes.Cone
import OAlg.Limes.Definition
newtype LimitsG c s p d t n m x = LimitsG (d t n m x -> LimesG c s p d t n m x)
type Limits s p = LimitsG Cone s p Diagram
limes :: LimitsG c s p d t n m x -> d t n m x -> LimesG c s p d t n m x
limes :: forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
LimitsG c s p d t n m x -> d t n m x -> LimesG c s p d t n m x
limes (LimitsG d t n m x -> LimesG c s p d t n m x
l) = d t n m x -> LimesG c s p d t n m x
l
limesCone :: Conic c => LimitsG c s p d t n m x -> d t n m x -> LimesG Cone s p d t n m x
limesCone :: forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
Conic c =>
LimitsG c s p d t n m x -> d t n m x -> LimesG Cone s p d t n m x
limesCone LimitsG c s p d t n m x
lG d t n m x
d = case LimitsG c s p d t n m x -> d t n m x -> LimesG c s p d t n m x
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
LimitsG c s p d t n m x -> d t n m x -> LimesG c s p d t n m x
limes LimitsG c s p d t n m x
lG d t n m x
d of
LimesProjective c s 'Projective d t n m x
cCn Cone s 'Projective d t n m x -> x
cUniv -> Cone s 'Projective d t n m x
-> (Cone s 'Projective d t n m x -> x)
-> LimesG Cone s 'Projective d t n m x
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (d :: DiagramType -> N' -> N' -> * -> *) (t :: DiagramType)
(n :: N') (m :: N') x.
c s 'Projective d t n m x
-> (Cone s 'Projective d t n m x -> x)
-> LimesG c s 'Projective d t n m x
LimesProjective (c s 'Projective d t n m x -> Cone s 'Projective d t n m x
forall s (p :: Perspective)
(d :: DiagramType -> N' -> N' -> * -> *) (t :: DiagramType)
(n :: N') (m :: N') x.
c s p d t n m x -> Cone s p d t n m x
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
Conic c =>
c s p d t n m x -> Cone s p d t n m x
cone c s 'Projective d t n m x
cCn) Cone s 'Projective d t n m x -> x
cUniv
LimesInjective c s 'Injective d t n m x
cCn Cone s 'Injective d t n m x -> x
cUniv -> Cone s 'Injective d t n m x
-> (Cone s 'Injective d t n m x -> x)
-> LimesG Cone s 'Injective d t n m x
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (d :: DiagramType -> N' -> N' -> * -> *) (t :: DiagramType)
(n :: N') (m :: N') x.
c s 'Injective d t n m x
-> (Cone s 'Injective d t n m x -> x)
-> LimesG c s 'Injective d t n m x
LimesInjective (c s 'Injective d t n m x -> Cone s 'Injective d t n m x
forall s (p :: Perspective)
(d :: DiagramType -> N' -> N' -> * -> *) (t :: DiagramType)
(n :: N') (m :: N') x.
c s p d t n m x -> Cone s p d t n m x
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
Conic c =>
c s p d t n m x -> Cone s p d t n m x
cone c s 'Injective d t n m x
cCn) Cone s 'Injective d t n m x -> x
cUniv
limitsCone :: Conic c => LimitsG c s p d t n m x -> LimitsG Cone s p d t n m x
limitsCone :: forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
Conic c =>
LimitsG c s p d t n m x -> LimitsG Cone s p d t n m x
limitsCone = (d t n m x -> LimesG Cone s p d t n m x)
-> LimitsG Cone s p d t n m x
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
(d t n m x -> LimesG c s p d t n m x) -> LimitsG c s p d t n m x
LimitsG ((d t n m x -> LimesG Cone s p d t n m x)
-> LimitsG Cone s p d t n m x)
-> (LimitsG c s p d t n m x
-> d t n m x -> LimesG Cone s p d t n m x)
-> LimitsG c s p d t n m x
-> LimitsG Cone s p d t n m x
forall y z x. (y -> z) -> (x -> y) -> x -> z
forall (c :: * -> * -> *) y z x.
Category c =>
c y z -> c x y -> c x z
. LimitsG c s p d t n m x -> d t n m x -> LimesG Cone s p d t n m x
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
Conic c =>
LimitsG c s p d t n m x -> d t n m x -> LimesG Cone s p d t n m x
limesCone
lmsMltPrjOrnt :: Entity p => p -> Limits Mlt Projective t n m (Orientation p)
lmsMltPrjOrnt :: forall p (t :: DiagramType) (n :: N') (m :: N').
Entity p =>
p -> Limits Mlt 'Projective t n m (Orientation p)
lmsMltPrjOrnt = (Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Projective Diagram t n m (Orientation p))
-> Limits Mlt 'Projective t n m (Orientation p)
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
(d t n m x -> LimesG c s p d t n m x) -> LimitsG c s p d t n m x
LimitsG ((Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Projective Diagram t n m (Orientation p))
-> Limits Mlt 'Projective t n m (Orientation p))
-> (p
-> Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Projective Diagram t n m (Orientation p))
-> p
-> Limits Mlt 'Projective t n m (Orientation p)
forall y z x. (y -> z) -> (x -> y) -> x -> z
forall (c :: * -> * -> *) y z x.
Category c =>
c y z -> c x y -> c x z
. p
-> Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Projective Diagram t n m (Orientation p)
forall p x (t :: DiagramType) (n :: N') (m :: N').
(Entity p, x ~ Orientation p) =>
p -> Diagram t n m x -> Limes Mlt 'Projective t n m x
lmMltPrjOrnt
lmsMltInjOrnt :: Entity p => p -> Limits Mlt Injective t n m (Orientation p)
lmsMltInjOrnt :: forall p (t :: DiagramType) (n :: N') (m :: N').
Entity p =>
p -> Limits Mlt 'Injective t n m (Orientation p)
lmsMltInjOrnt = (Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Injective Diagram t n m (Orientation p))
-> Limits Mlt 'Injective t n m (Orientation p)
forall (c :: *
-> Perspective
-> (DiagramType -> N' -> N' -> * -> *)
-> DiagramType
-> N'
-> N'
-> *
-> *)
s (p :: Perspective) (d :: DiagramType -> N' -> N' -> * -> *)
(t :: DiagramType) (n :: N') (m :: N') x.
(d t n m x -> LimesG c s p d t n m x) -> LimitsG c s p d t n m x
LimitsG ((Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Injective Diagram t n m (Orientation p))
-> Limits Mlt 'Injective t n m (Orientation p))
-> (p
-> Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Injective Diagram t n m (Orientation p))
-> p
-> Limits Mlt 'Injective t n m (Orientation p)
forall y z x. (y -> z) -> (x -> y) -> x -> z
forall (c :: * -> * -> *) y z x.
Category c =>
c y z -> c x y -> c x z
. p
-> Diagram t n m (Orientation p)
-> LimesG Cone Mlt 'Injective Diagram t n m (Orientation p)
forall p x (t :: DiagramType) (n :: N') (m :: N').
(Entity p, x ~ Orientation p) =>
p -> Diagram t n m x -> Limes Mlt 'Injective t n m x
lmMltInjOrnt