@@ -88,7 +88,7 @@ alias ne_top_of_lt ← has_lt.lt.ne_top
88
88
89
89
end preorder
90
90
91
- variables [partial_order α] [order_top α] {a b : α}
91
+ variables [partial_order α] [order_top α] [preorder β] {f : α → β} {a b : α}
92
92
93
93
@[simp] lemma is_max_iff_eq_top : is_max a ↔ a = ⊤ :=
94
94
⟨λ h, h.eq_of_le le_top, λ h b _, h.symm ▸ le_top⟩
@@ -99,21 +99,25 @@ variables [partial_order α] [order_top α] {a b : α}
99
99
lemma not_is_max_iff_ne_top : ¬ is_max a ↔ a ≠ ⊤ := is_max_iff_eq_top.not
100
100
lemma not_is_top_iff_ne_top : ¬ is_top a ↔ a ≠ ⊤ := is_top_iff_eq_top.not
101
101
102
- alias is_max_iff_eq_top ↔ _ is_max.eq_top
103
- alias is_top_iff_eq_top ↔ _ is_top.eq_top
102
+ alias is_max_iff_eq_top ↔ is_max.eq_top _
103
+ alias is_top_iff_eq_top ↔ is_top.eq_top _
104
104
105
105
@[simp] lemma top_le_iff : ⊤ ≤ a ↔ a = ⊤ := le_top.le_iff_eq.trans eq_comm
106
106
lemma top_unique (h : ⊤ ≤ a) : a = ⊤ := le_top.antisymm h
107
107
lemma eq_top_iff : a = ⊤ ↔ ⊤ ≤ a := top_le_iff.symm
108
108
lemma eq_top_mono (h : a ≤ b) (h₂ : a = ⊤) : b = ⊤ := top_unique $ h₂ ▸ h
109
109
lemma lt_top_iff_ne_top : a < ⊤ ↔ a ≠ ⊤ := le_top.lt_iff_ne
110
+ @[simp] lemma not_lt_top_iff : ¬ a < ⊤ ↔ a = ⊤ := lt_top_iff_ne_top.not_left
110
111
lemma eq_top_or_lt_top (a : α) : a = ⊤ ∨ a < ⊤ := le_top.eq_or_lt
111
112
lemma ne.lt_top (h : a ≠ ⊤) : a < ⊤ := lt_top_iff_ne_top.mpr h
112
113
lemma ne.lt_top' (h : ⊤ ≠ a) : a < ⊤ := h.symm.lt_top
113
114
lemma ne_top_of_le_ne_top (hb : b ≠ ⊤) (hab : a ≤ b) : a ≠ ⊤ := (hab.trans_lt hb.lt_top).ne
114
115
115
- lemma eq_top_of_maximal (h : ∀ b, ¬ a < b) : a = ⊤ :=
116
- or.elim (lt_or_eq_of_le le_top) (λ hlt, absurd hlt (h ⊤)) (λ he, he)
116
+ lemma strict_mono.apply_eq_top_iff (hf : strict_mono f) : f a = f ⊤ ↔ a = ⊤ :=
117
+ ⟨λ h, not_lt_top_iff.1 $ λ ha, (hf ha).ne h, congr_arg _⟩
118
+
119
+ lemma strict_anti.apply_eq_top_iff (hf : strict_anti f) : f a = f ⊤ ↔ a = ⊤ :=
120
+ ⟨λ h, not_lt_top_iff.1 $ λ ha, (hf ha).ne' h, congr_arg _⟩
117
121
118
122
variables [nontrivial α]
119
123
@@ -168,7 +172,7 @@ alias ne_bot_of_gt ← has_lt.lt.ne_bot
168
172
169
173
end preorder
170
174
171
- variables [partial_order α] [order_bot α] {a b : α}
175
+ variables [partial_order α] [order_bot α] [preorder β] {f : α → β} {a b : α}
172
176
173
177
@[simp] lemma is_min_iff_eq_bot : is_min a ↔ a = ⊥ :=
174
178
⟨λ h, h.eq_of_ge bot_le, λ h b _, h.symm ▸ bot_le⟩
@@ -187,12 +191,19 @@ lemma bot_unique (h : a ≤ ⊥) : a = ⊥ := h.antisymm bot_le
187
191
lemma eq_bot_iff : a = ⊥ ↔ a ≤ ⊥ := le_bot_iff.symm
188
192
lemma eq_bot_mono (h : a ≤ b) (h₂ : b = ⊥) : a = ⊥ := bot_unique $ h₂ ▸ h
189
193
lemma bot_lt_iff_ne_bot : ⊥ < a ↔ a ≠ ⊥ := bot_le.lt_iff_ne.trans ne_comm
194
+ @[simp] lemma not_bot_lt_iff : ¬ ⊥ < a ↔ a = ⊥ := bot_lt_iff_ne_bot.not_left
190
195
lemma eq_bot_or_bot_lt (a : α) : a = ⊥ ∨ ⊥ < a := bot_le.eq_or_gt
191
196
lemma eq_bot_of_minimal (h : ∀ b, ¬ b < a) : a = ⊥ := (eq_bot_or_bot_lt a).resolve_right (h ⊥)
192
197
lemma ne.bot_lt (h : a ≠ ⊥) : ⊥ < a := bot_lt_iff_ne_bot.mpr h
193
198
lemma ne.bot_lt' (h : ⊥ ≠ a) : ⊥ < a := h.symm.bot_lt
194
199
lemma ne_bot_of_le_ne_bot (hb : b ≠ ⊥) (hab : b ≤ a) : a ≠ ⊥ := (hb.bot_lt.trans_le hab).ne'
195
200
201
+ lemma strict_mono.apply_eq_bot_iff (hf : strict_mono f) : f a = f ⊥ ↔ a = ⊥ :=
202
+ ⟨λ h, not_bot_lt_iff.1 $ λ ha, (hf ha).ne' h, congr_arg _⟩
203
+
204
+ lemma strict_anti.apply_eq_bot_iff (hf : strict_anti f) : f a = f ⊥ ↔ a = ⊥ :=
205
+ ⟨λ h, not_bot_lt_iff.1 $ λ ha, (hf ha).ne h, congr_arg _⟩
206
+
196
207
variables [nontrivial α]
197
208
198
209
lemma not_is_max_bot : ¬ is_max (⊥ : α) :=
0 commit comments