@@ -221,6 +221,8 @@ lemma Icc_subset_Ici_self : Icc a b ⊆ Ici a := λ x, and.left
221
221
222
222
lemma Icc_subset_Iic_self : Icc a b ⊆ Iic b := λ x, and.right
223
223
224
+ lemma Ioc_subset_Iic_self : Ioc a b ⊆ Iic b := λ x, and.right
225
+
224
226
lemma Ioc_subset_Ioc (h₁ : a₂ ≤ a₁) (h₂ : b₁ ≤ b₂) :
225
227
Ioc a₁ b₁ ⊆ Ioc a₂ b₂ :=
226
228
λ x ⟨hx₁, hx₂⟩, ⟨lt_of_le_of_lt h₁ hx₁, le_trans hx₂ h₂⟩
@@ -263,6 +265,8 @@ lemma Ioi_subset_Ici_self : Ioi a ⊆ Ici a := λx hx, le_of_lt hx
263
265
264
266
lemma Iio_subset_Iic_self : Iio a ⊆ Iic a := λx hx, le_of_lt hx
265
267
268
+ lemma Ico_subset_Ici_self : Ico a b ⊆ Ici a := λ x, and.left
269
+
266
270
lemma Icc_subset_Icc_iff (h₁ : a₁ ≤ b₁) :
267
271
Icc a₁ b₁ ⊆ Icc a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂ :=
268
272
⟨λ h, ⟨(h ⟨le_refl _, h₁⟩).1 , (h ⟨h₁, le_refl _⟩).2 ⟩,
@@ -378,6 +382,20 @@ by rw [← Iic_diff_right, diff_diff_cancel_left (singleton_subset_iff.2 right_m
378
382
379
383
@[simp] lemma Iio_union_right : Iio a ∪ {a} = Iic a := ext $ λ x, le_iff_lt_or_eq.symm
380
384
385
+ lemma Ioo_union_left (hab : a < b) : Ioo a b ∪ {a} = Ico a b :=
386
+ by rw [← Ico_diff_left, diff_union_self,
387
+ union_eq_self_of_subset_right (singleton_subset_iff.2 $ left_mem_Ico.2 hab)]
388
+
389
+ lemma Ioo_union_right (hab : a < b) : Ioo a b ∪ {b} = Ioc a b :=
390
+ by simpa only [dual_Ioo, dual_Ico] using @Ioo_union_left (order_dual α) _ b a hab
391
+
392
+ lemma Ioc_union_left (hab : a ≤ b) : Ioc a b ∪ {a} = Icc a b :=
393
+ by rw [← Icc_diff_left, diff_union_self,
394
+ union_eq_self_of_subset_right (singleton_subset_iff.2 $ left_mem_Icc.2 hab)]
395
+
396
+ lemma Ico_union_right (hab : a ≤ b) : Ico a b ∪ {b} = Icc a b :=
397
+ by simpa only [dual_Ioc, dual_Icc] using @Ioc_union_left (order_dual α) _ b a hab
398
+
381
399
lemma mem_Ici_Ioi_of_subset_of_subset {s : set α} (ho : Ioi a ⊆ s) (hc : s ⊆ Ici a) :
382
400
s ∈ ({Ici a, Ioi a} : set (set α)) :=
383
401
classical.by_cases
@@ -447,13 +465,27 @@ lemma Iic_singleton_of_bot {a : α} (h_bot : ∀ x, a ≤ x) : Iic a = {a} :=
447
465
448
466
end partial_order
449
467
450
- section order_top_or_bot
451
- variables {α : Type u}
468
+ section order_top
469
+
470
+ variables {α : Type u} [order_top α] {a : α}
471
+
472
+ @[simp] lemma Ici_top : Ici (⊤ : α) = {⊤} := Ici_singleton_of_top (λ _, le_top)
473
+ @[simp] lemma Iic_top : Iic (⊤ : α) = univ := eq_univ_of_forall $ λ x, le_top
474
+ @[simp] lemma Icc_top : Icc a ⊤ = Ici a := by simp [← Ici_inter_Iic]
475
+ @[simp] lemma Ioc_top : Ioc a ⊤ = Ioi a := by simp [← Ioi_inter_Iic]
476
+
477
+ end order_top
478
+
479
+ section order_bot
480
+
481
+ variables {α : Type u} [order_bot α] {a : α}
452
482
453
- @[simp] lemma Ici_top [order_top α] : Ici (⊤ : α) = {⊤} := Ici_singleton_of_top (λ _, le_top)
454
- @[simp] lemma Ici_bot [order_bot α] : Iic (⊥ : α) = {⊥} := Iic_singleton_of_bot (λ _, bot_le)
483
+ @[simp] lemma Iic_bot : Iic (⊥ : α) = {⊥} := Iic_singleton_of_bot (λ _, bot_le)
484
+ @[simp] lemma Ici_bot : Ici (⊥ : α) = univ := @Iic_top (order_dual α) _
485
+ @[simp] lemma Icc_bot : Icc ⊥ a = Iic a := by simp [← Ici_inter_Iic]
486
+ @[simp] lemma Ico_bot : Ico ⊥ a = Iio a := by simp [← Ici_inter_Iio]
455
487
456
- end order_top_or_bot
488
+ end order_bot
457
489
458
490
section linear_order
459
491
variables {α : Type u} [linear_order α] {a a₁ a₂ b b₁ b₂ : α}
0 commit comments