Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class (Category ar, Category ar') => ArrowTransformation ar ar' where
- mapA :: ar a b -> ar' a b
- class (Category arr, Monoid m) => MonoidArrow arr m a where
- monoidA :: m -> arr a a
- class Category arr => MonoidalCategory (arr :: k -> k -> *) where
- type Prod (arr :: k -> k -> *) (a :: k) (b :: k) :: k
- type MUnit (arr :: k -> k -> *) :: k
- (-*-) :: arr a b -> arr a' b' -> arr (Prod arr a a') (Prod arr b b')
- monoidal_assoc :: arr (Prod arr (Prod arr a b) c) (Prod arr a (Prod arr b c))
- monoidal_deassoc :: arr (Prod arr a (Prod arr b c)) (Prod arr (Prod arr a b) c)
- leftunitor :: arr (Prod arr (MUnit arr) a) a
- unleftunitor :: arr a (Prod arr (MUnit arr) a)
- rightunitor :: arr (Prod arr a (MUnit arr)) a
- unrightunitor :: arr a (Prod arr a (MUnit arr))
- class MonoidalCategory arr => BraidedCategory (arr :: k -> k -> *) where
- class Category c => OverCategory c y where
- overmap :: c a b -> c b y -> c a y
- class (Category arr, Category arr') => OppositeCategoryAction arr arr' where
- categoryA :: arr a' a -> arr' x a -> arr' x a'
- class Category arr => FailureArrow arr err where
- class Category arr => Groupoid arr where
- invertA :: arr a b -> arr b a
- class (Category arr, Category arr') => OpArrow p arr arr' where
- inverse_imageA :: arr a b -> arr' (p b) (p a)
- class Category arr => CoArrow arr where
- class Category arr => BiArrow arr where
- (<->) :: (a -> b) -> (b -> a) -> arr a b
- class (Category arr, Category m) => MonoidCategory arr m f | f -> m arr where
- monoidArr :: m a a -> arr (f a) (f a)
- class (BiArrow arr, FunctorArrow f arr arr) => ApplicativeBiArrow arr f where
- class Category arr => CPSArrow arr where
- callcc :: (forall bot. arr c bot -> arr b c) -> arr b c
- class (Category arr, Category arr') => FunctorArrow f arr arr' | f arr' -> arr, f arr -> arr' where
- amap :: arr c d -> arr' (f c) (f d)
- class (FunctorArrow f arr arr, Category arr) => ApplicativeArrow f arr where
- alift2 :: (ApplicativeArrow f arr, ArrowApply arr) => f (arr a (arr b c)) -> arr (f a, f b) (f c)
- class (Category arr, Category arr') => CoFunctorArrow f arr arr' where
- inverseImage :: arr c d -> arr' (f d) (f c)
- (|>) :: CoFunctorArrow f (->) (->) => f d -> (c -> d) -> f c
- class (Category arr, Category arr') => AdjunctionArrow arr arr' f g | f -> g, g -> f, arr -> arr', arr' -> arr where
- outerA :: (Arrow arr2, FunctorArrow f arr arr', FunctorArrow g arr2 arr, ArrowApply arr, ArrowApply arr') => arr2 (a, b) c -> arr' (f a, g b) (f (g c))
- class FunctorArrow f arr arr => InitialAlgebraA arr a f | a -> f where
- deconstructA :: arr a (f a)
- class Category a => LoopArrow a prod where
- loop_secondSA :: a (prod b d) (prod c d) -> a b c
- loop_firstSA :: a (prod d b) (prod d c) -> a b c
- class Category a => MessagingArrow a where
- class Category a => UnifyingArrow a where
- class Category a => DoublingArrow a where
- doubleA :: a b (b, b)
- class Category a => CircuitArrow a where
- delayA :: b -> a b b
- class Category a => StorageArrow a where
- storageA :: a b c -> (a b (), a () c)
- class Category a => ArrowUnit a where
- aunit :: a b ()
- class Category a => ArrowFix a prod where
- fixArrow :: a (prod b c) c -> a b c
- class Category a => ArrowCircuit a where
- delay :: b -> a b b
- class Category a => ArrowDual a d where
- collapseArrow :: d (d a) b c -> a b c
- class ArrowDual a d => RecArrow a d where
- recArrow :: a b c -> d a b c
- class ArrowDual a d => ArrowDualApp a d where
- appArrow :: a (a b c, d a b c) c
- module Math.Tools.Adjunction
- module Math.Tools.CoFunctor
- module Math.Tools.CoMonad
- module Math.Tools.Complex
- module Math.Tools.Expression
- class BiFunctor op
- class Functor f => InterleaveFunctor f where
- interleave :: f a -> f a -> f a
- (<&>) :: Applicative f => f a -> f b -> f (a, b)
- unzipWith :: Functor f => (a -> (b, c)) -> f a -> (f b, f c)
- fst3 :: (a, b, c) -> a
- snd3 :: (a, b, c) -> b
- funzip :: Functor f => f (a, b) -> (f a, f b)
- thrd3 :: (a, b, c) -> c
- funzip3 :: Functor f => f (a, b, c) -> (f a, f b, f c)
- fzipWith3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- fzip :: Applicative f => f a -> f b -> f (a, b)
- fzip3 :: Applicative f => f a -> f b -> f c -> f (a, b, c)
- fzip4 :: Applicative f => f a -> f b -> f c -> f d -> f (a, b, c, d)
- liftA4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e
- module Math.Tools.Identity
- module Math.Tools.Id
- module Math.Tools.I
- module Math.Tools.Integer
- module Math.Tools.Integer
- module Math.Tools.Isomorphism
- module Math.Tools.LineInfo
- module Math.Tools.List
- module Math.Tools.Map
- module Math.Tools.Map
- module Math.Tools.Maybe
- module Math.Tools.Median
- module Math.Tools.Monad
- module Math.Tools.Monoid
- module Math.Tools.NaturalNumber
- module Math.Tools.NaturalTransformation
- module Math.Tools.Orthogonal
- module Math.Tools.ParseMonad
- module Math.Tools.ParserInterface
- module Math.Tools.Parser
- module Math.Tools.ParsingCombinators
- module Math.Tools.PrettyP
- newtype Prop a = Characteristic {
- runCharacteristic :: a -> Bool
- subseteq :: Universe a => Prop a -> Prop a -> Bool
- intersects :: Universe a => Prop a -> Prop a -> Bool
- split_prop :: Universe a => Prop a -> ([a], [a])
- propositional_table :: Universe a => Prop a -> [(a, Bool)]
- fromBool :: Bool -> Prop a
- prop_substitute :: Contravariant p => p a -> p (a, b)
- prop_exists :: (Adjunction f p, Contravariant p) => f (p a) -> (a, b)
- prop_exists_snd :: (Adjunction f p, Contravariant p) => f (p b) -> (a, b)
- prop_always :: (Adjunction p g, Contravariant p) => a -> g (p (a, b))
- prop_always_snd :: (Adjunction p g, Contravariant p) => b -> g (p (a, b))
- axiom_N :: (ModalLogic p, ImplicativeLogic p) => p a -> p a
- axiom_K :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a
- axiom_4 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a
- axiom_B :: (ModalLogic p, ImplicativeLogic p) => p a -> p a
- axiom_D :: (ModalLogic p, ImplicativeLogic p) => p a -> p a
- axiom_5 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a
- axiom_T :: (ModalLogic p, ImplicativeLogic p) => p a -> p a
- system_K :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a
- system_T :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a
- system_S4 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a
- system_S5 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a
- system_D :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a
- vector_equalizer :: (Eq (n a), LinearTransform m n a) => (m :*: n) a -> (m :*: n) a -> Prop (m a)
- list_truthvalues :: Universe a => Prop a -> [(a, Bool)]
- apply :: Prop (Prop b, b)
- result :: Eq a => a -> Prop a
- existential_bind :: Universe a => Prop a -> (a -> Prop b) -> Prop b
- existential_join :: (Universe b, Eq b) => Prop (Prop b) -> Prop b
- universal_bind :: Universe a => Prop a -> (a -> Prop b) -> Prop b
- universal_join :: (Universe b, Eq b) => Prop (Prop b) -> Prop b
- prop_fixedpoint :: (Prop a -> Prop a) -> Prop a
- truthvalue :: Bool -> Prop a
- satisfiable :: Universe a => Prop a -> Bool
- axiom :: Universe a => Prop a -> Bool
- notMember :: a -> Prop a -> Bool
- subseteq_prop :: Prop a -> Prop a -> Prop a
- is_section :: Prop a -> (Bool -> a) -> Bool
- doublePropJoin :: Prop (Prop (Prop (Prop a))) -> Prop (Prop a)
- fromAssoc :: Eq a => [(a, Bool)] -> Prop a
- fromAssocWith :: Eq a => [(a, b)] -> Prop b -> Prop a
- prop_fromList :: Eq a => [a] -> Prop a
- prop_fromSet :: Ord a => Set a -> Prop a
- prop_fromMap :: (Ord i, Eq e) => Map i e -> Prop (i, e)
- map_prop :: (Eq b, Universe a) => (a -> b) -> Prop a -> Prop b
- equalizer_fixedpoint :: HasEqualizers p a => (a -> a) -> p a
- invertible :: HasEqualizers p a => (b -> a) -> (a -> b) -> p a
- kernel :: (Num c, HasEqualizers p c) => (a -> c) -> p a
- ternary_op :: (Bool -> Bool -> Bool -> Bool) -> Prop a -> Prop a -> Prop a -> Prop a
- binary_op :: (Bool -> Bool -> Bool) -> Prop a -> Prop a -> Prop a
- gen_binary_op :: (b -> b' -> c) -> (a -> b) -> (a -> b') -> a -> c
- binary :: Relational p => (a -> b -> p c) -> p (a, (b, c))
- evaluate :: a -> Prop (Prop a)
- evaluate' :: (Universe a, Eq a) => a -> Prop (Prop a)
- integrate_prop :: Universe a => Prop a -> Prop (Prop a)
- intersect :: Prop a -> Prop a -> Prop a
- intersect3 :: Prop a -> Prop a -> Prop a -> Prop a
- median3 :: Prop a -> Prop a -> Prop a -> Prop a
- union :: Prop a -> Prop a -> Prop a
- union3 :: Prop a -> Prop a -> Prop a -> Prop a
- excluded_middle :: Universe b => Prop b -> Bool
- noncontradiction :: Universe b => Prop b -> Bool
- demorgan_union :: Universe a => Prop a -> Prop a -> Bool
- demorgan_intersect :: Universe a => Prop a -> Prop a -> Bool
- disjunction_commutative :: Universe a => Prop a -> Prop a -> Bool
- conjunction_commutative :: Universe a => Prop a -> Prop a -> Bool
- graph :: Eq b => (a -> b) -> Prop (a, b)
- image_factorization :: (Eq b, Universe a) => (a -> b) -> Prop b
- bind :: Universe b => (a -> Prop b) -> (b -> Prop c) -> a -> Prop c
- prop_compose :: Universe b => Prop (a, b) -> Prop (b, c) -> Prop (a, c)
- transitive :: Universe a => Prop (a, a) -> Bool
- antisymmetric :: Eq a => Prop (a, a) -> Prop (a, a)
- prop_iso_terminal :: Prop ((), b) -> Prop b
- prop_iso_terminal_inverse :: Prop b -> Prop ((), b)
- fiber :: HasEqualizers Prop c => (b -> c) -> c -> Prop b
- fiber_ :: Eq b => (a -> b) -> b -> Prop a
- equivalence_relation :: HasEqualizers Prop b => (a -> b) -> Prop (a, a)
- reflexive :: Eq a => Prop (a, a)
- reflexive_closure :: Eq a => Prop (a, a) -> Prop (a, a)
- symmetric_closure :: Prop (a, a) -> Prop (a, a)
- transitive_step :: Universe a => Prop (a, a) -> Prop (a, a)
- transitive_closure :: Universe a => Prop (a, a) -> Prop (a, a)
- equivalence_generated_by :: (Eq a, Universe a) => Prop (a, a) -> Prop (a, a)
- opposite :: Prop (a, b) -> Prop (b, a)
- leftAdjunct_prop :: (a -> Prop b) -> b -> Prop a
- unit_prop :: b -> Prop (Prop b)
- rel_prop :: (a -> Bool) -> Prop a
- binary_rel_prop :: (a -> a -> Bool) -> Prop (a, a)
- binary_rel :: (a -> a -> Bool) -> a -> Prop a
- equal_functions :: (Universe a, Eq b) => Prop (a -> b, a -> b)
- test_equality_at :: a -> Prop (Prop a, Prop a)
- equalizer_prop :: Prop a -> Prop a -> Prop a
- pullback_prop :: Prop a -> Prop b -> Prop (a, b)
- sum :: Prop a -> Prop b -> Prop (Either a b)
- prop_and :: Prop (Either a b) -> Prop (a, b)
- prop_or :: Prop (Either a b) -> Prop (a, b)
- prop_if :: Prop a -> Prop (Either a a) -> Prop a
- prop_if_general :: Prop a -> Prop (Either b c) -> Prop (a, b, c)
- equal :: Eq a => Prop (a, a)
- not_equal :: Eq a => Prop (a, a)
- lessthan :: Ord a => Prop (a, a)
- lesseq :: Ord a => Prop (a, a)
- or_list_prop :: Prop a -> Prop [a]
- and_list_prop :: Prop a -> Prop [a]
- enumerate :: Universe a => Prop a -> [a]
- existential_map :: (Universe a, Eq b) => (a -> b) -> Prop a -> Prop b
- universal_map :: (Universe a, Eq b) => (a -> b) -> Prop a -> Prop b
- prop_existential :: Universe b => Prop (a, b) -> Prop a
- prop_universal :: Universe b => Prop (a, b) -> Prop a
- image :: Universe a => Prop (a, b) -> Prop b
- prop_universal_image :: (Universe a, Universe b, Eq b) => Prop (a, b) -> Prop b
- forevery :: Universe b => Prop b -> Prop ()
- newtype b :\: a = PSub {}
- data PProp a where
- pneg_func :: (a -> b) -> PProp (a :\: b)
- module Math.Tools.Tree
- module Math.Tools.Universe
- module Math.Tools.Visitor
Documentation
class (Category ar, Category ar') => ArrowTransformation ar ar' where Source #
Instances
Arrow arr => ArrowTransformation (:==:) (arr :: Type -> Type -> Type) Source # | |
Defined in Math.Tools.Isomorphism | |
Arrow ar => ArrowTransformation (->) (ar :: Type -> Type -> Type) Source # | |
Defined in Math.Tools.Arrow |
class (Category arr, Monoid m) => MonoidArrow arr m a where Source #
class Category arr => MonoidalCategory (arr :: k -> k -> *) where Source #
(-*-) :: arr a b -> arr a' b' -> arr (Prod arr a a') (Prod arr b b') Source #
monoidal_assoc :: arr (Prod arr (Prod arr a b) c) (Prod arr a (Prod arr b c)) Source #
monoidal_deassoc :: arr (Prod arr a (Prod arr b c)) (Prod arr (Prod arr a b) c) Source #
leftunitor :: arr (Prod arr (MUnit arr) a) a Source #
unleftunitor :: arr a (Prod arr (MUnit arr) a) Source #
rightunitor :: arr (Prod arr a (MUnit arr)) a Source #
unrightunitor :: arr a (Prod arr a (MUnit arr)) Source #
Instances
MonoidalCategory (->) Source # | |
Defined in Math.Tools.Arrow (-*-) :: forall (a :: k) (b :: k) (a' :: k) (b' :: k). (a -> b) -> (a' -> b') -> Prod (->) a a' -> Prod (->) b b' Source # monoidal_assoc :: forall (a :: k) (b :: k) (c :: k). Prod (->) (Prod (->) a b) c -> Prod (->) a (Prod (->) b c) Source # monoidal_deassoc :: forall (a :: k) (b :: k) (c :: k). Prod (->) a (Prod (->) b c) -> Prod (->) (Prod (->) a b) c Source # leftunitor :: forall (a :: k). Prod (->) (MUnit (->)) a -> a Source # unleftunitor :: forall (a :: k). a -> Prod (->) (MUnit (->)) a Source # rightunitor :: forall (a :: k). Prod (->) a (MUnit (->)) -> a Source # unrightunitor :: forall (a :: k). a -> Prod (->) a (MUnit (->)) Source # |
class MonoidalCategory arr => BraidedCategory (arr :: k -> k -> *) where Source #
Instances
BraidedCategory (->) Source # | |
class Category c => OverCategory c y where Source #
Instances
OverCategory (->) (a :: Type) Source # | |
Defined in Math.Tools.Prop |
class (Category arr, Category arr') => OppositeCategoryAction arr arr' where Source #
class Category arr => FailureArrow arr err where Source #
class Category arr => Groupoid arr where Source #
Instances
Groupoid (:==:) Source # | |
Groupoid ParsingA Source # | |
FunctorArrow v (->) (->) => Groupoid (IsoA (NumExpr v) :: Type -> Type -> Type) Source # | |
Groupoid (IsoA Var) Source # | |
FunctorArrow v (->) (->) => Groupoid (IsoA (VectorSpaceExpr v) :: Type -> Type -> Type) Source # | |
Defined in Math.Number.NumericExpression invertA :: forall (a :: k) (b :: k). IsoA (VectorSpaceExpr v) a b -> IsoA (VectorSpaceExpr v) b a Source # | |
Category arr => Groupoid (GroupT arr :: Type -> Type -> Type) Source # | |
Category arr => Groupoid (IsomorphismA arr :: k -> k -> Type) Source # | |
Defined in Math.Tools.Isomorphism invertA :: forall (a :: k0) (b :: k0). IsomorphismA arr a b -> IsomorphismA arr b a Source # |
class (Category arr, Category arr') => OpArrow p arr arr' where Source #
inverse_imageA :: arr a b -> arr' (p b) (p a) Source #
class Category arr => BiArrow arr where Source #
Instances
BiArrow (:==:) Source # | |
Defined in Math.Tools.Isomorphism | |
BiArrow ParsingA Source # | |
Defined in Math.Tools.ParsingCombinators | |
FunctorArrow v (->) (->) => BiArrow (IsoA (NumExpr v)) Source # | |
BiArrow (IsoA Var) Source # | |
FunctorArrow v (->) (->) => BiArrow (IsoA (VectorSpaceExpr v)) Source # | |
Defined in Math.Number.NumericExpression (<->) :: (a -> b) -> (b -> a) -> IsoA (VectorSpaceExpr v) a b Source # | |
Arrow arr => BiArrow (IsomorphismA arr) Source # | |
Defined in Math.Tools.Isomorphism (<->) :: (a -> b) -> (b -> a) -> IsomorphismA arr a b Source # |
class (Category arr, Category m) => MonoidCategory arr m f | f -> m arr where Source #
class (BiArrow arr, FunctorArrow f arr arr) => ApplicativeBiArrow arr f where Source #
class (Category arr, Category arr') => FunctorArrow f arr arr' | f arr' -> arr, f arr -> arr' where Source #
Arrow version of Functor from Haskell Prelude
Instances
class (FunctorArrow f arr arr, Category arr) => ApplicativeArrow f arr where Source #
Arrow version of Applicative from Haskell Prelude
alift2 :: (ApplicativeArrow f arr, ArrowApply arr) => f (arr a (arr b c)) -> arr (f a, f b) (f c) Source #
class (Category arr, Category arr') => CoFunctorArrow f arr arr' where Source #
inverseImage :: arr c d -> arr' (f d) (f c) Source #
(|>) :: CoFunctorArrow f (->) (->) => f d -> (c -> d) -> f c Source #
class (Category arr, Category arr') => AdjunctionArrow arr arr' f g | f -> g, g -> f, arr -> arr', arr' -> arr where Source #
outerA :: (Arrow arr2, FunctorArrow f arr arr', FunctorArrow g arr2 arr, ArrowApply arr, ArrowApply arr') => arr2 (a, b) c -> arr' (f a, g b) (f (g c)) Source #
class FunctorArrow f arr arr => InitialAlgebraA arr a f | a -> f where Source #
deconstructA :: arr a (f a) Source #
class Category a => LoopArrow a prod where Source #
loop_secondSA :: a (prod b d) (prod c d) -> a b c Source #
loop_firstSA :: a (prod d b) (prod d c) -> a b c Source #
class Category a => MessagingArrow a where Source #
module Math.Tools.Adjunction
module Math.Tools.CoFunctor
module Math.Tools.CoMonad
module Math.Tools.Complex
module Math.Tools.Expression
class Functor f => InterleaveFunctor f where Source #
interleave :: f a -> f a -> f a infixr 8 Source #
Instances
InterleaveFunctor Stream Source # | |
Defined in Math.Number.Stream | |
InterleaveFunctor Queue Source # | |
Defined in Math.Tools.Queue | |
InterleaveFunctor List Source # | |
Defined in Math.Tools.List interleave :: [a] -> [a] -> [a] Source # |
(<&>) :: Applicative f => f a -> f b -> f (a, b) infixl 8 Source #
fzipWith3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #
fzip :: Applicative f => f a -> f b -> f (a, b) Source #
fzip3 :: Applicative f => f a -> f b -> f c -> f (a, b, c) Source #
fzip4 :: Applicative f => f a -> f b -> f c -> f d -> f (a, b, c, d) Source #
liftA4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source #
module Math.Tools.Identity
module Math.Tools.Id
module Math.Tools.I
module Math.Tools.Integer
module Math.Tools.Integer
module Math.Tools.Isomorphism
module Math.Tools.LineInfo
module Math.Tools.List
module Math.Tools.Map
module Math.Tools.Map
module Math.Tools.Maybe
module Math.Tools.Median
module Math.Tools.Monad
module Math.Tools.Monoid
module Math.Tools.NaturalNumber
module Math.Tools.Orthogonal
module Math.Tools.ParseMonad
module Math.Tools.ParserInterface
module Math.Tools.Parser
module Math.Tools.PrettyP
We must represent classical logic with characteristic functions,
because of the excluded middle axiom, and because characteristic
functions (as properties) have complex relationship with possible
elements of a
. See the Universe type class for a solution.
For exposition of classical logic used here,
see "Lawvere,Rosebrugh: Sets for mathematics".
Characteristic | |
|
Instances
Contravariant Prop Source # | |
BinaryLogic Prop Source # | |
BooleanLogic Prop Source # | |
Defined in Math.Tools.Prop | |
Existential Prop Source # | |
Defined in Math.Tools.Prop | |
ImplicativeLogic Prop Source # | |
Propositional Prop Source # | |
Defined in Math.Tools.Prop runProposition :: Prop a -> a -> Prop () Source # | |
PropositionalLogic Prop Source # | |
Relational Prop Source # | relation and unrelation represent the natural isomorphism \[Hom(-,P(A)) \cong Sub(- \times A)\] |
SubtractiveLogic Prop Source # | |
UniversalLogic Prop Source # | |
Eq c => HasEqualizers Prop c Source # | |
(Show a, Universe a) => Show (Prop a) Source # | |
(Universe a, Eq a) => Universe (Prop a) Source # | |
Defined in Math.Tools.Prop all_elements :: [Prop a] Source # | |
Builder (Prop a) Source # | |
Visitor (Prop a) Source # | |
Universe a => Eq (Prop a) Source # | |
Universe a => Ord (Prop a) Source # | |
data Fold (Prop a) b Source # | |
Defined in Math.Tools.Prop | |
data Unfold (Prop a) b Source # | |
Defined in Math.Tools.Prop |
split_prop :: Universe a => Prop a -> ([a], [a]) Source #
See "Soare: Recursively enumerable sets and degrees", this is split of recursive into two recursively enumerable sets.
prop_substitute :: Contravariant p => p a -> p (a, b) Source #
prop_exists :: (Adjunction f p, Contravariant p) => f (p a) -> (a, b) Source #
prop_exists_snd :: (Adjunction f p, Contravariant p) => f (p b) -> (a, b) Source #
prop_always :: (Adjunction p g, Contravariant p) => a -> g (p (a, b)) Source #
prop_always_snd :: (Adjunction p g, Contravariant p) => b -> g (p (a, b)) Source #
axiom_N :: (ModalLogic p, ImplicativeLogic p) => p a -> p a Source #
axiom_K :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a Source #
axiom_4 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a Source #
axiom_B :: (ModalLogic p, ImplicativeLogic p) => p a -> p a Source #
axiom_D :: (ModalLogic p, ImplicativeLogic p) => p a -> p a Source #
axiom_5 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a Source #
axiom_T :: (ModalLogic p, ImplicativeLogic p) => p a -> p a Source #
system_K :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a Source #
system_T :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a Source #
system_S4 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a Source #
system_S5 :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a Source #
system_D :: (ModalLogic p, ImplicativeLogic p) => p a -> p a -> p a Source #
vector_equalizer :: (Eq (n a), LinearTransform m n a) => (m :*: n) a -> (m :*: n) a -> Prop (m a) Source #
list_truthvalues :: Universe a => Prop a -> [(a, Bool)] Source #
It is impossible to convert characteristic index into recursively enumerable index (indexing of r.e. sets), or into canonical index (which has one bit per element describing membership). Thus we must use the Universe constraint.
result :: Eq a => a -> Prop a Source #
result and the bind operations provide Monad instance, except for the | fact that the Universe and Eq constraints are required. Thus an adjunction instance also exists.
truthvalue :: Bool -> Prop a Source #
satisfiable :: Universe a => Prop a -> Bool Source #
Satisfiable returns true if there exists an element of the universe
such that the proposition is satisfied. Note symmetry with axiom
.
axiom :: Universe a => Prop a -> Bool Source #
axiom returns true, if the proposition holds for all elements of the universe.
subseteq_prop :: Prop a -> Prop a -> Prop a Source #
\[x \in subseteq i j \iff x \in i \implies x \in j\]
prop_fromList :: Eq a => [a] -> Prop a Source #
map_prop :: (Eq b, Universe a) => (a -> b) -> Prop a -> Prop b Source #
Due to constraints, Prop cannot be made as instance of Functor.
equalizer_fixedpoint :: HasEqualizers p a => (a -> a) -> p a Source #
invertible :: HasEqualizers p a => (b -> a) -> (a -> b) -> p a Source #
kernel :: (Num c, HasEqualizers p c) => (a -> c) -> p a Source #
gen_binary_op :: (b -> b' -> c) -> (a -> b) -> (a -> b') -> a -> c Source #
binary :: Relational p => (a -> b -> p c) -> p (a, (b, c)) Source #
transitive :: Universe a => Prop (a, a) -> Bool Source #
\[<x,z> \in transitive \mathbb{R} \iff (\forall y. <x,y> \in \mathbb{R} & <y,z> \in \mathbb{R} \implies <x,z> \in \mathbb{R})\]
prop_iso_terminal :: Prop ((), b) -> Prop b Source #
prop_iso_terminal_inverse :: Prop b -> Prop ((), b) Source #
fiber :: HasEqualizers Prop c => (b -> c) -> c -> Prop b Source #
\[fiber(p,y) = { x | p(x) = y } = p^{-1}({y})\]
equivalence_relation :: HasEqualizers Prop b => (a -> b) -> Prop (a, a) Source #
symmetric_closure :: Prop (a, a) -> Prop (a, a) Source #
leftAdjunct_prop :: (a -> Prop b) -> b -> Prop a Source #
Adjunction \[P^{op} \dashv P\] between functors \[P\] and \[P^{op}\], where \[P : C^{op} \Rightarrow C\] and \[P^{op} : C \Rightarrow C^{op}\]. This is based on symmetry of product in relations.
rel_prop :: (a -> Bool) -> Prop a Source #
rightAdjunct of that adjunction is difficult, because it would be in C^{op}, and we don't have that category here. So how could we implement that? We'd need opposite arrow, but then the implementation would be exactly same as leftAdjunct_prop and unit_prop, but lifted to opposite category. I'm not implementing that now.
binary_rel_prop :: (a -> a -> Bool) -> Prop (a, a) Source #
binary_rel :: (a -> a -> Bool) -> a -> Prop a Source #
or_list_prop :: Prop a -> Prop [a] Source #
and_list_prop :: Prop a -> Prop [a] Source #
universal_map :: (Universe a, Eq b) => (a -> b) -> Prop a -> Prop b Source #
\[universal\_map( f, p ) = \{ b | p <= f^{-1}(\{b\}) \}\]
prop_existential :: Universe b => Prop (a, b) -> Prop a Source #
prop_existential is basically the same as 'existential_map fst', except for performance. 'existential_map fst' will need to iterate over all pairs \[<a,b>\], whereas prop_existential will only iterate through all elements of b only. Similarly for prop_universal.
module Math.Tools.Tree
module Math.Tools.Universe
module Math.Tools.Visitor