UNPKG

@dillonkearns/elm-graphql

Version:

<img src="https://cdn.jsdelivr.net/gh/martimatix/logo-graphqelm/logo.svg" alt="dillonearns/elm-graphql logo" width="40%" align="right">

55 lines (50 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var booleanHeytingAlgebra = exports.booleanHeytingAlgebra = { ff: function ff() { return false; }, tt: function tt() { return true; }, implies: function implies(x, y) { return !x || y; }, conj: function conj(x, y) { return x && y; }, disj: function disj(x, y) { return x || y; }, not: function not(x) { return !x; } }; /* The `HeytingAlgebra` type class represents types are bounded lattices with an implication operator such that the following laws hold: - Associativity: - `a || (b || c) = (a || b) || c` - `a && (b && c) = (a && b) && c` - Commutativity: - `a || b = b || a` - `a && b = b && a` - Absorption: - `a || (a && b) = a` - `a && (a || b) = a` - Idempotent: - `a || a = a` - `a && a = a` - Identity: - `a || ff = a` - `a && tt = a` - Implication: - ``a `implies` a = tt`` - ``a && (a `implies` b) = a && b`` - ``b && (a `implies` b) = b`` - ``a `implies` (b && c) = (a `implies` b) && (a `implies` c)`` - Complemented: - ``not a = a `implies` ff`` */