@@ -111,17 +111,26 @@ protected lemma _root_.has_lt.lt.covby_succ {a b : α} (h : a < b) : a ⋖ succ
111
111
@[simp] lemma covby_succ_of_nonempty_Ioi {a : α} (h : (set.Ioi a).nonempty) : a ⋖ succ a :=
112
112
has_lt.lt.covby_succ h.some_mem
113
113
114
+ lemma lt_succ_of_not_is_max {a : α} (ha : ¬ is_max a) : a < succ_order.succ a :=
115
+ (le_succ a).lt_of_not_le (λ h, not_exists.2 (maximal_of_succ_le h) (not_is_max_iff.mp ha))
116
+
117
+ lemma lt_succ_iff_of_not_is_max {a b : α} (ha : ¬ is_max a) : b < succ_order.succ a ↔ b ≤ a :=
118
+ ⟨le_of_lt_succ, λ h_le, h_le.trans_lt (lt_succ_of_not_is_max ha)⟩
119
+
120
+ lemma succ_le_iff_of_not_is_max {a b : α} (ha : ¬ is_max a) : succ a ≤ b ↔ a < b :=
121
+ ⟨(lt_succ_of_not_is_max ha).trans_le, succ_le_of_lt⟩
122
+
114
123
section no_max_order
115
124
variables [no_max_order α] {a b : α}
116
125
117
126
lemma lt_succ (a : α) : a < succ a :=
118
- (le_succ a).lt_of_not_le $ λ h, not_exists. 2 (maximal_of_succ_le h) (exists_gt a)
127
+ lt_succ_of_not_is_max (not_is_max a)
119
128
120
129
lemma lt_succ_iff : a < succ b ↔ a ≤ b :=
121
- ⟨le_of_lt_succ, λ h, h.trans_lt $ lt_succ b⟩
130
+ lt_succ_iff_of_not_is_max (not_is_max b)
122
131
123
132
lemma succ_le_iff : succ a ≤ b ↔ a < b :=
124
- ⟨(lt_succ a).trans_le, succ_le_of_lt⟩
133
+ succ_le_iff_of_not_is_max (not_is_max a)
125
134
126
135
@[simp] lemma succ_le_succ_iff : succ a ≤ succ b ↔ a ≤ b :=
127
136
⟨λ h, le_of_lt_succ $ (lt_succ a).trans_le h, λ h, succ_le_of_lt $ h.trans_lt $ lt_succ b⟩
@@ -267,6 +276,28 @@ begin
267
276
end
268
277
269
278
end complete_lattice
279
+
280
+ section intervals
281
+ variables [preorder α] [succ_order α]
282
+
283
+ lemma Iic_eq_Iio_succ' {a : α} (ha : ¬ is_max a) :
284
+ set.Iic a = set.Iio (succ_order.succ a) :=
285
+ by { ext1 x, rw [set.mem_Iic, set.mem_Iio], exact (lt_succ_iff_of_not_is_max ha).symm, }
286
+
287
+ lemma Iic_eq_Iio_succ [no_max_order α] (a : α) :
288
+ set.Iic a = set.Iio (succ_order.succ a) :=
289
+ Iic_eq_Iio_succ' (not_is_max a)
290
+
291
+ lemma Ioi_eq_Ici_succ' {a : α} (ha : ¬ is_max a) :
292
+ set.Ioi a = set.Ici (succ_order.succ a) :=
293
+ by { ext1 x, rw [set.mem_Ioi, set.mem_Ici], exact (succ_le_iff_of_not_is_max ha).symm, }
294
+
295
+ lemma Ioi_eq_Ici_succ [no_max_order α] (a : α) :
296
+ set.Ioi a = set.Ici (succ_order.succ a) :=
297
+ Ioi_eq_Ici_succ' (not_is_max a)
298
+
299
+ end intervals
300
+
270
301
end succ_order
271
302
272
303
/-! ### Predecessor order -/
@@ -323,17 +354,26 @@ protected lemma _root_.has_lt.lt.pred_covby {a b : α} (h : b < a) : pred a ⋖
323
354
@[simp] lemma pred_covby_of_nonempty_Iio {a : α} (h : (set.Iio a).nonempty) : pred a ⋖ a :=
324
355
has_lt.lt.pred_covby h.some_mem
325
356
357
+ lemma pred_lt_of_not_is_min {a : α} (ha : ¬ is_min a) : pred_order.pred a < a :=
358
+ (pred_le a).lt_of_not_le (λ h, not_exists.2 (minimal_of_le_pred h) (not_is_min_iff.mp ha))
359
+
360
+ lemma pred_lt_iff_of_not_is_min {a b : α} (ha : ¬ is_min a) : pred_order.pred a < b ↔ a ≤ b :=
361
+ ⟨le_of_pred_lt, λ h_le, (pred_lt_of_not_is_min ha).trans_le h_le⟩
362
+
363
+ lemma le_pred_iff_of_not_is_min {a b : α} (hb : ¬ is_min b) : a ≤ pred b ↔ a < b :=
364
+ ⟨λ h, h.trans_lt (pred_lt_of_not_is_min hb), le_pred_of_lt⟩
365
+
326
366
section no_min_order
327
367
variables [no_min_order α] {a b : α}
328
368
329
369
lemma pred_lt (a : α) : pred a < a :=
330
- (pred_le a).lt_of_not_le $ λ h, not_exists. 2 (minimal_of_le_pred h) (exists_lt a)
370
+ pred_lt_of_not_is_min (not_is_min a)
331
371
332
372
lemma pred_lt_iff : pred a < b ↔ a ≤ b :=
333
- ⟨le_of_pred_lt, (pred_lt a).trans_le⟩
373
+ pred_lt_iff_of_not_is_min (not_is_min a)
334
374
335
375
lemma le_pred_iff : a ≤ pred b ↔ a < b :=
336
- ⟨λ h, h.trans_lt (pred_lt b), le_pred_of_lt⟩
376
+ le_pred_iff_of_not_is_min (not_is_min b)
337
377
338
378
@[simp] lemma pred_le_pred_iff : pred a ≤ pred b ↔ a ≤ b :=
339
379
⟨λ h, le_of_pred_lt $ h.trans_lt (pred_lt b), λ h, le_pred_of_lt $ (pred_lt a).trans_le h⟩
@@ -477,6 +517,28 @@ begin
477
517
end
478
518
479
519
end complete_lattice
520
+
521
+ section intervals
522
+ variables [preorder α] [pred_order α]
523
+
524
+ lemma Ici_eq_Ioi_pred' {a : α} (ha : ¬ is_min a) :
525
+ set.Ici a = set.Ioi (pred_order.pred a) :=
526
+ by { ext1 x, rw [set.mem_Ici, set.mem_Ioi], exact (pred_lt_iff_of_not_is_min ha).symm, }
527
+
528
+ lemma Ici_eq_Ioi_pred [no_min_order α] (a : α) :
529
+ set.Ici a = set.Ioi (pred_order.pred a) :=
530
+ Ici_eq_Ioi_pred' (not_is_min a)
531
+
532
+ lemma Iio_eq_Iic_pred' {a : α} (ha : ¬ is_min a) :
533
+ set.Iio a = set.Iic (pred_order.pred a) :=
534
+ by { ext1 x, rw [set.mem_Iio, set.mem_Iic], exact (le_pred_iff_of_not_is_min ha).symm, }
535
+
536
+ lemma Iio_eq_Iic_pred [no_min_order α] (a : α) :
537
+ set.Iio a = set.Iic (pred_order.pred a) :=
538
+ Iio_eq_Iic_pred' (not_is_min a)
539
+
540
+ end intervals
541
+
480
542
end pred_order
481
543
482
544
open succ_order pred_order
0 commit comments