-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Merged by Bors] - feat: define ConditionallyCompletePartialOrder
#35046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+99
−0
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| /- | ||
| Copyright (c) 2026 Jireh Loreaux. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Jireh Loreaux | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.Order.Bounds.Defs | ||
| public import Mathlib.Order.Directed | ||
| public import Mathlib.Order.SetNotation | ||
|
|
||
| /-! # Conditionally complete partial orders | ||
|
|
||
| This file defines conditionally compelte partial orders, which are partial orders where every | ||
| nonempty, directed set which is bounded above has a least upper bound. This class extends `SupSet` | ||
| and the requirement is that `sSup` must be the least upper bound. | ||
|
|
||
| In fact, this file defines *three* classes: | ||
|
|
||
| + `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. | ||
| 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. | ||
|
|
||
| ## TODO | ||
|
|
||
| + Write more `csSup`/`ciSup` lemmas for this class with `DirectedOn`/`Directed` assumptions. | ||
| Then prove the existing lemmas for conditionally complete lattices in terms of these. | ||
|
|
||
| -/ | ||
|
|
||
| --TODO: We could mimic more `sSup`/`iSup` lemmas | ||
|
|
||
| @[expose] public section | ||
|
|
||
| variable {ι : Sort*} {α : Type*} | ||
|
|
||
| /-- Conditionally complete partial orders (with infima) are partial orders | ||
| where every nonempty, directed set which is bounded below has a greatest lower bound. -/ | ||
| class ConditionallyCompletePartialOrderInf (α : Type*) | ||
| extends PartialOrder α, InfSet α where | ||
| /-- For each nonempty, directed set `s` which is bounded below, `sInf s` is | ||
| the greatest lower bound of `s`. -/ | ||
| isGLB_csInf_of_directed : | ||
| ∀ s, DirectedOn (· ≥ ·) s → s.Nonempty → BddBelow s → IsGLB s (sInf s) | ||
|
|
||
| /-- Conditionally complete partial orders (with suprema) are partial orders | ||
| where every nonempty, directed set which is bounded above has a least upper bound. -/ | ||
| @[to_dual existing] | ||
| class ConditionallyCompletePartialOrderSup (α : Type*) | ||
| extends PartialOrder α, SupSet α where | ||
| /-- For each nonempty, directed set `s` which is bounded above, `sSup s` is | ||
| the least upper bound of `s`. -/ | ||
| isLUB_csSup_of_directed : | ||
| ∀ s, DirectedOn (· ≤ ·) s → s.Nonempty → BddAbove s → IsLUB s (sSup s) | ||
|
|
||
| /-- Conditionally complete partial orders (with suprema and infimae) are partial orders | ||
| where every nonempty, directed set which is bounded above (respectively, below) has a | ||
| least upper (respectively, greatest lower) bound. -/ | ||
| class ConditionallyCompletePartialOrder (α : Type*) | ||
| extends ConditionallyCompletePartialOrderSup α, ConditionallyCompletePartialOrderInf α where | ||
|
|
||
| variable [ConditionallyCompletePartialOrderSup α] | ||
| variable {f : ι → α} {s : Set α} {a : α} | ||
|
|
||
| @[to_dual] | ||
| protected lemma DirectedOn.isLUB_csSup (h_dir : DirectedOn (· ≤ ·) s) | ||
| (h_non : s.Nonempty) (h_bdd : BddAbove s) : IsLUB s (sSup s) := | ||
| ConditionallyCompletePartialOrderSup.isLUB_csSup_of_directed s h_dir h_non h_bdd | ||
|
|
||
| @[to_dual csInf_le] | ||
| protected lemma DirectedOn.le_csSup (hs : DirectedOn (· ≤ ·) s) | ||
| (h_bdd : BddAbove s) (ha : a ∈ s) : a ≤ sSup s := | ||
| (hs.isLUB_csSup ⟨a, ha⟩ h_bdd).1 ha | ||
|
|
||
| @[to_dual le_csInf] | ||
| protected lemma DirectedOn.csSup_le (hd : DirectedOn (· ≤ ·) s) (h_non : s.Nonempty) | ||
| (ha : ∀ b ∈ s, b ≤ a) : sSup s ≤ a := | ||
| (hd.isLUB_csSup h_non ⟨a, ha⟩).2 ha | ||
|
|
||
| @[to_dual ciInf_le] | ||
| protected lemma Directed.le_ciSup (hf : Directed (· ≤ ·) f) | ||
| (hf_bdd : BddAbove (Set.range f)) (i : ι) : f i ≤ ⨆ j, f j := | ||
| hf.directedOn_range.le_csSup hf_bdd <| Set.mem_range_self _ | ||
|
|
||
| @[to_dual le_ciInf] | ||
| protected lemma Directed.ciSup_le [Nonempty ι] (hf : Directed (· ≤ ·) f) | ||
| (ha : ∀ i, f i ≤ a) : ⨆ i, f i ≤ a := | ||
| hf.directedOn_range.csSup_le (Set.range_nonempty _) <| Set.forall_mem_range.2 ha | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.