categories-0.54.1: categories from category-extras

Portabilitynon-portable (class-associated types)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Category.Distributive

Contents

Description

 

Synopsis

Distributive Categories

factor :: (PreCartesian k, PreCoCartesian k) => Sum k (Product k a b) (Product k a c) `k` Product k a (Sum k b c)Source

The canonical factoring morphism.

 factor :: ( PreCartesian k
         , (*) ~ Product k
         , PreCoCartesian k
         , (+) ~ Sum k 
         ) => ((a * b) + (a * c)) `k` (a * (b + c))

class (PreCartesian k, PreCoCartesian k) => Distributive k whereSource

A category in which factor is an isomorphism

 class ( PreCartesian k 
       , (*) ~ Product k
       , PreCoCartesian k
       , (+) ~ Sum k 
       ) => Distributive k where

Methods

distribute :: Product k a (Sum k b c) `k` Sum k (Product k a b) (Product k a c)Source

Instances