lattices-2.1: Fine-grained library for constructing and manipulating lattices
Copyright (C) 2019 Oleg Grenrus
License BSD-3-Clause (see the file LICENSE)
Maintainer Oleg Grenrus <oleg.grenrus@iki.fi>
Safe Haskell Safe
Language Haskell2010

Algebra.Heyting

Description

Synopsis

Documentation

class BoundedLattice a => Heyting a where Source #

A Heyting algebra is a bounded lattice equipped with a binary operation \(a \to b\) of implication.

Laws

x ==> x        ≡ top
x /\ (x ==> y) ≡ x /\ y
y /\ (x ==> y) ≡ y
x ==> (y /\ z) ≡ (x ==> y) /\ (x ==> z)

Minimal complete definition

(==>)

Methods

(==>) :: a -> a -> a infixr 5 Source #

Implication.

neg :: a -> a Source #

Negation.

neg x = x ==> bottom

(<=>) :: a -> a -> a infixr 5 Source #

Equivalence.

x <=> y = (x ==> y) /\ (y ==> x)

Instances

Instances details
Heyting Bool Source #
Instance details

Defined in Algebra.Heyting

Heyting () Source #
Instance details

Defined in Algebra.Heyting

Methods

(==>) :: () -> () -> () Source #

neg :: () -> () Source #

(<=>) :: () -> () -> () Source #

Heyting All Source #
Instance details

Defined in Algebra.Heyting

Heyting Any Source #
Instance details

Defined in Algebra.Heyting

Heyting ZeroHalfOne Source #

Not boolean: neg Half \/ Half = Half /= One

Instance details

Defined in Algebra.Lattice.ZeroHalfOne

Heyting M2 Source #
Instance details

Defined in Algebra.Lattice.M2

Heyting a => Heyting ( Solo a) Source #

Since: 2.0.3

Instance details

Defined in Algebra.Heyting

Heyting a => Heyting ( Identity a) Source #
Instance details

Defined in Algebra.Heyting

Heyting a => Heyting ( Endo a) Source #
Instance details

Defined in Algebra.Heyting

( Ord a, Finite a) => Heyting ( Set a) Source #
Instance details

Defined in Algebra.Heyting

( Eq a, Hashable a, Finite a) => Heyting ( HashSet a) Source #
Instance details

Defined in Algebra.Heyting

( Ord a, Bounded a) => Heyting ( Ordered a) Source #

This is interesting logic, as it satisfies both de Morgan laws; but isn't Boolean: i.e. law of exluded middle doesn't hold.

Negation "smashes" value into minBound or maxBound .

Instance details

Defined in Algebra.Lattice.Ordered

Heyting ( Free a) Source #
Instance details

Defined in Algebra.Heyting.Free

Heyting a => Heyting (b -> a) Source #
Instance details

Defined in Algebra.Heyting

Methods

(==>) :: (b -> a) -> (b -> a) -> b -> a Source #

neg :: (b -> a) -> b -> a Source #

(<=>) :: (b -> a) -> (b -> a) -> b -> a Source #

Heyting ( Proxy a) Source #
Instance details

Defined in Algebra.Heyting

Heyting a => Heyting ( Const a b) Source #
Instance details

Defined in Algebra.Heyting

Heyting a => Heyting ( Tagged b a) Source #
Instance details

Defined in Algebra.Heyting