Skip to content

Commit c72b0ec

Browse files
committed
feat: define ConditionallyCompletePartialOrder (#35046)
This file defines *conditionally complete partial orders* with suprema, infima or both. These are partial orders where every nonempty, upwards (downwards) directed set which is bounded above (below) has a least upper bound (greatest lower bound). This class extends `SupSet` (`InfSet`) and the requirement is that `sSup` (`sInf`) must be the least upper bound. The three classes defined herein are: + `ConditionallyCompletePartialOrderSup` for partial orders with suprema, + `ConditionallyCompletePartialOrderInf` for partial orders with infima, and + `ConditionallyCompletePartialOrder` for partial orders with both suprema and infima One common use case for these classes is the order on a von Neumann algebra, or W⋆-algebra. This is the strongest order-theoretic structure satisfied by a von Neumann algebra; in particular it is *not* a conditionally complete *lattice*, and indeed it is a lattice if and only if the algebra is commutative. In addition, `ℂ` can be made to satisfy this class (one must provide a suitable `SupSet` instance), with the order `w ≤ z ↔ w.re ≤ z.re ∧ w.im = z.im`, which is available in the `ComplexOrder` namespace. These use cases are the motivation for defining three classes, as compared with other parts of the order theory library, where only the supremum versions are defined (e.g., `CompletePartialOrder` and `OmegaCompletePartialOrder`). We note that, if these classes are used outside of order theory, then it is more likely that the infimum versions would be useful. Indeed, whenever the underlying type has an antitone involution (e.g., if it is an ordered ring, then negation would be such a map), then any `ConditionallyCompletePartialOrder{Sup,Inf}` is automatically a `ConditionallyCompletePartialOrder`. Because of the `to_dual` attribute, the additional overhead required to add and maintain the infimum version is minimal.
1 parent 5264399 commit c72b0ec

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5570,6 +5570,7 @@ public import Mathlib.Order.ConditionallyCompleteLattice.Defs
55705570
public import Mathlib.Order.ConditionallyCompleteLattice.Finset
55715571
public import Mathlib.Order.ConditionallyCompleteLattice.Group
55725572
public import Mathlib.Order.ConditionallyCompleteLattice.Indexed
5573+
public import Mathlib.Order.ConditionallyCompletePartialOrder.Defs
55735574
public import Mathlib.Order.Copy
55745575
public import Mathlib.Order.CountableDenseLinearOrder
55755576
public import Mathlib.Order.Cover
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/-
2+
Copyright (c) 2026 Jireh Loreaux. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Jireh Loreaux
5+
-/
6+
module
7+
8+
public import Mathlib.Order.Bounds.Defs
9+
public import Mathlib.Order.Directed
10+
public import Mathlib.Order.SetNotation
11+
12+
/-! # Conditionally complete partial orders
13+
14+
This file defines *conditionally complete partial orders* with suprema, infima or both. These are
15+
partial orders where every nonempty, upwards (downwards) directed set which is
16+
bounded above (below) has a least upper bound (greatest lower bound). This class extends `SupSet`
17+
(`InfSet`) and the requirement is that `sSup` (`sInf`) must be the least upper bound.
18+
19+
The three classes defined herein are:
20+
21+
+ `ConditionallyCompletePartialOrderSup` for partial orders with suprema,
22+
+ `ConditionallyCompletePartialOrderInf` for partial orders with infima, and
23+
+ `ConditionallyCompletePartialOrder` for partial orders with both suprema and infima
24+
25+
One common use case for these classes is the order on a von Neumann algebra, or W⋆-algebra.
26+
This is the strongest order-theoretic structure satisfied by a von Neumann algebra;
27+
in particular it is *not* a conditionally complete *lattice*, and indeed it is a lattice if and only
28+
if the algebra is commutative. In addition, `ℂ` can be made to satisfy this class (one must provide
29+
a suitable `SupSet` instance), with the order `w ≤ z ↔ w.re ≤ z.re ∧ w.im = z.im`, which is
30+
available in the `ComplexOrder` namespace.
31+
32+
These use cases are the motivation for defining three classes, as compared with other parts of the
33+
order theory library, where only the supremum versions are defined (e.g., `CompletePartialOrder` and
34+
`OmegaCompletePartialOrder`). We note that, if these classes are used outside of order theory, then
35+
it is more likely that the infimum versions would be useful. Indeed, whenever the underlying type
36+
has an antitone involution (e.g., if it is an ordered ring, then negation would be such a map),
37+
then any `ConditionallyCompletePartialOrder{Sup,Inf}` is automatically a
38+
`ConditionallyCompletePartialOrder`. Because of the `to_dual` attribute, the additional overhead
39+
required to add and maintain the infimum version is minimal.
40+
41+
-/
42+
43+
@[expose] public section
44+
45+
variable {ι : Sort*} {α : Type*}
46+
47+
/-- Conditionally complete partial orders (with infima) are partial orders
48+
where every nonempty, directed set which is bounded below has a greatest lower bound. -/
49+
class ConditionallyCompletePartialOrderInf (α : Type*)
50+
extends PartialOrder α, InfSet α where
51+
/-- For each nonempty, directed set `s` which is bounded below, `sInf s` is
52+
the greatest lower bound of `s`. -/
53+
isGLB_csInf_of_directed :
54+
∀ s, DirectedOn (· ≥ ·) s → s.Nonempty → BddBelow s → IsGLB s (sInf s)
55+
56+
/-- Conditionally complete partial orders (with suprema) are partial orders
57+
where every nonempty, directed set which is bounded above has a least upper bound. -/
58+
@[to_dual existing]
59+
class ConditionallyCompletePartialOrderSup (α : Type*)
60+
extends PartialOrder α, SupSet α where
61+
/-- For each nonempty, directed set `s` which is bounded above, `sSup s` is
62+
the least upper bound of `s`. -/
63+
isLUB_csSup_of_directed :
64+
∀ s, DirectedOn (· ≤ ·) s → s.Nonempty → BddAbove s → IsLUB s (sSup s)
65+
66+
/-- Conditionally complete partial orders (with suprema and infimae) are partial orders
67+
where every nonempty, directed set which is bounded above (respectively, below) has a
68+
least upper (respectively, greatest lower) bound. -/
69+
class ConditionallyCompletePartialOrder (α : Type*)
70+
extends ConditionallyCompletePartialOrderSup α, ConditionallyCompletePartialOrderInf α where
71+
72+
variable [ConditionallyCompletePartialOrderSup α]
73+
variable {f : ι → α} {s : Set α} {a : α}
74+
75+
@[to_dual]
76+
protected lemma DirectedOn.isLUB_csSup (h_dir : DirectedOn (· ≤ ·) s)
77+
(h_non : s.Nonempty) (h_bdd : BddAbove s) : IsLUB s (sSup s) :=
78+
ConditionallyCompletePartialOrderSup.isLUB_csSup_of_directed s h_dir h_non h_bdd
79+
80+
@[to_dual csInf_le]
81+
protected lemma DirectedOn.le_csSup (hs : DirectedOn (· ≤ ·) s)
82+
(h_bdd : BddAbove s) (ha : a ∈ s) : a ≤ sSup s :=
83+
(hs.isLUB_csSup ⟨a, ha⟩ h_bdd).1 ha
84+
85+
@[to_dual le_csInf]
86+
protected lemma DirectedOn.csSup_le (hd : DirectedOn (· ≤ ·) s) (h_non : s.Nonempty)
87+
(ha : ∀ b ∈ s, b ≤ a) : sSup s ≤ a :=
88+
(hd.isLUB_csSup h_non ⟨a, ha⟩).2 ha
89+
90+
@[to_dual ciInf_le]
91+
protected lemma Directed.le_ciSup (hf : Directed (· ≤ ·) f)
92+
(hf_bdd : BddAbove (Set.range f)) (i : ι) : f i ≤ ⨆ j, f j :=
93+
hf.directedOn_range.le_csSup hf_bdd <| Set.mem_range_self _
94+
95+
@[to_dual le_ciInf]
96+
protected lemma Directed.ciSup_le [Nonempty ι] (hf : Directed (· ≤ ·) f)
97+
(ha : ∀ i, f i ≤ a) : ⨆ i, f i ≤ a :=
98+
hf.directedOn_range.csSup_le (Set.range_nonempty _) <| Set.forall_mem_range.2 ha

0 commit comments

Comments
 (0)