Overview

Boolean algebras are Heyting algebras with the additional constraint that the law of the excluded middle is true (equivalently, double-negation is true).

Instances should satisfy the following laws in addition to the HeytingAlgebra laws:

  • Excluded middle: a ∨ ¬a = 1

Boolean algebras generalize classical logic: one is equivalent to “true” and zero is equivalent to “false”.


Table of contents


BooleanAlgebra (interface)

Signature

export interface BooleanAlgebra<A> extends HeytingAlgebra<A> {}

Added in v2.0.0

booleanAlgebraBoolean (constant)

Signature

export const booleanAlgebraBoolean: BooleanAlgebra<boolean> = ...

Added in v2.0.0

booleanAlgebraVoid (constant)

Signature

export const booleanAlgebraVoid: BooleanAlgebra<void> = ...

Added in v2.0.0

getDualBooleanAlgebra (function)

Every boolean algebras has a dual algebra, which involves reversing one/zero as well as join/meet.

Signature

export function getDualBooleanAlgebra<A>(B: BooleanAlgebra<A>): BooleanAlgebra<A> { ... }

Added in v2.0.0

getFunctionBooleanAlgebra (function)

Signature

export function getFunctionBooleanAlgebra<B>(B: BooleanAlgebra<B>): <A = never>() => BooleanAlgebra<(a: A) => B> { ... }

Added in v2.0.0