@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Jeremy Avigad, Mario Carneiro, Yaël Dillies
5
5
-/
6
6
import order.compare
7
+ import order.order_dual
7
8
8
9
/-!
9
10
# Monotonicity
@@ -97,106 +98,93 @@ def strict_anti_on (f : α → β) (s : set α) : Prop :=
97
98
98
99
end monotone_def
99
100
100
- /-! #### Monotonicity on the dual order -/
101
+ /-! #### Monotonicity on the dual order
102
+
103
+ Strictly many of the `*_on.dual` lemmas in this section should use `of_dual ⁻¹' s` instead of `s`,
104
+ but right now this is not possible as `set.preimage` is not defined yet, and importing it creates
105
+ an import cycle.
106
+ -/
101
107
102
108
section order_dual
103
109
open order_dual
104
110
variables [preorder α] [preorder β] {f : α → β} {s : set α}
105
111
106
- protected theorem monotone.dual (hf : monotone f) :
107
- @monotone (order_dual α) (order_dual β) _ _ f :=
112
+ protected theorem monotone.dual (hf : monotone f) : monotone (to_dual ∘ f ∘ of_dual) :=
108
113
λ a b h, hf h
109
114
110
- protected lemma monotone.dual_left (hf : monotone f) :
111
- @antitone (order_dual α) β _ _ f :=
115
+ protected lemma monotone.dual_left (hf : monotone f) : antitone (f ∘ of_dual) :=
112
116
λ a b h, hf h
113
117
114
- protected lemma monotone.dual_right (hf : monotone f) :
115
- @antitone α (order_dual β) _ _ f :=
118
+ protected lemma monotone.dual_right (hf : monotone f) : antitone (to_dual ∘ f) :=
116
119
λ a b h, hf h
117
120
118
- protected theorem antitone.dual (hf : antitone f) :
119
- @antitone (order_dual α) (order_dual β) _ _ f :=
121
+ protected theorem antitone.dual (hf : antitone f) : antitone (to_dual ∘ f ∘ of_dual) :=
120
122
λ a b h, hf h
121
123
122
- protected lemma antitone.dual_left (hf : antitone f) :
123
- @monotone (order_dual α) β _ _ f :=
124
+ protected lemma antitone.dual_left (hf : antitone f) : monotone (f ∘ of_dual) :=
124
125
λ a b h, hf h
125
126
126
- protected lemma antitone.dual_right (hf : antitone f) :
127
- @monotone α (order_dual β) _ _ f :=
127
+ protected lemma antitone.dual_right (hf : antitone f) : monotone (to_dual ∘ f) :=
128
128
λ a b h, hf h
129
129
130
- protected theorem monotone_on.dual (hf : monotone_on f s) :
131
- @monotone_on (order_dual α) (order_dual β) _ _ f s :=
130
+ protected theorem monotone_on.dual (hf : monotone_on f s) : monotone_on (to_dual ∘ f ∘ of_dual) s :=
132
131
λ a ha b hb, hf hb ha
133
132
134
- protected lemma monotone_on.dual_left (hf : monotone_on f s) :
135
- @antitone_on (order_dual α) β _ _ f s :=
133
+ protected lemma monotone_on.dual_left (hf : monotone_on f s) : antitone_on (f ∘ of_dual) s :=
136
134
λ a ha b hb, hf hb ha
137
135
138
- protected lemma monotone_on.dual_right (hf : monotone_on f s) :
139
- @antitone_on α (order_dual β) _ _ f s :=
136
+ protected lemma monotone_on.dual_right (hf : monotone_on f s) : antitone_on (to_dual ∘ f) s :=
140
137
λ a ha b hb, hf ha hb
141
138
142
- protected theorem antitone_on.dual (hf : antitone_on f s) :
143
- @antitone_on (order_dual α) (order_dual β) _ _ f s :=
139
+ protected theorem antitone_on.dual (hf : antitone_on f s) : antitone_on (to_dual ∘ f ∘ of_dual) s :=
144
140
λ a ha b hb, hf hb ha
145
141
146
- protected lemma antitone_on.dual_left (hf : antitone_on f s) :
147
- @monotone_on (order_dual α) β _ _ f s :=
142
+ protected lemma antitone_on.dual_left (hf : antitone_on f s) : monotone_on (f ∘ of_dual) s :=
148
143
λ a ha b hb, hf hb ha
149
144
150
- protected lemma antitone_on.dual_right (hf : antitone_on f s) :
151
- @monotone_on α (order_dual β) _ _ f s :=
145
+ protected lemma antitone_on.dual_right (hf : antitone_on f s) : monotone_on (to_dual ∘ f) s :=
152
146
λ a ha b hb, hf ha hb
153
147
154
- protected theorem strict_mono.dual (hf : strict_mono f) :
155
- @strict_mono (order_dual α) (order_dual β) _ _ f :=
148
+ protected theorem strict_mono.dual (hf : strict_mono f) : strict_mono (to_dual ∘ f ∘ of_dual) :=
156
149
λ a b h, hf h
157
150
158
- protected lemma strict_mono.dual_left (hf : strict_mono f) :
159
- @strict_anti (order_dual α) β _ _ f :=
151
+ protected lemma strict_mono.dual_left (hf : strict_mono f) : strict_anti (f ∘ of_dual) :=
160
152
λ a b h, hf h
161
153
162
- protected lemma strict_mono.dual_right (hf : strict_mono f) :
163
- @strict_anti α (order_dual β) _ _ f :=
154
+ protected lemma strict_mono.dual_right (hf : strict_mono f) : strict_anti (to_dual ∘ f) :=
164
155
λ a b h, hf h
165
156
166
- protected theorem strict_anti.dual (hf : strict_anti f) :
167
- @strict_anti (order_dual α) (order_dual β) _ _ f :=
157
+ protected theorem strict_anti.dual (hf : strict_anti f) : strict_anti (to_dual ∘ f ∘ of_dual) :=
168
158
λ a b h, hf h
169
159
170
- protected lemma strict_anti.dual_left (hf : strict_anti f) :
171
- @strict_mono (order_dual α) β _ _ f :=
160
+ protected lemma strict_anti.dual_left (hf : strict_anti f) : strict_mono (f ∘ of_dual) :=
172
161
λ a b h, hf h
173
162
174
- protected lemma strict_anti.dual_right (hf : strict_anti f) :
175
- @strict_mono α (order_dual β) _ _ f :=
163
+ protected lemma strict_anti.dual_right (hf : strict_anti f) : strict_mono (to_dual ∘ f) :=
176
164
λ a b h, hf h
177
165
178
166
protected theorem strict_mono_on.dual (hf : strict_mono_on f s) :
179
- @ strict_mono_on (order_dual α) (order_dual β) _ _ f s :=
167
+ strict_mono_on (to_dual ∘ f ∘ of_dual) s :=
180
168
λ a ha b hb, hf hb ha
181
169
182
170
protected lemma strict_mono_on.dual_left (hf : strict_mono_on f s) :
183
- @ strict_anti_on (order_dual α) β _ _ f s :=
171
+ strict_anti_on (f ∘ of_dual) s :=
184
172
λ a ha b hb, hf hb ha
185
173
186
174
protected lemma strict_mono_on.dual_right (hf : strict_mono_on f s) :
187
- @ strict_anti_on α (order_dual β) _ _ f s :=
175
+ strict_anti_on (to_dual ∘ f) s :=
188
176
λ a ha b hb, hf ha hb
189
177
190
178
protected theorem strict_anti_on.dual (hf : strict_anti_on f s) :
191
- @ strict_anti_on (order_dual α) (order_dual β) _ _ f s :=
179
+ strict_anti_on (to_dual ∘ f ∘ of_dual) s :=
192
180
λ a ha b hb, hf hb ha
193
181
194
182
protected lemma strict_anti_on.dual_left (hf : strict_anti_on f s) :
195
- @ strict_mono_on (order_dual α) β _ _ f s :=
183
+ strict_mono_on (f ∘ of_dual) s :=
196
184
λ a ha b hb, hf hb ha
197
185
198
186
protected lemma strict_anti_on.dual_right (hf : strict_anti_on f s) :
199
- @ strict_mono_on α (order_dual β) _ _ f s :=
187
+ strict_mono_on (to_dual ∘ f) s :=
200
188
λ a ha b hb, hf ha hb
201
189
202
190
end order_dual
@@ -347,7 +335,7 @@ protected lemma strict_anti.ite' (hf : strict_anti f) (hg : strict_anti g) {p :
347
335
[decidable_pred p] (hp : ∀ ⦃x y⦄, x < y → p y → p x)
348
336
(hfg : ∀ ⦃x y⦄, p x → ¬p y → x < y → g y < f x) :
349
337
strict_anti (λ x, if p x then f x else g x) :=
350
- @ strict_mono.ite' α (order_dual β) _ _ f g hf hg p _ hp hfg
338
+ ( strict_mono.ite' hf.dual_right hg.dual_right hp hfg).dual_right
351
339
352
340
protected lemma strict_anti.ite (hf : strict_anti f) (hg : strict_anti g) {p : α → Prop }
353
341
[decidable_pred p] (hp : ∀ ⦃x y⦄, x < y → p y → p x) (hfg : ∀ x, g x ≤ f x) :
0 commit comments