The areas / V04. Order and lattices
Mathlib.Order.Notation
39 declarations. Mathlib docs · Source
Notation classes for lattice operations
In this file we introduce typeclasses and definitions for lattice operations.
Main definitions
Compl: type class for theᶜnotationTop: type class for the⊤notationBot: type class for the⊥notation
Notation
xᶜ: complement in a lattice;x ⊔ y: supremum/join, which is notation formax x y;x ⊓ y: infimum/meet, which is notation formin x y;
We implement a delaborator that pretty prints max x y/min x y as x ⊔ y/x ⊓ y
if and only if the order on α does not have a LinearOrder α instance (where x y : α).
This is so that in a lattice we can use the same underlying constants max/min
as in linear orders, while using the more idiomatic notation x ⊔ y/x ⊓ y.
Lemmas about the operators ⊔ and ⊓ should use the names sup and inf respectively.
Sup and Inf
def HNot.ctorIdx E1 #
{α : Type u_1} → HNot α → ℕ
def Bot.ctorIdx E1 #
{α : Type u_1} → Bot α → ℕ
def Compl.ctorIdx E1 #
{α : Type u_1} → Compl α → ℕ
def HImp.ctorIdx E1 #
{α : Type u_1} → HImp α → ℕ
def Top.ctorIdx E1 #
{α : Type u_1} → Top α → ℕ
class Compl E3 #
Type u_1 → Type u_1
Set / lattice complement
ctor Compl.mk E0 #
{α : Type u_1} → (α → α) → Compl α
abbrev Compl.compl E1 #
{α : Type u_1} → [self : Compl α] → α → α
Set / lattice complement
Conventions for notations in identifiers:
- The recommended spelling of
ᶜin identifiers iscompl.
def «term_ᶜ» E1 #
Lean.TrailingParserDescr
Set / lattice complement
Conventions for notations in identifiers:
- The recommended spelling of
ᶜin identifiers iscompl.
theorem Max.ext E1 #
∀ {α : Type u} {x y : Max α}, max = max → x = y
theorem Min.ext_iff E0 #
∀ {α : Type u} {x y : Min α}, x = y ↔ min = min
theorem Max.ext_iff E0 #
∀ {α : Type u} {x y : Max α}, x = y ↔ max = max
theorem Min.ext E1 #
∀ {α : Type u} {x y : Min α}, min = min → x = y
def «term_⊔_» E1 #
Lean.TrailingParserDescr
The supremum/join operation: x ⊔ y. It is notation for max x y
and should be used when the type is not a linear order.
Conventions for notations in identifiers:
- The recommended spelling of
⊔in identifiers issup.
def «term_⊓_» E1 #
Lean.TrailingParserDescr
The infimum/meet operation: x ⊓ y. It is notation for min x y
and should be used when the type is not a linear order.
Conventions for notations in identifiers:
- The recommended spelling of
⊓in identifiers isinf.
def Mathlib.Meta.delabSup E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate max x y into x ⊔ y if the type is not a linear order.
def Mathlib.Meta.delabInf E1 #
Lean.PrettyPrinter.Delaborator.Delab
Delaborate min x y into x ⊓ y if the type is not a linear order.
class HImp E1 #
Type u_1 → Type u_1
Syntax typeclass for Heyting implication ⇨.
ctor HImp.mk E0 #
{α : Type u_1} → (α → α → α) → HImp α
abbrev HImp.himp E1 #
{α : Type u_1} → [self : HImp α] → α → α → α
Heyting implication ⇨
Conventions for notations in identifiers:
- The recommended spelling of
⇨in identifiers ishimp.
class HNot E1 #
Type u_1 → Type u_1
Syntax typeclass for Heyting negation ¬.
The difference between Compl and HNot is that the former belongs to Heyting algebras,
while the latter belongs to co-Heyting algebras. They are both pseudo-complements, but compl
underestimates while HNot overestimates. In Boolean algebras, they are equal.
See hnot_eq_compl.
ctor HNot.mk E0 #
{α : Type u_1} → (α → α) → HNot α
abbrev HNot.hnot E1 #
{α : Type u_1} → [self : HNot α] → α → α
Heyting negation ¬
Conventions for notations in identifiers:
- The recommended spelling of
¬in identifiers ishnot.
def «term_⇨_» E1 #
Lean.TrailingParserDescr
Heyting implication
Conventions for notations in identifiers:
- The recommended spelling of
⇨in identifiers ishimp.
def «term¬_» E1 #
Lean.ParserDescr
Heyting negation
Conventions for notations in identifiers:
- The recommended spelling of
¬in identifiers ishnot.
class Top E3 #
Type u_1 → Type u_1
Typeclass for the ⊤ (\top) notation
theorem Top.ext_iff E0 #
∀ {α : Type u_1} {x y : Top α}, x = y ↔ ⊤ = ⊤
theorem Top.ext E1 #
∀ {α : Type u_1} {x y : Top α}, ⊤ = ⊤ → x = y
ctor Top.mk E0 #
{α : Type u_1} → α → Top α
abbrev Top.top E1 #
{α : Type u_1} → [self : Top α] → α
The top (⊤, \top) element
Conventions for notations in identifiers:
- The recommended spelling of
⊤in identifiers istop.
class Bot E3 #
Type u_1 → Type u_1
Typeclass for the ⊥ (\bot) notation
theorem Bot.ext E1 #
∀ {α : Type u_1} {x y : Bot α}, ⊥ = ⊥ → x = y
theorem Bot.ext_iff E0 #
∀ {α : Type u_1} {x y : Bot α}, x = y ↔ ⊥ = ⊥
ctor Bot.mk E0 #
{α : Type u_1} → α → Bot α
abbrev Bot.bot E1 #
{α : Type u_1} → [self : Bot α] → α
The bot (⊥, \bot) element
Conventions for notations in identifiers:
- The recommended spelling of
⊥in identifiers isbot.
def «term⊤» E1 #
Lean.ParserDescr
The top (⊤, \top) element
Conventions for notations in identifiers:
- The recommended spelling of
⊤in identifiers istop.
def «term⊥» E1 #
Lean.ParserDescr
The bot (⊥, \bot) element
Conventions for notations in identifiers:
- The recommended spelling of
⊥in identifiers isbot.
instance bot_nonempty E0 #
∀ (α : Type u_1) [Bot α], Nonempty α
instance top_nonempty E0 #
∀ (α : Type u_1) [Top α], Nonempty α