Loading [MathJax]/jax/output/HTML-CSS/jax.js

connections-0.0.2: Partial orders & Galois connections.

Safe HaskellSafe
LanguageHaskell2010

Data.Prd.Property

Contents

Description

Synopsis

Equivalence relations

symmetric :: Prd r => r -> r -> Bool Source #

a,b:(a\eqb)(b\eqa)

=~ is a symmetric relation.

This is a required property.

coreflexive :: (Eq r, Prd r) => r -> r -> Bool Source #

x,y:x\eqyx==y

=~ is a coreflexive relation.

See https://en.wikipedia.org/wiki/Reflexive_relation#Related_terms.

This is a required property.

reflexive_eq :: Prd r => r -> Bool Source #

a:(a\eqa)

=~ is a reflexive relation.

This is a required property.

transitive_eq :: Prd r => r -> r -> r -> Bool Source #

a,b,c:((a\eqb)(b\eqc))(a\eqc)

=~ is a transitive relation.

This is a required property.

Partial orders

Non-strict partial orders

antisymmetric :: Prd r => r -> r -> Bool Source #

a,b:(ab)(ba)a\eqb

<~ is an antisymmetric relation.

This is a required property.

reflexive_le :: Prd r => r -> Bool Source #

a:(aa)

<~ is a reflexive relation.

This is a required property.

transitive_le :: Prd r => r -> r -> r -> Bool Source #

a,b,c:((ab)(bc))(ac)

<~ is an transitive relation.

This is a required property.

Connex non-strict partial orders

connex :: Prd r => r -> r -> Bool Source #

a,b:((ab)(ba))

<~ is a connex relation.

Strict partial orders

asymmetric :: Eq r => Prd r => r -> r -> Bool Source #

a,b:(a<b)¬(b<a)

lt is an asymmetric relation.

This is a required property.

transitive_lt :: Eq r => Prd r => r -> r -> r -> Bool Source #

a,b,c:((a<b)(b<c))(a<c)

lt is a transitive relation.

This is a required property.

irreflexive_lt :: Eq r => Prd r => r -> Bool Source #

a:¬(a<a)

lt is an irreflexive relation.

This is a required property.

Semiconnex strict partial orders

semiconnex :: Eq r => Prd r => r -> r -> Bool Source #

a,b:¬(a\eqb)((a<b)(b<a))

lt is a semiconnex relation.

trichotomous :: Eq r => Prd r => r -> r -> Bool Source #

a,b,c:((a<b)(a\eqb)(b<a))¬((a<b)(a\eqb)(b<a))

In other words, exactly one of a<b, a\eqb, or b<a holds.

If lt is a trichotomous relation then the set is totally ordered.

Semiorders

chain_22 :: Eq r => Prd r => r -> r -> r -> r -> Bool Source #

x,y,z,w:x<yyzz<wx<w

A semiorder does not allow 2-2 chains.

chain_31 :: Eq r => Prd r => r -> r -> r -> r -> Bool Source #