@@ -6,6 +6,7 @@ Authors: Yaël Dillies, Sara Rousta
6
6
import Mathlib.Logic.Equiv.Set
7
7
import Mathlib.Order.Interval.Set.OrderEmbedding
8
8
import Mathlib.Order.SetNotation
9
+ import Mathlib.Order.WellFounded
9
10
10
11
/-!
11
12
# Properties of unbundled upper/lower sets
@@ -353,4 +354,23 @@ theorem IsUpperSet.total (hs : IsUpperSet s) (ht : IsUpperSet t) : s ⊆ t ∨ t
353
354
theorem IsLowerSet.total (hs : IsLowerSet s) (ht : IsLowerSet t) : s ⊆ t ∨ t ⊆ s :=
354
355
hs.toDual.total ht.toDual
355
356
357
+ theorem IsUpperSet.eq_empty_or_Ici [WellFoundedLT α] (h : IsUpperSet s) :
358
+ s = ∅ ∨ (∃ a, s = Set.Ici a) := by
359
+ refine or_iff_not_imp_left.2 fun ha ↦ ?_
360
+ obtain ⟨a, ha⟩ := Set.nonempty_iff_ne_empty.2 ha
361
+ exact ⟨_, Set.ext fun b ↦ ⟨wellFounded_lt.min_le, (h · <| wellFounded_lt.min_mem _ ⟨a, ha⟩)⟩⟩
362
+
363
+ theorem IsLowerSet.eq_empty_or_Iic [WellFoundedGT α] (h : IsLowerSet s) :
364
+ s = ∅ ∨ (∃ a, s = Set.Iic a) :=
365
+ IsUpperSet.eq_empty_or_Ici (α := αᵒᵈ) h
366
+
367
+ theorem IsLowerSet.eq_univ_or_Iio [WellFoundedLT α] (h : IsLowerSet s) :
368
+ s = .univ ∨ (∃ a, s = Set.Iio a) := by
369
+ simp_rw [← @compl_inj_iff _ s]
370
+ simpa using h.compl.eq_empty_or_Ici
371
+
372
+ theorem IsUpperSet.eq_univ_or_Ioi [WellFoundedGT α] (h : IsUpperSet s) :
373
+ s = .univ ∨ (∃ a, s = Set.Ioi a) :=
374
+ IsLowerSet.eq_univ_or_Iio (α := αᵒᵈ) h
375
+
356
376
end LinearOrder
0 commit comments