BNFC-2.6.0.3: A compiler front-end generator.

Safe HaskellNone

Algebra.RingUtils

Documentation

module Prelude

class AbelianGroup a whereSource

Methods

zero :: aSource

(+) :: a -> a -> aSource

class AbelianGroup a => AbelianGroupZ a whereSource

Methods

isZero :: a -> BoolSource

class AbelianGroupZ a => Ring a whereSource

Methods

(*) :: a -> a -> aSource

Instances

class AbelianGroupZ a => RingP a whereSource

Methods

mul :: Bool -> a -> a -> Pair aSource

data Pair a Source

Constructors

:/: 

Fields

leftOf :: a
 
rightOf :: a
 

select :: Bool -> [a] -> Pair [a]Source

onlyLeft :: [a] -> Pair [a]Source

onlyRight :: [a] -> Pair [a]Source

newtype O f g a Source

Constructors

O 

Fields

fromO :: f (g a)
 

Instances

(Functor f, Functor g) => Functor (O f g) 
Matrix m => Matrix (O Pair m) 
Show (f (g a)) => Show (O f g a) 
(AbelianGroup (O f g a), AbelianGroupZ (f (g a))) => AbelianGroupZ (O f g a) 
AbelianGroup (f (g a)) => AbelianGroup (O f g a) 

sum :: AbelianGroup a => [a] -> aSource

mulDefault :: RingP a => a -> a -> aSource

module Data.Pair