| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Algebra.Heyting.Free
Documentation
Free Heyting algebra.
Note: Eq and PartialOrd instances aren't structural.
>>>Top == (Var 'x' ==> Var 'x')True
>>>Var 'x' == Var 'y'False
You can test for taulogogies:
>>>leq Top $ (Var 'A' /\ Var 'B' ==> Var 'C') <=> (Var 'A' ==> Var 'B' ==> Var 'C')True
>>>leq Top $ (Var 'A' /\ neg (Var 'A')) <=> BottomTrue
>>>leq Top $ (Var 'A' \/ neg (Var 'A')) <=> TopFalse
Constructors
| Var a | |
| Bottom | |
| Top | |
| (Free a) :/\: (Free a) infixr 6 | |
| (Free a) :\/: (Free a) infixr 5 | |
| (Free a) :=>: (Free a) infixr 4 |
Instances
| Foldable Free Source # | |||||
Defined in Algebra.Heyting.Free Methods fold :: Monoid m => Free m -> m foldMap :: Monoid m => (a -> m) -> Free a -> m foldMap' :: Monoid m => (a -> m) -> Free a -> m foldr :: (a -> b -> b) -> b -> Free a -> b foldr' :: (a -> b -> b) -> b -> Free a -> b foldl :: (b -> a -> b) -> b -> Free a -> b foldl' :: (b -> a -> b) -> b -> Free a -> b foldr1 :: (a -> a -> a) -> Free a -> a foldl1 :: (a -> a -> a) -> Free a -> a elem :: Eq a => a -> Free a -> Bool maximum :: Ord a => Free a -> a | |||||
| Traversable Free Source # | |||||
| Applicative Free Source # | |||||
| Functor Free Source # | |||||
| Monad Free Source # | |||||
| Generic1 Free Source # | |||||
Defined in Algebra.Heyting.Free Associated Types
| |||||
| Arbitrary a => Arbitrary (Free a) Source # | |||||
| Data a => Data (Free a) Source # | |||||
Defined in Algebra.Heyting.Free Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Free a -> c (Free a) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Free a) dataTypeOf :: Free a -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Free a)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Free a)) gmapT :: (forall b. Data b => b -> b) -> Free a -> Free a gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Free a -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Free a -> r gmapQ :: (forall d. Data d => d -> u) -> Free a -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Free a -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Free a -> m (Free a) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Free a -> m (Free a) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Free a -> m (Free a) | |||||
| Generic (Free a) Source # | |||||
Defined in Algebra.Heyting.Free Associated Types
| |||||
| Show a => Show (Free a) Source # | |||||
| Ord a => Eq (Free a) Source # | |||||
| Heyting (Free a) Source # | |||||
| BoundedJoinSemiLattice (Free a) Source # | |||||
Defined in Algebra.Heyting.Free | |||||
| BoundedMeetSemiLattice (Free a) Source # | |||||
Defined in Algebra.Heyting.Free | |||||
| Lattice (Free a) Source # | |||||
| Ord a => PartialOrd (Free a) Source # | |||||
| type Rep1 Free Source # | |||||
Defined in Algebra.Heyting.Free type Rep1 Free = D1 ('MetaData "Free" "Algebra.Heyting.Free" "lattices-2.2.1.1-J46lACPEOTBKo73SIhecCd" '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 Free) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Free)) :+: (C1 ('MetaCons ":\\/:" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Free) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Free)) :+: C1 ('MetaCons ":=>:" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Free) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Free))))) | |||||
| type Rep (Free a) Source # | |||||
Defined in Algebra.Heyting.Free type Rep (Free a) = D1 ('MetaData "Free" "Algebra.Heyting.Free" "lattices-2.2.1.1-J46lACPEOTBKo73SIhecCd" '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 (Free a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Free a))) :+: (C1 ('MetaCons ":\\/:" ('InfixI 'RightAssociative 5) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Free a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Free a))) :+: C1 ('MetaCons ":=>:" ('InfixI 'RightAssociative 4) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Free a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Free a)))))) | |||||
retractFree :: Heyting a => Free a -> a Source #