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.Completion

52 declarations. Mathlib docs · Source

Dedekind-MacNeille completion

The Dedekind-MacNeille completion of a partial order is the smallest complete lattice into which it embeds.

The theory of concept lattices allows for a simple construction. In fact, DedekindCut α is simply an abbreviation for Concept α α (· ≤ ·). This means we don't need to reprove that this is a complete lattice; instead, the file simply proves that any order embedding into another complete lattice factors through it.

Todo

  • Make the to_dual tactic work so that some lemmas are created automatically, eg DedekindCut.le_principal_iff from DedekindCut.principal_le_iff. See [https://github.com/leanprover-community/mathlib4/pull/37939#discussion_r3328958630]

Tags

Dedekind completion, Dedekind cut

abbrev DedekindCut E1 #

(α : Type u_1) → [Preorder α] → Type u_1

The Dedekind-MacNeille completion of a partial order is the smallest complete lattice that contains it. We define here the type of Dedekind cuts of α as the Concept lattice of the ≤ relation of α.

For A : DedekindCut α, the sets A.left and A.right are related by upperBounds A.left = A.right and lowerBounds A.right = A.left.

The theorem DedekindCut.principalEmbedding_trans_factorEmbedding proves that if α is a partial order and β is a complete lattice, any embedding α ↪o β factors through DedekindCut α.

instance DedekindCut.instPartialOrder E0 #

{α : Type u_1} → [inst : Preorder α] → PartialOrder (DedekindCut α)

abbrev DedekindCut.left E1 #

{α : Type u_1} → [inst : Preorder α] → DedekindCut α → Set α

The left set of a Dedekind cut. This is an alias for Concept.extent.

abbrev DedekindCut.right E1 #

{α : Type u_1} → [inst : Preorder α] → DedekindCut α → Set α

The right set of a Dedekind cut. This is an alias for Concept.intent.

theorem DedekindCut.left_mk E0 #

∀ {α : Type u_1} [inst : Preorder α] (l r : Set α) (hl : upperPolar (fun x1 x2 ↦ x1 ≤ x2) l = r)
  (hr : lowerPolar (fun x1 x2 ↦ x1 ≤ x2) r = l),
  DedekindCut.left { extent := l, intent := r, upperPolar_extent := hl, lowerPolar_intent := hr } = l

theorem DedekindCut.right_mk E0 #

∀ {α : Type u_1} [inst : Preorder α] (l r : Set α) (hl : upperPolar (fun x1 x2 ↦ x1 ≤ x2) l = r)
  (hr : lowerPolar (fun x1 x2 ↦ x1 ≤ x2) r = l),
  DedekindCut.right { extent := l, intent := r, upperPolar_extent := hl, lowerPolar_intent := hr } = r

theorem DedekindCut.ext E1 #

∀ {α : Type u_1} [inst : Preorder α] {A B : DedekindCut α}, A.left = B.left → A = B

See DedekindCut.ext' for a version using the right set instead.

theorem DedekindCut.ext_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] {A B : DedekindCut α}, A = B ↔ A.left = B.left

theorem DedekindCut.ext' E1 #

∀ {α : Type u_1} [inst : Preorder α] {A B : DedekindCut α}, A.right = B.right → A = B

See DedekindCut.ext for a version using the left set instead.

theorem DedekindCut.left_subset_left_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] {A B : DedekindCut α}, A.left ⊆ B.left ↔ A ≤ B

theorem DedekindCut.left_ssubset_left_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] {A B : DedekindCut α}, A.left ⊂ B.left ↔ A < B

theorem DedekindCut.right_subset_right_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] {A B : DedekindCut α}, A.right ⊆ B.right ↔ B ≤ A

theorem DedekindCut.right_ssubset_right_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] {A B : DedekindCut α}, A.right ⊂ B.right ↔ B < A

theorem DedekindCut.isLowerSet_left E1 #

∀ {α : Type u_1} [inst : Preorder α] (A : DedekindCut α), IsLowerSet A.left

theorem DedekindCut.isUpperSet_right E1 #

∀ {α : Type u_1} [inst : Preorder α] (A : DedekindCut α), IsUpperSet A.right

theorem DedekindCut.upperBounds_left E0 #

∀ {α : Type u_1} [inst : Preorder α] (A : DedekindCut α), upperBounds A.left = A.right

theorem DedekindCut.lowerBounds_right E0 #

∀ {α : Type u_1} [inst : Preorder α] (A : DedekindCut α), lowerBounds A.right = A.left

theorem DedekindCut.image_left_subset_lowerBounds E1 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
  Monotone f → ∀ (A : DedekindCut α), f '' A.left ⊆ lowerBounds (f '' A.right)

theorem DedekindCut.image_right_subset_upperBounds E1 #

∀ {α : Type u_1} {β : Type u_2} [inst : Preorder α] [inst_1 : Preorder β] {f : α → β},
  Monotone f → ∀ (A : DedekindCut α), f '' A.right ⊆ upperBounds (f '' A.left)

def DedekindCut.principal E1 #

{α : Type u_1} → [inst : Preorder α] → α → DedekindCut α

Convert an element into its Dedekind cut (Iic a, Ici a). This map is order-preserving, though it is injective only on partial orders.

theorem DedekindCut.left_principal E0 #

∀ {α : Type u_1} [inst : Preorder α] (a : α), (DedekindCut.principal a).left = Set.Iic a

theorem DedekindCut.right_principal E0 #

∀ {α : Type u_1} [inst : Preorder α] (a : α), (DedekindCut.principal a).right = Set.Ici a

theorem DedekindCut.ofObject_eq_principal E0 #

∀ {α : Type u_1} [inst : Preorder α] (a : α), Concept.ofObject (fun x1 x2 ↦ x1 ≤ x2) a = DedekindCut.principal a

theorem DedekindCut.ofAttribute_eq_principal E0 #

∀ {α : Type u_1} [inst : Preorder α] (a : α), Concept.ofAttribute (fun x1 x2 ↦ x1 ≤ x2) a = DedekindCut.principal a

theorem DedekindCut.principal_le_principal E0 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, DedekindCut.principal a ≤ DedekindCut.principal b ↔ a ≤ b

theorem DedekindCut.principal_lt_principal E0 #

∀ {α : Type u_1} [inst : Preorder α] {a b : α}, DedekindCut.principal a < DedekindCut.principal b ↔ a < b

theorem DedekindCut.le_principal_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] {a : α} {c : DedekindCut α}, c ≤ DedekindCut.principal a ↔ a ∈ c.right

theorem DedekindCut.principal_le_iff E0 #

∀ {α : Type u_1} [inst : Preorder α] {a : α} {c : DedekindCut α}, DedekindCut.principal a ≤ c ↔ a ∈ c.left

theorem DedekindCut.biSup_principal_left E1 #

∀ {α : Type u_1} [inst : Preorder α] (c : DedekindCut α), ⨆ x ∈ c.left, DedekindCut.principal x = c

theorem DedekindCut.biInf_principal_right E1 #

∀ {α : Type u_1} [inst : Preorder α] (c : DedekindCut α), ⨅ x ∈ c.right, DedekindCut.principal x = c

instance DedekindCut.instDecidableLE E0 #

{α : Type u_1} → [inst : Preorder α] → DecidableLE (DedekindCut α)

We can never have a computable decidable instance, for the same reason we can't on Set α.

theorem DedekindCut.principal_inj E0 #

∀ {α : Type u_1} [inst : PartialOrder α] {a b : α}, DedekindCut.principal a = DedekindCut.principal b ↔ a = b

def DedekindCut.principalEmbedding E1 #

{α : Type u_1} → [inst : PartialOrder α] → α ↪o DedekindCut α

DedekindCut.principal as an OrderEmbedding.

theorem DedekindCut.principalEmbedding_apply E0 #

∀ {α : Type u_1} [inst : PartialOrder α] (a : α), DedekindCut.principalEmbedding a = DedekindCut.principal a

theorem DedekindCut.coe_principalEmbedding E0 #

∀ {α : Type u_1} [inst : PartialOrder α], ⇑DedekindCut.principalEmbedding = DedekindCut.principal

theorem DedekindCut.principal_sSup_left E0 #

∀ {α : Type u_1} [inst : CompleteLattice α] (A : DedekindCut α), DedekindCut.principal (sSup A.left) = A

theorem DedekindCut.principal_sInf_right E0 #

∀ {α : Type u_1} [inst : CompleteLattice α] (A : DedekindCut α), DedekindCut.principal (sInf A.right) = A

def DedekindCut.factorEmbedding E1 #

{α : Type u_1} → {β : Type u_2} → [inst : CompleteLattice α] → [inst_1 : PartialOrder β] → β ↪o α → DedekindCut β ↪o α

Any order embedding β ↪o α into a complete lattice α factors through DedekindCut β.

This map is defined so that factorEmbedding f A = sSup (f '' A.left). Although the construction factorEmbedding f A = sInf (f '' A.right) would also work, these do not in general give equal embeddings.

theorem DedekindCut.factorEmbedding_apply E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : CompleteLattice α] [inst_1 : PartialOrder β] (f : β ↪o α) (A : DedekindCut β),
  (DedekindCut.factorEmbedding f) A = sSup (⇑f '' A.left)

theorem DedekindCut.factorEmbedding_principal E0 #

∀ {α : Type u_1} {β : Type u_2} [inst : CompleteLattice α] [inst_1 : PartialOrder β] (f : β ↪o α) (x : β),
  (DedekindCut.factorEmbedding f) (DedekindCut.principal x) = f x

theorem DedekindCut.principalEmbedding_trans_factorEmbedding E1 #

∀ {α : Type u_1} {β : Type u_2} [inst : CompleteLattice α] [inst_1 : PartialOrder β] (f : β ↪o α),
  RelEmbedding.trans DedekindCut.principalEmbedding (DedekindCut.factorEmbedding f) = f

The Dedekind-MacNeille completion of a partial order is the smallest complete lattice containing it, in the sense that any embedding into any complete lattice factors through it.

def DedekindCut.principalIso E1 #

{α : Type u_1} → [inst : CompleteLattice α] → α ≃o DedekindCut α

DedekindCut.principal as an OrderIso.

This provides the second half of the fundamental theorem of concept lattices: every complete lattice is isomorphic to a concept lattice (its own Dedekind completion).

See Concept.instCompleteLattice for the first half.

theorem DedekindCut.principalIso_apply E0 #

∀ {α : Type u_1} [inst : CompleteLattice α] (a : α), DedekindCut.principalIso a = DedekindCut.principal a

theorem DedekindCut.principalIso_symm_apply E0 #

∀ {α : Type u_1} [inst : CompleteLattice α] (A : DedekindCut α), DedekindCut.principalIso.symm A = sSup A.left

instance DedekindCut.instTotalLe E0 #

∀ {α : Type u_1} [inst : LinearOrder α], Std.Total fun x1 x2 ↦ x1 ≤ x2

instance DedekindCut.instLinearOrder E0 #

{α : Type u_1} → [inst : LinearOrder α] → LinearOrder (DedekindCut α)

theorem DedekindCut.lt_iff_exists E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {a b : DedekindCut α},
  a < b ↔ ∃ c, a < DedekindCut.principal c ∧ DedekindCut.principal c ≤ b

Use DedekindCut.lt_iff_exists' for a version with < and ≤ swapped

theorem DedekindCut.lt_iff_exists' E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {a b : DedekindCut α},
  a < b ↔ ∃ c, a ≤ DedekindCut.principal c ∧ DedekindCut.principal c < b

Variant of DedekindCut.lt_iff_exists with < and ≤ swapped

instance DedekindCut.instCompleteLinearOrder E0 #

{α : Type u_1} → [inst : LinearOrder α] → CompleteLinearOrder (DedekindCut α)

instance DedekindCut.instDenselyOrdered E0 #

∀ {α : Type u_1} [inst : LinearOrder α] [DenselyOrdered α], DenselyOrdered (DedekindCut α)

theorem DedekindCut.principal_lt_iff E0 #

∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {c : DedekindCut α}, DedekindCut.principal a < c ↔ ∃ b ∈ c.left, a < b

theorem DedekindCut.lt_principal_iff E0 #

∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {c : DedekindCut α}, c < DedekindCut.principal a ↔ ∃ b ∈ c.right, b < a