lattices-2.2.1.1: Fine-grained library for constructing and manipulating lattices
Safe HaskellSafe
LanguageHaskell2010

Algebra.Heyting.Free.Expr

Synopsis

Documentation

data Expr a Source #

Heyting algebra expression.

Note: this type doesn't have Heyting instance, as its Eq and Ord are structural.

Constructors

Var a 
Bottom 
Top 
(Expr a) :/\: (Expr a) infixr 6 
(Expr a) :\/: (Expr a) infixr 5 
(Expr a) :=>: (Expr a) infixr 4 

Instances

Instances details
Applicative Expr Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

pure :: a -> Expr a

(<*>) :: Expr (a -> b) -> Expr a -> Expr b

liftA2 :: (a -> b -> c) -> Expr a -> Expr b -> Expr c

(*>) :: Expr a -> Expr b -> Expr b

(<*) :: Expr a -> Expr b -> Expr a

Functor Expr Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

fmap :: (a -> b) -> Expr a -> Expr b

(<$) :: a -> Expr b -> Expr a

Monad Expr Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

(>>=) :: Expr a -> (a -> Expr b) -> Expr b

(>>) :: Expr a -> Expr b -> Expr b

return :: a -> Expr a

Foldable Expr Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

fold :: Monoid m => Expr m -> m

foldMap :: Monoid m => (a -> m) -> Expr a -> m

foldMap' :: Monoid m => (a -> m) -> Expr a -> m

foldr :: (a -> b -> b) -> b -> Expr a -> b

foldr' :: (a -> b -> b) -> b -> Expr a -> b

foldl :: (b -> a -> b) -> b -> Expr a -> b

foldl' :: (b -> a -> b) -> b -> Expr a -> b

foldr1 :: (a -> a -> a) -> Expr a -> a

foldl1 :: (a -> a -> a) -> Expr a -> a

toList :: Expr a -> [a]

null :: Expr a -> Bool

length :: Expr a -> Int

elem :: Eq a => a -> Expr a -> Bool

maximum :: Ord a => Expr a -> a

minimum :: Ord a => Expr a -> a

sum :: Num a => Expr a -> a

product :: Num a => Expr a -> a

Traversable Expr Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

traverse :: Applicative f => (a -> f b) -> Expr a -> f (Expr b)

sequenceA :: Applicative f => Expr (f a) -> f (Expr a)

mapM :: Monad m => (a -> m b) -> Expr a -> m (Expr b)

sequence :: Monad m => Expr (m a) -> m (Expr a)

Generic1 Expr Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Associated Types

type Rep1 Expr 
Instance details

Defined in Algebra.Heyting.Free.Expr

type Rep1 Expr = D1 ('MetaData "Expr" "Algebra.Heyting.Free.Expr" "lattices-2.2.1.1-DOiSBgvrTjdFgPaGHAnlJl" 'False) ((C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: (C1 ('MetaCons "Bottom" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Top" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons ":/\\:" ('InfixI 'RightAssociative 6) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr)) :+: (C1 ('MetaCons ":\\/:" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr)) :+: C1 ('MetaCons ":=>:" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr)))))

Methods

from1 :: Expr a -> Rep1 Expr a

to1 :: Rep1 Expr a -> Expr a

Data a => Data (Expr a) Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Expr a -> c (Expr a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr a)

toConstr :: Expr a -> Constr

dataTypeOf :: Expr a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expr a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr a))

gmapT :: (forall b. Data b => b -> b) -> Expr a -> Expr a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr a -> r

gmapQ :: (forall d. Data d => d -> u) -> Expr a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a)

Generic (Expr a) Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Associated Types

type Rep (Expr a) 
Instance details

Defined in Algebra.Heyting.Free.Expr

type Rep (Expr a) = D1 ('MetaData "Expr" "Algebra.Heyting.Free.Expr" "lattices-2.2.1.1-DOiSBgvrTjdFgPaGHAnlJl" 'False) ((C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "Bottom" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Top" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons ":/\\:" ('InfixI 'RightAssociative 6) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a))) :+: (C1 ('MetaCons ":\\/:" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a))) :+: C1 ('MetaCons ":=>:" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a))))))

Methods

from :: Expr a -> Rep (Expr a) x

to :: Rep (Expr a) x -> Expr a

Show a => Show (Expr a) Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

showsPrec :: Int -> Expr a -> ShowS

show :: Expr a -> String

showList :: [Expr a] -> ShowS

Eq a => Eq (Expr a) Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

(==) :: Expr a -> Expr a -> Bool

(/=) :: Expr a -> Expr a -> Bool

Ord a => Ord (Expr a) Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

Methods

compare :: Expr a -> Expr a -> Ordering

(<) :: Expr a -> Expr a -> Bool

(<=) :: Expr a -> Expr a -> Bool

(>) :: Expr a -> Expr a -> Bool

(>=) :: Expr a -> Expr a -> Bool

max :: Expr a -> Expr a -> Expr a

min :: Expr a -> Expr a -> Expr a

type Rep1 Expr Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

type Rep1 Expr = D1 ('MetaData "Expr" "Algebra.Heyting.Free.Expr" "lattices-2.2.1.1-DOiSBgvrTjdFgPaGHAnlJl" 'False) ((C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: (C1 ('MetaCons "Bottom" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Top" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons ":/\\:" ('InfixI 'RightAssociative 6) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr)) :+: (C1 ('MetaCons ":\\/:" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr)) :+: C1 ('MetaCons ":=>:" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Expr)))))
type Rep (Expr a) Source # 
Instance details

Defined in Algebra.Heyting.Free.Expr

type Rep (Expr a) = D1 ('MetaData "Expr" "Algebra.Heyting.Free.Expr" "lattices-2.2.1.1-DOiSBgvrTjdFgPaGHAnlJl" 'False) ((C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "Bottom" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Top" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons ":/\\:" ('InfixI 'RightAssociative 6) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a))) :+: (C1 ('MetaCons ":\\/:" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a))) :+: C1 ('MetaCons ":=>:" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr a))))))

proofSearch :: Ord a => Expr a -> Bool Source #

Decide whether x :: Expr a is provable.

Note: this doesn't construct a proof term, but merely returns a Bool.