Heyting algebras #
This file defines Heyting, co-Heyting and bi-Heyting algebras.
A Heyting algebra is a bounded distributive lattice with an implication operation ⇨
such that
a ≤ b ⇨ c ↔ a ⊓ b ≤ c
. It also comes with a pseudo-complement ᶜ
, such that aᶜ = a ⇨ ⊥
.
Co-Heyting algebras are dual to Heyting algebras. They have a difference \
and a negation ¬
such that a \ b ≤ c ↔ a ≤ b ⊔ c
and ¬a = ⊤ \ a
.
Bi-Heyting algebras are Heyting algebras that are also co-Heyting algebras.
From a logic standpoint, Heyting algebras precisely model intuitionistic logic, whereas boolean algebras model classical logic.
Heyting algebras are the order theoretic equivalent of cartesian-closed categories.
Main declarations #
GeneralizedHeytingAlgebra
: Heyting algebra without a top element (nor negation).GeneralizedCoheytingAlgebra
: Co-Heyting algebra without a bottom element (nor complement).HeytingAlgebra
: Heyting algebra.CoheytingAlgebra
: Co-Heyting algebra.BiheytingAlgebra
: bi-Heyting algebra.
References #
Tags #
Heyting, Brouwer, algebra, implication, negation, intuitionistic
Notation #
A generalized Heyting algebra is a lattice with an additional binary operation ⇨
called
Heyting implication such that (a ⇨ ·)
is right adjoint to (a ⊓ ·)
.
This generalizes HeytingAlgebra
by not requiring a bottom element.
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- sup : α → α → α
- le_sup_left : ∀ (a b : α), a ≤ SemilatticeSup.sup a b
- le_sup_right : ∀ (a b : α), b ≤ SemilatticeSup.sup a b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → SemilatticeSup.sup a b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), Lattice.inf a b ≤ a
- inf_le_right : ∀ (a b : α), Lattice.inf a b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ Lattice.inf b c
- top : α
- himp : α → α → α
(a ⇨ ·)
is right adjoint to(a ⊓ ·)
Instances
A generalized co-Heyting algebra is a lattice with an additional binary
difference operation \
such that (· \ a)
is right adjoint to (· ⊔ a)
.
This generalizes CoheytingAlgebra
by not requiring a top element.
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- sup : α → α → α
- le_sup_left : ∀ (a b : α), a ≤ SemilatticeSup.sup a b
- le_sup_right : ∀ (a b : α), b ≤ SemilatticeSup.sup a b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → SemilatticeSup.sup a b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), Lattice.inf a b ≤ a
- inf_le_right : ∀ (a b : α), Lattice.inf a b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ Lattice.inf b c
- bot : α
- sdiff : α → α → α
(· \ a)
is right adjoint to(· ⊔ a)
Instances
A Heyting algebra is a bounded lattice with an additional binary operation ⇨
called Heyting
implication such that (a ⇨ ·)
is right adjoint to (a ⊓ ·)
.
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- sup : α → α → α
- le_sup_left : ∀ (a b : α), a ≤ SemilatticeSup.sup a b
- le_sup_right : ∀ (a b : α), b ≤ SemilatticeSup.sup a b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → SemilatticeSup.sup a b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), Lattice.inf a b ≤ a
- inf_le_right : ∀ (a b : α), Lattice.inf a b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ Lattice.inf b c
- top : α
- himp : α → α → α
- bot : α
- compl : α → α
aᶜ
is defined asa ⇨ ⊥
Instances
A co-Heyting algebra is a bounded lattice with an additional binary difference operation \
such that (· \ a)
is right adjoint to (· ⊔ a)
.
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- sup : α → α → α
- le_sup_left : ∀ (a b : α), a ≤ SemilatticeSup.sup a b
- le_sup_right : ∀ (a b : α), b ≤ SemilatticeSup.sup a b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → SemilatticeSup.sup a b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), Lattice.inf a b ≤ a
- inf_le_right : ∀ (a b : α), Lattice.inf a b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ Lattice.inf b c
- bot : α
- sdiff : α → α → α
- top : α
- hnot : α → α
⊤ \ a
is¬a
Instances
A bi-Heyting algebra is a Heyting algebra that is also a co-Heyting algebra.
- le_antisymm : ∀ (a b : α), a ≤ b → b ≤ a → a = b
- sup : α → α → α
- le_sup_left : ∀ (a b : α), a ≤ SemilatticeSup.sup a b
- le_sup_right : ∀ (a b : α), b ≤ SemilatticeSup.sup a b
- sup_le : ∀ (a b c : α), a ≤ c → b ≤ c → SemilatticeSup.sup a b ≤ c
- inf : α → α → α
- inf_le_left : ∀ (a b : α), Lattice.inf a b ≤ a
- inf_le_right : ∀ (a b : α), Lattice.inf a b ≤ b
- le_inf : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ Lattice.inf b c
- top : α
- himp : α → α → α
- bot : α
- compl : α → α
- sdiff : α → α → α
- hnot : α → α
(· \ a)
is right adjoint to(· ⊔ a)
⊤ \ a
is¬a
Instances
Equations
- HeytingAlgebra.toBoundedOrder = BoundedOrder.mk
Equations
- CoheytingAlgebra.toBoundedOrder = BoundedOrder.mk
Equations
- BiheytingAlgebra.toCoheytingAlgebra = CoheytingAlgebra.mk ⋯
Construct a Heyting algebra from the lattice structure and Heyting implication alone.
Equations
- HeytingAlgebra.ofHImp himp le_himp_iff = HeytingAlgebra.mk ⋯
Instances For
Construct a Heyting algebra from the lattice structure and complement operator alone.
Equations
- HeytingAlgebra.ofCompl compl le_himp_iff = HeytingAlgebra.mk ⋯
Instances For
Construct a co-Heyting algebra from the lattice structure and the difference alone.
Equations
- CoheytingAlgebra.ofSDiff sdiff sdiff_le_iff = CoheytingAlgebra.mk ⋯
Instances For
Construct a co-Heyting algebra from the difference and Heyting negation alone.
Equations
- CoheytingAlgebra.ofHNot hnot sdiff_le_iff = CoheytingAlgebra.mk ⋯
Instances For
In this section, we'll give interpretations of these results in the Heyting algebra model of
intuitionistic logic,- where ≤
can be interpreted as "validates", ⇨
as "implies", ⊓
as "and",
⊔
as "or", ⊥
as "false" and ⊤
as "true". Note that we confuse →
and ⊢
because those are
the same in this logic.
See also Prop.heytingAlgebra
.
p → q → r ↔ p ∧ q → r
p → q → r ↔ q ∧ p → r
p → q → r ↔ q → p → r
p → p → q ↔ p → q
(p → q) ∧ p → q
p ∧ (p → q) → q
(p → q) ∧ p ↔ q ∧ p
The deduction theorem in the Heyting algebra model of intuitionistic logic: an implication holds iff the conclusion follows from the hypothesis.
(q → r) → (p → q) → q → r
p → q → r ↔ q → p → r
See himp_le
for a stronger version in Boolean algebras.
Equations
- GeneralizedHeytingAlgebra.toDistribLattice = DistribLattice.ofInfSupLe ⋯
Equations
- OrderDual.instGeneralizedCoheytingAlgebra = GeneralizedCoheytingAlgebra.mk ⋯
Equations
- Prod.instGeneralizedHeytingAlgebra = GeneralizedHeytingAlgebra.mk ⋯
Equations
- Pi.instGeneralizedHeytingAlgebra = GeneralizedHeytingAlgebra.mk ⋯
Alias of sdiff_sup_self
.
Alias of sup_sdiff_self
.
See le_sdiff
for a stronger version in generalised Boolean algebras.
Equations
- GeneralizedCoheytingAlgebra.toDistribLattice = DistribLattice.mk ⋯
Equations
- OrderDual.instGeneralizedHeytingAlgebra = GeneralizedHeytingAlgebra.mk ⋯
Equations
- Prod.instGeneralizedCoheytingAlgebra = GeneralizedCoheytingAlgebra.mk ⋯
Equations
- Pi.instGeneralizedCoheytingAlgebra = GeneralizedCoheytingAlgebra.mk ⋯
Alias of the reverse direction of le_compl_iff_disjoint_right
.
Alias of the reverse direction of le_compl_iff_disjoint_left
.
Alias of le_compl_comm
.
Alias of the forward direction of le_compl_comm
.
Equations
- OrderDual.instCoheytingAlgebra = CoheytingAlgebra.mk ⋯
Equations
- Prod.instHeytingAlgebra = HeytingAlgebra.mk ⋯
Equations
- Pi.instHeytingAlgebra = HeytingAlgebra.mk ⋯
Equations
- CoheytingAlgebra.toDistribLattice = DistribLattice.mk ⋯
Alias of the reverse direction of hnot_le_iff_codisjoint_right
.
Alias of the reverse direction of hnot_le_iff_codisjoint_left
.
Equations
- OrderDual.instHeytingAlgebra = HeytingAlgebra.mk ⋯
Equations
- Prod.instCoheytingAlgebra = CoheytingAlgebra.mk ⋯
Equations
- Pi.instCoheytingAlgebra = CoheytingAlgebra.mk ⋯
Propositions form a Heyting algebra with implication as Heyting implication and negation as complement.
A bounded linear order is a bi-Heyting algebra by setting
a ⇨ b = ⊤
ifa ≤ b
anda ⇨ b = b
otherwise.a \ b = ⊥
ifa ≤ b
anda \ b = a
otherwise.
Equations
- LinearOrder.toBiheytingAlgebra = BiheytingAlgebra.mk ⋯ ⋯
Instances For
Equations
- OrderDual.instBiheytingAlgebra = BiheytingAlgebra.mk ⋯ ⋯
Equations
- Prod.instBiheytingAlgebra = BiheytingAlgebra.mk ⋯ ⋯
Equations
- Pi.instBiheytingAlgebra = BiheytingAlgebra.mk ⋯ ⋯
Pullback a GeneralizedHeytingAlgebra
along an injection.
Equations
- Function.Injective.generalizedHeytingAlgebra f hf map_sup map_inf map_top map_himp = GeneralizedHeytingAlgebra.mk ⋯
Instances For
Pullback a GeneralizedCoheytingAlgebra
along an injection.
Equations
- Function.Injective.generalizedCoheytingAlgebra f hf map_sup map_inf map_bot map_sdiff = GeneralizedCoheytingAlgebra.mk ⋯
Instances For
Pullback a HeytingAlgebra
along an injection.
Equations
- Function.Injective.heytingAlgebra f hf map_sup map_inf map_top map_bot map_compl map_himp = HeytingAlgebra.mk ⋯
Instances For
Pullback a CoheytingAlgebra
along an injection.
Equations
- Function.Injective.coheytingAlgebra f hf map_sup map_inf map_top map_bot map_hnot map_sdiff = CoheytingAlgebra.mk ⋯
Instances For
Pullback a BiheytingAlgebra
along an injection.
Equations
- Function.Injective.biheytingAlgebra f hf map_sup map_inf map_top map_bot map_compl map_hnot map_himp map_sdiff = BiheytingAlgebra.mk ⋯ ⋯