lawz-0.1.1: Common mathematical laws.

Safe HaskellSafe
LanguageHaskell2010

Test.Function.Idempotent

Synopsis

Documentation

projective :: Eq r => (r -> r) -> (r -> r) -> r -> Bool Source #

\( \forall a: g \circ f (a) = f (a) \)

projective_on :: Rel s b -> (r -> s) -> (s -> s) -> r -> b Source #

\( \forall a: g \circ f (a) \sim f (a) \)

idempotent :: Eq r => (r -> r) -> r -> Bool Source #

\( \forall a: f \circ f(a) = f(a) \)

idempotent_on :: Rel r b -> (r -> r) -> r -> b Source #

\( \forall a: f \circ f(a) \sim f(a) \)

idempotent_k :: Eq r => Natural -> (r -> r) -> r -> Bool Source #