The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V04. Order and lattices

Mathlib.Order.Defs.PartialOrder

77 declarations. Mathlib docs · Source

Orders

Defines classes for preorders and partial orders and proves some basic lemmas about them.

We also define covering relations on a preorder. We say that b covers a if a < b and there is no element in between. We say that b weakly covers a if a ≤ b and there is no element between a and b. In a partial order this is equivalent to a ⋖ b ∨ a = b, in a preorder this is equivalent to a ⋖ b ∨ (a ≤ b ∧ b ≤ a)

Notation

  • a ⋖ b means that b covers a.
  • a ⩿ b means that b weakly covers a.

Definition of Preorder and lemmas about types with a Preorder

Definition of PartialOrder and lemmas about types with a partial order

def PartialOrder.ctorIdx E1 #

{α : Type u_2} → PartialOrder α → ℕ

def Preorder.ctorIdx E1 #

{α : Type u_2} → Preorder α → ℕ

class Preorder E3 #

Type u_2 → Type u_2

A preorder is a reflexive, transitive relation ≤. In a preorder, a < b means a ≤ b ∧ ¬b ≤ a, and < is defined this way by default. You can override this definition to set a better def-eq.

instance Preorder.toLT E0 #

{α : Type u_2} → [self : Preorder α] → LT α

instance Preorder.toLE E0 #

{α : Type u_2} → [self : Preorder α] → LE α

ctor Preorder.mk E0 #

{α : Type u_2} →
  [toLE : LE α] →
    [toLT : LT α] →
      (∀ (a : α), a ≤ a) →
        (∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c) →
          autoParam (∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a) Preorder.lt_iff_le_not_ge._autoParam → Preorder α

theorem Preorder.le_refl E1 #

∀ {α : Type u_2} [self : Preorder α] (a : α), a ≤ a

theorem Preorder.le_trans E1 #

∀ {α : Type u_2} [self : Preorder α] (a b c : α), a ≤ b → b ≤ c → a ≤ c

theorem Preorder.lt_iff_le_not_ge E1 #

∀ {α : Type u_2} [self : Preorder α] (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a

instance instLawfulOrderLT_mathlib E0 #

∀ {α : Type u_1} [inst : Preorder α], Std.LawfulOrderLT α

instance instIsPreorder_mathlib E0 #

∀ {α : Type u_1} [inst : Preorder α], Std.IsPreorder α

theorem le_refl E2 #

∀ {α : Type u_1} [inst : Preorder α] (a : α), a ≤ a

The relation ≤ on a preorder is reflexive.

theorem le_rfl E2 #

∀ {α : Type u_1} [inst : Preorder α] {a : α}, a ≤ a

A version of le_refl where the argument is implicit

theorem le_trans E2 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a ≤ b → b ≤ c → a ≤ c

The relation ≤ on a preorder is transitive.

theorem ge_trans E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b ≤ a → c ≤ b → c ≤ a

theorem lt_iff_le_not_ge E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b ↔ a ≤ b ∧ ¬b ≤ a

theorem lt_of_le_not_ge E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a ≤ b → ¬b ≤ a → a < b

theorem ge_of_eq E0 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a = b → b ≤ a

theorem le_of_eq E0 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a = b → a ≤ b

theorem le_of_lt E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → a ≤ b

theorem not_le_of_gt E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → ¬b ≤ a

theorem not_lt_of_ge E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a ≤ b → ¬b < a

theorem LT.lt.not_ge E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → ¬b ≤ a

Alias of not_le_of_gt.

theorem LE.le.not_gt E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a ≤ b → ¬b < a

Alias of not_lt_of_ge.

theorem lt_irrefl E1 #

∀ {α : Type u_1} [inst : Preorder α] (a : α), ¬a < a

theorem lt_of_lt_of_le' E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b < a → c ≤ b → c < a

theorem lt_of_lt_of_le E2 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a < b → b ≤ c → a < c

theorem lt_of_le_of_lt E2 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a ≤ b → b < c → a < c

theorem lt_of_le_of_lt' E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b ≤ a → c < b → c < a

theorem lt_trans E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, a < b → b < c → a < c

theorem gt_trans E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b c : α}, b < a → c < b → c < a

theorem ne_of_gt E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, b < a → a ≠ b

theorem ne_of_lt E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → a ≠ b

theorem lt_asymm E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → ¬b < a

theorem not_lt_of_gt E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b → ¬b < a

Alias of lt_asymm.

theorem le_of_lt_or_eq' E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, b < a ∨ a = b → b ≤ a

theorem le_of_lt_or_eq E0 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a < b ∨ a = b → a ≤ b

theorem le_of_eq_or_lt E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a = b ∨ a < b → a ≤ b

theorem le_of_eq_or_lt' E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, a = b ∨ b < a → b ≤ a

theorem lt_iff_gt_iff_le_iff_ge E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, (a < b ↔ b < a) ↔ (a ≤ b ↔ b ≤ a)

theorem lt_iff_le_iff_gt_iff_ge E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, (a < b ↔ a ≤ b) ↔ (b < a ↔ b ≤ a)

theorem lt_iff_ge_iff_gt_iff_le E1 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, (a < b ↔ b ≤ a) ↔ (b < a ↔ a ≤ b)

instance instTransLE E0 #

{α : Type u_1} → [inst : Preorder α] → Trans LE.le LE.le LE.le

instance instTransLT E0 #

{α : Type u_1} → [inst : Preorder α] → Trans LT.lt LT.lt LT.lt

instance instTransLTLE E0 #

{α : Type u_1} → [inst : Preorder α] → Trans LT.lt LE.le LT.lt

instance instTransLELT E0 #

{α : Type u_1} → [inst : Preorder α] → Trans LE.le LT.lt LT.lt

instance instTransGE E0 #

{α : Type u_1} → [inst : Preorder α] → Trans GE.ge GE.ge GE.ge

instance instTransGT E0 #

{α : Type u_1} → [inst : Preorder α] → Trans GT.gt GT.gt GT.gt

instance instTransGTGE E0 #

{α : Type u_1} → [inst : Preorder α] → Trans GT.gt GE.ge GT.gt

instance instTransGEGT E0 #

{α : Type u_1} → [inst : Preorder α] → Trans GE.ge GT.gt GT.gt

def decidableLTOfDecidableLE E1 #

{α : Type u_1} → [inst : Preorder α] → [DecidableLE α] → DecidableLT α

< is decidable if ≤ is.

def WCovBy E1 #

{α : Type u_1} → [Preorder α] → α → α → Prop

WCovBy a b means that a = b or b covers a. This means that a ≤ b and there is no element in between. This is denoted a ⩿ b.

Conventions for notations in identifiers:

  • The recommended spelling of ⋖ in identifiers is wcovBy.

def «term_⩿_» E1 #

Lean.TrailingParserDescr

WCovBy a b means that a = b or b covers a. This means that a ≤ b and there is no element in between. This is denoted a ⩿ b.

Conventions for notations in identifiers:

  • The recommended spelling of ⋖ in identifiers is wcovBy.

def CovBy E1 #

{α : Type u_2} → [LT α] → α → α → Prop

CovBy a b means that b covers a. This means that a < b and there is no element in between. This is denoted a ⋖ b.

Conventions for notations in identifiers:

  • The recommended spelling of ⋖ in identifiers is covBy.

def «term_⋖_» E1 #

Lean.TrailingParserDescr

CovBy a b means that b covers a. This means that a < b and there is no element in between. This is denoted a ⋖ b.

Conventions for notations in identifiers:

  • The recommended spelling of ⋖ in identifiers is covBy.

class PartialOrder E3 #

Type u_2 → Type u_2

A partial order is a reflexive, transitive, antisymmetric relation ≤.

instance PartialOrder.toPreorder E0 #

{α : Type u_2} → [self : PartialOrder α] → Preorder α

ctor PartialOrder.mk E0 #

{α : Type u_2} → [toPreorder : Preorder α] → (∀ (a b : α), a ≤ b → b ≤ a → a = b) → PartialOrder α

theorem PartialOrder.le_antisymm E1 #

∀ {α : Type u_2} [self : PartialOrder α] (a b : α), a ≤ b → b ≤ a → a = b

instance instIsPartialOrder_mathlib E0 #

∀ {α : Type u_1} [inst : PartialOrder α], Std.IsPartialOrder α

theorem le_antisymm E2 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≤ b → b ≤ a → a = b

theorem ge_antisymm E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, b ≤ a → a ≤ b → a = b

theorem le_antisymm_iff E0 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a = b ↔ a ≤ b ∧ b ≤ a

theorem ge_antisymm_iff E0 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a = b ↔ b ≤ a ∧ a ≤ b

theorem lt_of_le_of_ne' E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, b ≤ a → a ≠ b → b < a

theorem lt_of_le_of_ne E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≤ b → a ≠ b → a < b

theorem lt_of_ne_of_le E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≠ b → a ≤ b → a < b

theorem lt_of_ne_of_le' E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≠ b → b ≤ a → b < a

def decidableEqOfDecidableLE E1 #

{α : Type u_1} → [inst : PartialOrder α] → [DecidableLE α] → DecidableEq α

Equality is decidable if ≤ is.

theorem Decidable.lt_or_eq_of_le' E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α} [DecidableLE α], b ≤ a → b < a ∨ a = b

theorem Decidable.lt_or_eq_of_le E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α} [DecidableLE α], a ≤ b → a < b ∨ a = b

theorem Decidable.le_iff_lt_or_eq' E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α} [DecidableLE α], b ≤ a ↔ b < a ∨ a = b

theorem Decidable.le_iff_lt_or_eq E0 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α} [DecidableLE α], a ≤ b ↔ a < b ∨ a = b

theorem lt_or_eq_of_le E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≤ b → a < b ∨ a = b

theorem lt_or_eq_of_le' E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, b ≤ a → b < a ∨ a = b

theorem le_iff_lt_or_eq' E1 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, b ≤ a ↔ b < a ∨ a = b

theorem le_iff_lt_or_eq E0 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, a ≤ b ↔ a < b ∨ a = b