The areas / V04. Order and lattices
Mathlib.Algebra.Order.Quantale
46 declarations. Mathlib docs · Source
Theory of quantales
Quantales are the non-commutative generalization of locales/frames and as such are linked to point-free topology and order theory. Applications are found throughout logic, quantum mechanics, and computer science (see e.g. [Vickers1989] and [Mulvey1986]).
The most general definition of quantale occurring in literature, is that a quantale is a semigroup distributing over a complete sup-semilattice. In our definition below, we use the fact that every complete sup-semilattice is in fact a complete lattice, and make constructs defined for those immediately available. Another view could be to define a quantale as a complete idempotent semiring, i.e. a complete semiring in which + and sup coincide. However, we will often encounter additive quantales, i.e. quantales in which the semigroup operator is thought of as addition, in which case the link with semirings will lead to confusion notationally.
In this file, we follow the basic definition set out on the wikipedia page on quantales, using a mixin typeclass to make the special cases of unital, commutative, idempotent, integral, and involutive quantales easier to add on later.
Main definitions
-
IsQuantaleandIsAddQuantale: Typeclass mixin for a (additive) semigroup distributing over a complete lattice, i.e satisfyingx * (sSup s) = ⨆ y ∈ s, x * yand(sSup s) * y = ⨆ x ∈ s, x * y; -
QuantaleandAddQuantale: Structures serving as a typeclass alias, so one can writevariable? [Quantale α]instead ofvariable [Semigroup α] [CompleteLattice α] [IsQuantale α], and similarly for the additive variant. -
leftMulResiduation,rightMulResiduation,leftAddResiduation,rightAddResiduation: Defining the left- and right- residuations of the semigroup (see notation below). -
Finally, we provide basic distributivity laws for sSup into iSup and sup, monotonicity of the semigroup operator, and basic equivalences for left- and right-residuation.
Notation
-
x ⇨ₗ y:sSup {z | z * x ≤ y}, theleftMulResiduationofyoverx; -
x ⇨ᵣ y:sSup {z | x * z ≤ y}, therightMulResiduationofyoverx;
References
https://en.wikipedia.org/wiki/Quantale https://encyclopediaofmath.org/wiki/Quantale https://ncatlab.org/nlab/show/quantale
def AddQuantale.ctorIdx E1 #
{α : Type u_1} → {inst : AddSemigroup α} → {inst_1 : CompleteLattice α} → {inst_2 : IsAddQuantale α} → AddQuantale α → ℕ
def Quantale.ctorIdx E1 #
{α : Type u_1} → {inst : Semigroup α} → {inst_1 : CompleteLattice α} → {inst_2 : IsQuantale α} → Quantale α → ℕ
class IsAddQuantale E3 #
(α : Type u_1) → [AddSemigroup α] → [CompleteLattice α] → Prop
An additive quantale is an additive semigroup distributing over a complete lattice.
ctor IsAddQuantale.mk E0 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α],
(∀ (x : α) (s : Set α), x + sSup s = ⨆ y ∈ s, x + y) →
(∀ (s : Set α) (y : α), sSup s + y = ⨆ x ∈ s, x + y) → IsAddQuantale α
theorem IsAddQuantale.add_sSup_distrib E1 #
∀ {α : Type u_1} {inst : AddSemigroup α} {inst_1 : CompleteLattice α} [self : IsAddQuantale α] (x : α) (s : Set α),
x + sSup s = ⨆ y ∈ s, x + y
Addition is distributive over join in a quantale
theorem IsAddQuantale.sSup_add_distrib E1 #
∀ {α : Type u_1} {inst : AddSemigroup α} {inst_1 : CompleteLattice α} [self : IsAddQuantale α] (s : Set α) (y : α),
sSup s + y = ⨆ x ∈ s, x + y
Addition is distributive over join in a quantale
structure AddQuantale E3 #
(α : Type u_1) → [inst : AddSemigroup α] → [inst_1 : CompleteLattice α] → [IsAddQuantale α] → Type
A quantale is a semigroup distributing over a complete lattice.
ctor AddQuantale.mk E0 #
{α : Type u_1} → [inst : AddSemigroup α] → [inst_1 : CompleteLattice α] → [inst_2 : IsAddQuantale α] → AddQuantale α
class IsQuantale E3 #
(α : Type u_1) → [Semigroup α] → [CompleteLattice α] → Prop
A quantale is a semigroup distributing over a complete lattice.
ctor IsQuantale.mk E0 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α],
(∀ (x : α) (s : Set α), x * sSup s = ⨆ y ∈ s, x * y) →
(∀ (s : Set α) (y : α), sSup s * y = ⨆ x ∈ s, x * y) → IsQuantale α
theorem IsQuantale.mul_sSup_distrib E1 #
∀ {α : Type u_1} {inst : Semigroup α} {inst_1 : CompleteLattice α} [self : IsQuantale α] (x : α) (s : Set α),
x * sSup s = ⨆ y ∈ s, x * y
Multiplication is distributive over join in a quantale
theorem IsQuantale.sSup_mul_distrib E1 #
∀ {α : Type u_1} {inst : Semigroup α} {inst_1 : CompleteLattice α} [self : IsQuantale α] (s : Set α) (y : α),
sSup s * y = ⨆ x ∈ s, x * y
Multiplication is distributive over join in a quantale
structure Quantale E3 #
(α : Type u_1) → [inst : Semigroup α] → [inst_1 : CompleteLattice α] → [IsQuantale α] → Type
A quantale is a semigroup distributing over a complete lattice.
ctor Quantale.mk E0 #
{α : Type u_1} → [inst : Semigroup α] → [inst_1 : CompleteLattice α] → [inst_2 : IsQuantale α] → Quantale α
theorem add_sSup_distrib E1 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x : α} {s : Set α},
x + sSup s = ⨆ y ∈ s, x + y
theorem mul_sSup_distrib E1 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x : α} {s : Set α},
x * sSup s = ⨆ y ∈ s, x * y
theorem sSup_mul_distrib E1 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x : α} {s : Set α},
sSup s * x = ⨆ y ∈ s, y * x
theorem sSup_add_distrib E1 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x : α} {s : Set α},
sSup s + x = ⨆ y ∈ s, y + x
def Quantale.leftMulResiduation E3 #
{α : Type u_1} → [Semigroup α] → [CompleteLattice α] → α → α → α
Left- and right-residuation operators on a quantale are similar to the Heyting
operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ₗ z ↔ x * y ≤ z or alternatively x ⇨ₗ y = sSup { z | z * x ≤ y }.
def AddQuantale.leftAddResiduation E3 #
{α : Type u_1} → [AddSemigroup α] → [CompleteLattice α] → α → α → α
Left- and right- residuation operators on an additive quantale are similar
to the Heyting operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ₗ z ↔ x + y ≤ z or alternatively x ⇨ₗ y = sSup { z | z + x ≤ y }.
def Quantale.rightMulResiduation E3 #
{α : Type u_1} → [Semigroup α] → [CompleteLattice α] → α → α → α
Left- and right- residuation operators on a quantale are similar to the Heyting
operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ᵣ z ↔ y * x ≤ z or alternatively x ⇨ₗ y = sSup { z | x * z ≤ y }.
def AddQuantale.rightAddResiduation E3 #
{α : Type u_1} → [AddSemigroup α] → [CompleteLattice α] → α → α → α
Left- and right- residuation operators on an additive quantale are similar
to the Heyting operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ᵣ z ↔ y + x ≤ z or alternatively x ⇨ₗ y = sSup { z | x + z ≤ y }."
def Quantale.«term_⇨ₗ_» E1 #
Lean.TrailingParserDescr
Left- and right-residuation operators on a quantale are similar to the Heyting
operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ₗ z ↔ x * y ≤ z or alternatively x ⇨ₗ y = sSup { z | z * x ≤ y }.
def Quantale.«term_⇨ᵣ_» E1 #
Lean.TrailingParserDescr
Left- and right- residuation operators on a quantale are similar to the Heyting
operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ᵣ z ↔ y * x ≤ z or alternatively x ⇨ₗ y = sSup { z | x * z ≤ y }.
def AddQuantale.«term_⇨ₗ_» E1 #
Lean.TrailingParserDescr
Left- and right- residuation operators on an additive quantale are similar
to the Heyting operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ₗ z ↔ x + y ≤ z or alternatively x ⇨ₗ y = sSup { z | z + x ≤ y }.
def AddQuantale.«term_⇨ᵣ_» E1 #
Lean.TrailingParserDescr
Left- and right- residuation operators on an additive quantale are similar
to the Heyting operator on complete lattices, but for a non-commutative logic.
I.e. x ≤ y ⇨ᵣ z ↔ y + x ≤ z or alternatively x ⇨ₗ y = sSup { z | x + z ≤ y }."
theorem AddQuantale.add_iSup_distrib E1 #
∀ {α : Type u_1} {ι : Type u_2} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x : α}
{f : ι → α}, x + ⨆ i, f i = ⨆ i, x + f i
theorem Quantale.mul_iSup_distrib E1 #
∀ {α : Type u_1} {ι : Type u_2} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x : α} {f : ι → α},
x * ⨆ i, f i = ⨆ i, x * f i
theorem Quantale.iSup_mul_distrib E1 #
∀ {α : Type u_1} {ι : Type u_2} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x : α} {f : ι → α},
(⨆ i, f i) * x = ⨆ i, f i * x
theorem AddQuantale.iSup_add_distrib E1 #
∀ {α : Type u_1} {ι : Type u_2} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x : α}
{f : ι → α}, (⨆ i, f i) + x = ⨆ i, f i + x
theorem AddQuantale.add_sup_distrib E1 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x y z : α},
x + y ⊔ z = (x + y) ⊔ (x + z)
theorem Quantale.mul_sup_distrib E1 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x y z : α},
x * (y ⊔ z) = x * y ⊔ x * z
theorem Quantale.sup_mul_distrib E1 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x y z : α},
(x ⊔ y) * z = x * z ⊔ y * z
theorem AddQuantale.sup_add_distrib E1 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x y z : α},
x ⊔ y + z = (x + z) ⊔ (y + z)
instance AddQuantale.instAddLeftMono E0 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α], AddLeftMono α
instance Quantale.instMulLeftMono E0 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α], MulLeftMono α
instance Quantale.instMulRightMono E0 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α], MulRightMono α
instance AddQuantale.instAddRightMono E0 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α], AddRightMono α
theorem AddQuantale.leftAddResiduation_le_iff_add_le E1 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x y z : α},
x ≤ AddQuantale.leftAddResiduation y z ↔ x + y ≤ z
theorem Quantale.leftMulResiduation_le_iff_mul_le E1 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x y z : α},
x ≤ Quantale.leftMulResiduation y z ↔ x * y ≤ z
theorem Quantale.rightMulResiduation_le_iff_mul_le E1 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x y z : α},
x ≤ Quantale.rightMulResiduation y z ↔ y * x ≤ z
theorem AddQuantale.rightAddResiduation_le_iff_add_le E1 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x y z : α},
x ≤ AddQuantale.rightAddResiduation y z ↔ y + x ≤ z
theorem AddQuantale.bot_add E0 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x : α}, ⊥ + x = ⊥
theorem Quantale.bot_mul E0 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x : α}, ⊥ * x = ⊥
theorem Quantale.mul_bot E0 #
∀ {α : Type u_1} [inst : Semigroup α] [inst_1 : CompleteLattice α] [IsQuantale α] {x : α}, x * ⊥ = ⊥
theorem AddQuantale.add_bot E0 #
∀ {α : Type u_1} [inst : AddSemigroup α] [inst_1 : CompleteLattice α] [IsAddQuantale α] {x : α}, x + ⊥ = ⊥