Skip to content

Commit d2df507

Browse files
committed
feat: DirSupClosedOn on linear orders (leanprover-community#38809)
Every subset of a linear order is directed, so we can take off this part of the predicate.
1 parent 83a5988 commit d2df507

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

Mathlib/Order/DirSupClosed.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,28 @@ theorem dirSupClosedOn_singleton (a : α) : DirSupClosedOn D {a} :=
221221

222222
end PartialOrder
223223

224+
namespace LinearOrder
225+
variable [LinearOrder α]
226+
227+
theorem dirSupClosedOn_iff_of_linearOrder :
228+
DirSupClosedOn D s ↔ ∀ ⦃d⦄, d ∈ D → d ⊆ s → d.Nonempty → ∀ ⦃a⦄, IsLUB d a → a ∈ s := by
229+
simp [DirSupClosedOn]
230+
231+
theorem dirSupClosed_iff_of_linearOrder :
232+
DirSupClosed s ↔ ∀ ⦃d⦄, d ⊆ s → d.Nonempty → ∀ ⦃a⦄, IsLUB d a → a ∈ s := by
233+
simp [DirSupClosed]
234+
235+
theorem dirSupInaccOn_iff_of_linearOrder :
236+
DirSupInaccOn D s ↔
237+
∀ ⦃d⦄, d ∈ D → d.Nonempty → ∀ ⦃a⦄, IsLUB d a → a ∈ s → (d ∩ s).Nonempty := by
238+
simp [DirSupInaccOn]
239+
240+
theorem dirSupInacc_iff_of_linearOrder :
241+
DirSupInacc s ↔ ∀ ⦃d⦄, d.Nonempty → ∀ ⦃a⦄, IsLUB d a → a ∈ s → (d ∩ s).Nonempty := by
242+
simp [DirSupInacc]
243+
244+
end LinearOrder
245+
224246
section CompleteLattice
225247
variable [CompleteLattice α]
226248

Mathlib/Order/Directed.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ theorem Std.Total.directed [Std.Total r] (f : ι → α) : Directed r f := fun i
132132
theorem Std.Total.directedOn [Std.Total r] (s : Set α) : DirectedOn r s := fun a ha b hb =>
133133
Or.casesOn (total_of r a b) (fun h => ⟨b, hb, h, refl _⟩) fun h => ⟨a, ha, refl _, h⟩
134134

135+
@[simp]
136+
theorem DirectedOn.of_linearOrder [LinearOrder α] (s : Set α) : DirectedOn (· ≤ ·) s :=
137+
Std.Total.directedOn s
138+
135139
/-- `IsDirected α r` states that for any elements `a`, `b` there exists an element `c` such that
136140
`r a c` and `r b c`. -/
137141
class IsDirected (α : Sort*) (r : α → α → Prop) : Prop where

0 commit comments

Comments
 (0)