Skip to content

Commit 121d759

Browse files
committed
chore(Order/ConditionallyCompletePartialOrder/Indexed): use to_dual more to kill TODO (leanprover-community#41589)
This PR uses `to_dual` to translate some theorems about `ConditionallyCompletePartialOrder` and kill TODO.
1 parent 4851ebd commit 121d759

1 file changed

Lines changed: 8 additions & 58 deletions

File tree

Mathlib/Order/ConditionallyCompletePartialOrder/Indexed.lean

Lines changed: 8 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ public import Mathlib.Order.GaloisConnection.Basic
1414
This file proves lemmas about `iSup` and `iInf` for functions valued in a conditionally complete
1515
partial order, as opposed to a conditionally complete lattice.
1616
17-
## TODO
18-
19-
+ Use `@[to_dual]` in the `GaloisConnection` and `OrderIso` sections.
20-
2117
-/
2218

2319
public section
@@ -195,21 +191,25 @@ section Sup
195191
variable [ConditionallyCompletePartialOrderSup α] [ConditionallyCompletePartialOrderSup β]
196192
[Nonempty ι] {l : α → β} {u : β → α}
197193

194+
@[to_dual u_csInf_of_directedOn']
198195
theorem l_csSup_of_directedOn' (gc : GaloisConnection l u) {s : Set α}
199196
(hd : DirectedOn (· ≤ ·) s) (hne : s.Nonempty) (hbdd : BddAbove s) :
200197
l (sSup s) = sSup (l '' s) :=
201198
gc.isLUB_l_image (hd.isLUB_csSup hne hbdd) |>.unique <|
202199
(hd.mono_comp gc.monotone_l).isLUB_csSup (hne.image l) (gc.monotone_l.map_bddAbove hbdd)
203200

201+
@[to_dual u_csInf_of_directedOn]
204202
theorem l_csSup_of_directedOn (gc : GaloisConnection l u) {s : Set α} (hd : DirectedOn (· ≤ ·) s)
205203
(hne : s.Nonempty) (hbdd : BddAbove s) : l (sSup s) = ⨆ x : s, l x := by
206204
simpa only [← comp_def, ← sSup_range, range_comp, Subtype.range_coe_subtype, ofPred_mem_eq]
207205
using gc.l_csSup_of_directedOn' hd hne hbdd
208206

207+
@[to_dual u_ciInf_of_directed]
209208
theorem l_ciSup_of_directed (gc : GaloisConnection l u) {f : ι → α} (hd : Directed (· ≤ ·) f)
210209
(hf : BddAbove (range f)) : l (⨆ i, f i) = ⨆ i, l (f i) := by
211210
rw [iSup, gc.l_csSup_of_directedOn hd.directedOn_range (range_nonempty _) hf, iSup_range']
212211

212+
@[to_dual u_ciInf_set_of_directedOn]
213213
theorem l_ciSup_set_of_directedOn (gc : GaloisConnection l u) {s : Set γ} {f : γ → α}
214214
(hd : DirectedOn (· ≤ ·) (f '' s)) (hf : BddAbove (f '' s))
215215
(hne : s.Nonempty) : l (⨆ i : s, f i) = ⨆ i : s, l (f i) := by
@@ -220,33 +220,6 @@ theorem l_ciSup_set_of_directedOn (gc : GaloisConnection l u) {s : Set γ} {f :
220220

221221
end Sup
222222

223-
section Inf
224-
225-
variable [ConditionallyCompletePartialOrderInf α] [ConditionallyCompletePartialOrderInf β]
226-
[Nonempty ι] {l : α → β} {u : β → α}
227-
228-
theorem u_csInf_of_directedOn (gc : GaloisConnection l u) {s : Set β} (hd : DirectedOn (· ≥ ·) s)
229-
(hne : s.Nonempty) (hbdd : BddBelow s) :
230-
u (sInf s) = ⨅ x : s, u x :=
231-
gc.dual.l_csSup_of_directedOn hd hne hbdd
232-
233-
theorem u_csInf_of_directedOn' (gc : GaloisConnection l u) {s : Set β} (hd : DirectedOn (· ≥ ·) s)
234-
(hne : s.Nonempty) (hbdd : BddBelow s) :
235-
u (sInf s) = sInf (u '' s) :=
236-
gc.dual.l_csSup_of_directedOn' hd hne hbdd
237-
238-
theorem u_ciInf_of_directed (gc : GaloisConnection l u) {f : ι → β} (hd : Directed (· ≥ ·) f)
239-
(hf : BddBelow (range f)) :
240-
u (⨅ i, f i) = ⨅ i, u (f i) :=
241-
gc.dual.l_ciSup_of_directed hd hf
242-
243-
theorem u_ciInf_set_of_directedOn (gc : GaloisConnection l u) {s : Set γ} {f : γ → β}
244-
(hd : DirectedOn (· ≥ ·) (f '' s)) (hf : BddBelow (f '' s))
245-
(hne : s.Nonempty) : u (⨅ i : s, f i) = ⨅ i : s, u (f i) :=
246-
gc.dual.l_ciSup_set_of_directedOn hd hf hne
247-
248-
end Inf
249-
250223
end GaloisConnection
251224

252225
namespace OrderIso
@@ -257,50 +230,27 @@ variable [ConditionallyCompletePartialOrderSup α] [ConditionallyCompletePartial
257230
[Nonempty ι]
258231

259232
-- these need to have `directed` in their names.
233+
@[to_dual]
260234
theorem map_csSup_of_directedOn (e : α ≃o β) {s : Set α} (hd : DirectedOn (· ≤ ·) s)
261235
(hne : s.Nonempty) (hbdd : BddAbove s) : e (sSup s) = ⨆ x : s, e x :=
262236
e.to_galoisConnection.l_csSup_of_directedOn hd hne hbdd
263237

238+
@[to_dual]
264239
theorem map_csSup_of_directedOn' (e : α ≃o β) {s : Set α} (hd : DirectedOn (· ≤ ·) s)
265240
(hne : s.Nonempty) (hbdd : BddAbove s) : e (sSup s) = sSup (e '' s) :=
266241
e.to_galoisConnection.l_csSup_of_directedOn' hd hne hbdd
267242

243+
@[to_dual]
268244
theorem map_ciSup_of_directed (e : α ≃o β) {f : ι → α} (hd : Directed (· ≤ ·) f)
269245
(hf : BddAbove (range f)) : e (⨆ i, f i) = ⨆ i, e (f i) :=
270246
e.to_galoisConnection.l_ciSup_of_directed hd hf
271247

248+
@[to_dual]
272249
theorem map_ciSup_set_of_directedOn (e : α ≃o β) {s : Set γ} {f : γ → α}
273250
(hd : DirectedOn (· ≤ ·) (f '' s)) (hf : BddAbove (f '' s)) (hne : s.Nonempty) :
274251
e (⨆ i : s, f i) = ⨆ i : s, e (f i) :=
275252
e.to_galoisConnection.l_ciSup_set_of_directedOn hd hf hne
276253

277254
end Sup
278255

279-
section Inf
280-
281-
variable [ConditionallyCompletePartialOrderInf α] [ConditionallyCompletePartialOrderInf β]
282-
[Nonempty ι]
283-
284-
theorem map_csInf_of_directedOn (e : α ≃o β) {s : Set α} (hd : DirectedOn (· ≥ ·) s)
285-
(hne : s.Nonempty) (hbdd : BddBelow s) :
286-
e (sInf s) = ⨅ x : s, e x :=
287-
e.dual.map_csSup_of_directedOn hd hne hbdd
288-
289-
theorem map_csInf_of_directedOn' (e : α ≃o β) {s : Set α} (hd : DirectedOn (· ≥ ·) s)
290-
(hne : s.Nonempty) (hbdd : BddBelow s) :
291-
e (sInf s) = sInf (e '' s) :=
292-
e.dual.map_csSup_of_directedOn' hd hne hbdd
293-
294-
theorem map_ciInf_of_directed (e : α ≃o β) {f : ι → α} (hd : Directed (· ≥ ·) f)
295-
(hf : BddBelow (range f)) :
296-
e (⨅ i, f i) = ⨅ i, e (f i) :=
297-
e.dual.map_ciSup_of_directed hd hf
298-
299-
theorem map_ciInf_set_of_directedOn (e : α ≃o β) {s : Set γ} {f : γ → α}
300-
(hd : DirectedOn (· ≥ ·) (f '' s)) (hf : BddBelow (f '' s))
301-
(hne : s.Nonempty) : e (⨅ i : s, f i) = ⨅ i : s, e (f i) :=
302-
e.dual.map_ciSup_set_of_directedOn hd hf hne
303-
304-
end Inf
305-
306256
end OrderIso

0 commit comments

Comments
 (0)