heyting-algebras-0.0.2.0: Heyting and Boolean algebras

Safe HaskellSafe
LanguageHaskell2010

Algebra.Heyting.BoolRing

Synopsis

Documentation

newtype BoolRing a Source #

Newtype wraper which captures Boolean ring structure, which holds for every Heyting algebra. A Boolean ring is a ring which satisfies:

a <.> a = a

Some other properties:

a <+> a = mempty                  -- thus it is a ring of characteristic 2
a <.> b = b <.> a                 -- hence it is a commutative ring
a <+> (b <+> c) = (a <+> b) <+> c -- multiplicative associativity

Constructors

BoolRing 

Fields

Instances
HeytingAlgebra a => Semigroup (BoolRing a) Source #

Sum is symmetric differnce.

Instance details

Defined in Algebra.Heyting.BoolRing

Methods

(<>) :: BoolRing a -> BoolRing a -> BoolRing a #

sconcat :: NonEmpty (BoolRing a) -> BoolRing a #

stimes :: Integral b => b -> BoolRing a -> BoolRing a #

HeytingAlgebra a => Monoid (BoolRing a) Source #

In a Boolean ring a + a = 0, hence negate = id.

Instance details

Defined in Algebra.Heyting.BoolRing

Methods

mempty :: BoolRing a #

mappend :: BoolRing a -> BoolRing a -> BoolRing a #

mconcat :: [BoolRing a] -> BoolRing a #

HeytingAlgebra a => Semiring (BoolRing a) Source #

Multiplication is given by /\

Instance details

Defined in Algebra.Heyting.BoolRing

Methods

one :: BoolRing a #

(<.>) :: BoolRing a -> BoolRing a -> BoolRing a #

class Monoid m => Semiring m where #

Methods

one :: m #

(<.>) :: m -> m -> m #

Instances
HeytingAlgebra a => Semiring (BoolRing a) Source #

Multiplication is given by /\

Instance details

Defined in Algebra.Heyting.BoolRing

Methods

one :: BoolRing a #

(<.>) :: BoolRing a -> BoolRing a -> BoolRing a #

(<+>) :: Monoid m => m -> m -> m infixl 5 #

Alias for mappend.