data-category-0.4.1: Category theory

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com

Data.Category.Peano

Description

A Peano category as in When is one thing equal to some other thing? Barry Mazur, 2007

Synopsis

Documentation

data PeanoO (~>) a whereSource

Constructors

PeanoO :: (TerminalObject ~> ~> x) -> (x ~> x) -> PeanoO ~> x 

data Peano whereSource

Constructors

PeanoA :: PeanoO ~> a -> PeanoO ~> b -> (a ~> b) -> Peano ~> a b 

Instances

HasTerminalObject ~> => Category (Peano ~>)

The Peano category.

HasInitialObject (Peano (->))

The natural numbers are the initial object for the Peano category.

peanoId :: Category ~> => PeanoO ~> a -> Obj (Peano ~>) aSource

peanoO :: Category ~> => Obj (Peano ~>) a -> PeanoO ~> aSource

data NatNum Source

Constructors

Z () 
S NatNum 

primRec :: (() -> t) -> (t -> t) -> NatNum -> tSource

Primitive recursion is the factorizer from the natural numbers.