subhask-0.1.1.0: Type safe interface for programming in subcategories of Hask

Safe HaskellNone
LanguageHaskell2010

SubHask.Algebra.Logic

Synopsis

Documentation

class (Ord r, Ring r) => OrdRing_ r Source

Instances

(Ord r, Ring r) => OrdRing_ r Source 

type Goedel = Goedel_ Rational Source

The Goedel fuzzy logic is one of the simpler fuzzy logics. In particular, it is an example of a Heyting algebra that is not also a Boolean algebra.

See the standford encyclopedia of logic

newtype Goedel_ r Source

Constructors

Goedel_ r 

Instances

Read r0 => Read (Goedel_ r) Source 
Show r0 => Show (Goedel_ r) Source 
(OrdRing_ r, Arbitrary r) => Arbitrary (Goedel_ r) Source 
NFData r0 => NFData (Goedel_ r) Source 
IsMutable r0 => IsMutable (Goedel_ r) Source 
OrdRing_ r => Heyting (Goedel_ r) Source 
OrdRing_ r => Bounded (Goedel_ r) Source 
OrdRing_ r => Ord_ (Goedel_ r) Source 
OrdRing_ r => Lattice_ (Goedel_ r) Source 
OrdRing_ r => MinBound_ (Goedel_ r) Source 
OrdRing_ r => POrd_ (Goedel_ r) Source 
Eq_ r0 => Eq_ (Goedel_ r) Source 
data Mutable m (Goedel_ r0) = Mutable_Goedel_ (Mutable m r) Source 
type Elem (Goedel_ r0) = Elem r0 Source 
type Elem (Goedel_ r0) = Elem r0 Source 
type Elem (Goedel_ r0) = Elem r0 Source 
type Elem (Goedel_ r0) = Elem r0 Source 
type Scalar (Goedel_ r0) = Scalar r0 Source 
type Scalar (Goedel_ r0) = Scalar r0 Source 
type Scalar (Goedel_ r0) = Scalar r0 Source 
type Scalar (Goedel_ r0) = Scalar r0 Source 
type Actor (Goedel_ r0) = Actor r0 Source 
type Actor (Goedel_ r0) = Actor r0 Source 
type Actor (Goedel_ r0) = Actor r0 Source 
type Actor (Goedel_ r0) = Actor r0 Source 
type Logic (Goedel_ r0) = Logic r0 Source 
type Logic (Goedel_ r0) = Logic r0 Source 
type Logic (Goedel_ r0) = Logic r0 Source 
type Logic (Goedel_ r0) = Logic r0 Source 

data H3 Source

H3 is the smallest Heyting algebra that is not also a boolean algebra. In addition to true and false, there is a value to represent whether something's truth is unknown. AFAIK it has no real applications.

See wikipedia

Constructors

HTrue 
HFalse 
HUnknown 

data K3 Source

K3 stands for Kleene's 3-valued logic. In addition to true and false, there is a value to represent whether something's truth is unknown. K3 is an example of a logic that is neither Boolean nor Heyting.

See wikipedia.

FIXME: We need a way to represent implication and negation for logics outside of the Lattice hierarchy.

Constructors

KTrue 
KFalse 
KUnknown 

newtype Boolean2Ring b Source

A Boolean algebra is a special type of Ring. Their applications (set-like operations) tend to be very different than Rings, so it makes sense for the class hierarchies to be completely unrelated. The Boolean2Ring type, however, provides the correct transformation.

Constructors

Boolean2Ring b 

Instances

Read b0 => Read (Boolean2Ring b) Source 
Show b0 => Show (Boolean2Ring b) Source 
Arbitrary b0 => Arbitrary (Boolean2Ring b) Source 
NFData b0 => NFData (Boolean2Ring b) Source 
IsMutable b0 => IsMutable (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Ring (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Rig (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Rg (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Abelian (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Group (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Cancellative (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Monoid (Boolean2Ring b) Source 
(IsMutable b, Boolean b, ValidLogic b) => Semigroup (Boolean2Ring b) Source 
(Boolean b0, Complemented b0, Heyting b0) => Boolean (Boolean2Ring b) Source 
(Heyting b0, Bounded b0) => Heyting (Boolean2Ring b) Source 
(Complemented b0, Bounded b0) => Complemented (Boolean2Ring b) Source 
(Bounded b0, Lattice_ b0, MinBound_ b0) => Bounded (Boolean2Ring b) Source 
(Lattice_ b0, POrd_ b0) => Lattice_ (Boolean2Ring b) Source 
(MinBound_ b0, POrd_ b0) => MinBound_ (Boolean2Ring b) Source 
(POrd_ b0, Eq_ b0) => POrd_ (Boolean2Ring b) Source 
Eq_ b0 => Eq_ (Boolean2Ring b) Source 
data Mutable m (Boolean2Ring b0) = Mutable_Boolean2Ring (Mutable m b) Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Elem (Boolean2Ring b0) = Elem b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Scalar (Boolean2Ring b0) = Scalar b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Actor (Boolean2Ring b0) = Actor b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source 
type Logic (Boolean2Ring b0) = Logic b0 Source