Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit e598894

Browse files
PatrickMassotmergify[bot]
authored andcommitted
chore(topology/*): reverse order on topological and uniform spaces (#1138)
* chore(topology/*): reverse order on topological and uniform spaces * fix(topology/order): private lemma hiding partial order oscillation, following Mario's suggestion * change a temporary name Co-Authored-By: Johan Commelin <johan@commelin.net> * forgotten rename
1 parent b1cb48d commit e598894

File tree

16 files changed

+360
-333
lines changed

16 files changed

+360
-333
lines changed

src/measure_theory/borel_space.lean

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,15 @@ measurable.is_glb hf $ λ b, is_glb_infi
294294

295295
lemma measurable.supr_Prop {α} [topological_space α] [complete_linear_order α]
296296
[orderable_topology α] [second_countable_topology α]
297-
{β} [measurable_space β] {p : Prop} {f : β → α} (hf : measurable f):
297+
{β} [measurable_space β] {p : Prop} {f : β → α} (hf : measurable f):
298298
measurable (λ b, ⨆ h : p, f b) :=
299299
classical.by_cases
300300
(assume h : p, begin convert hf, funext, exact supr_pos h end)
301301
(assume h : ¬p, begin convert measurable_const, funext, exact supr_neg h end)
302302

303303
lemma measurable.infi_Prop {α} [topological_space α] [complete_linear_order α]
304304
[orderable_topology α] [second_countable_topology α]
305-
{β} [measurable_space β] {p : Prop} {f : β → α} (hf : measurable f):
305+
{β} [measurable_space β] {p : Prop} {f : β → α} (hf : measurable f):
306306
measurable (λ b, ⨅ h : p, f b) :=
307307
classical.by_cases
308308
(assume h : p, begin convert hf, funext, exact infi_pos h end )
@@ -352,17 +352,17 @@ end
352352
end real
353353

354354
namespace nnreal
355-
open filter measure_theory
355+
open filter measure_theory
356356

357-
lemma measurable_add [measurable_space α] {f : α → nnreal} {g : α → nnreal} :
357+
lemma measurable_add [measurable_space α] {f : α → nnreal} {g : α → nnreal} :
358358
measurable f → measurable g → measurable (λa, f a + g a) :=
359359
measurable_of_continuous2 continuous_add'
360360

361-
lemma measurable_sub [measurable_space α] {f g: α → nnreal}
362-
(hf : measurable f) (hg : measurable g) : measurable (λ a, f a - g a) :=
361+
lemma measurable_sub [measurable_space α] {f g: α → nnreal}
362+
(hf : measurable f) (hg : measurable g) : measurable (λ a, f a - g a) :=
363363
measurable_of_continuous2 continuous_sub' hf hg
364364

365-
lemma measurable_mul [measurable_space α] {f : α → nnreal} {g : α → nnreal} :
365+
lemma measurable_mul [measurable_space α] {f : α → nnreal} {g : α → nnreal} :
366366
measurable f → measurable g → measurable (λa, f a * g a) :=
367367
measurable_of_continuous2 continuous_mul'
368368

@@ -467,14 +467,14 @@ begin
467467
{ simp [measurable_const] }
468468
end
469469

470-
lemma measurable_sub {α : Type*} [measurable_space α] {f g : α → ennreal} :
470+
lemma measurable_sub {α : Type*} [measurable_space α] {f g : α → ennreal} :
471471
measurable f → measurable g → measurable (λa, f a - g a) :=
472472
begin
473473
refine measurable_of_measurable_nnreal_nnreal (has_sub.sub) _ _ _,
474474
{ simp only [ennreal.coe_sub.symm],
475-
exact measurable_coe.comp
475+
exact measurable_coe.comp
476476
(nnreal.measurable_sub (measurable_fst measurable_id) (measurable_snd measurable_id)) },
477-
{ simp [measurable_const] },
477+
{ simp [measurable_const] },
478478
{ simp [measurable_const] }
479479
end
480480

src/order/complete_lattice.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,16 @@ eq.trans supr_union $ congr_arg (λx:α, x ⊔ (⨆x∈s, f x)) supr_supr_eq_lef
584584
show (⨅ x ∈ insert b (∅ : set β), f x) = f b,
585585
by simp
586586

587+
@[simp] theorem infi_pair {f : β → α} {a b : β} : (⨅ x ∈ ({a, b} : set β), f x) = f a ⊓ f b :=
588+
by { rw [show {a, b} = (insert b {a} : set β), from rfl, infi_insert, inf_comm], simp }
589+
587590
@[simp] theorem supr_singleton {f : β → α} {b : β} : (⨆ x ∈ (singleton b : set β), f x) = f b :=
588591
show (⨆ x ∈ insert b (∅ : set β), f x) = f b,
589592
by simp
590593

594+
@[simp] theorem supr_pair {f : β → α} {a b : β} : (⨆ x ∈ ({a, b} : set β), f x) = f a ⊔ f b :=
595+
by { rw [show {a, b} = (insert b {a} : set β), from rfl, supr_insert, sup_comm], simp }
596+
591597
lemma infi_image {γ} {f : β → γ} {g : γ → α} {t : set β} :
592598
(⨅ c ∈ f '' t, g c) = (⨅ b ∈ t, g (f b)) :=
593599
le_antisymm

src/topology/Top/adjunctions.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ namespace Top
1515
def adj₁ : discrete ⊣ forget :=
1616
{ hom_equiv := λ X Y,
1717
{ to_fun := λ f, f,
18-
inv_fun := λ f, ⟨f, continuous_top⟩,
18+
inv_fun := λ f, ⟨f, continuous_bot⟩,
1919
left_inv := by tidy,
2020
right_inv := by tidy },
2121
unit := { app := λ X, id },
22-
counit := { app := λ X, ⟨id, continuous_top⟩ } }
22+
counit := { app := λ X, ⟨id, continuous_bot⟩ } }
2323

2424
def adj₂ : forget ⊣ trivial :=
2525
{ hom_equiv := λ X Y,
26-
{ to_fun := λ f, ⟨f, continuous_bot⟩,
26+
{ to_fun := λ f, ⟨f, continuous_top⟩,
2727
inv_fun := λ f, f,
2828
left_inv := by tidy,
2929
right_inv := by tidy },
30-
unit := { app := λ X, ⟨id, continuous_bot⟩ },
30+
unit := { app := λ X, ⟨id, continuous_top⟩ },
3131
counit := { app := λ X, id } }
3232

3333
end Top

src/topology/Top/basic.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ def of (X : Type u) [topological_space X] : Top := ⟨X⟩
2424
abbreviation forget : Top.{u} ⥤ Type u := forget
2525

2626
def discrete : Type u ⥤ Top.{u} :=
27-
{ obj := λ X, ⟨X, ⊤⟩,
28-
map := λ X Y f, ⟨f, continuous_top⟩ }
29-
30-
def trivial : Type u ⥤ Top.{u} :=
3127
{ obj := λ X, ⟨X, ⊥⟩,
3228
map := λ X Y f, ⟨f, continuous_bot⟩ }
3329

30+
def trivial : Type u ⥤ Top.{u} :=
31+
{ obj := λ X, ⟨X, ⊤⟩,
32+
map := λ X Y f, ⟨f, continuous_top⟩ }
33+
3434
end Top

src/topology/Top/limits.lean

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ namespace Top
1717
variables {J : Type u} [small_category J]
1818

1919
def limit (F : J ⥤ Top.{u}) : cone F :=
20-
{ X := ⟨limit (F ⋙ forget), j, (F.obj j).str.induced (limit.π (F ⋙ forget) j)⟩,
20+
{ X := ⟨limit (F ⋙ forget), j, (F.obj j).str.induced (limit.π (F ⋙ forget) j)⟩,
2121
π :=
22-
{ app := λ j, ⟨limit.π (F ⋙ forget) j, continuous_iff_induced_le.mpr (lattice.le_supr _ j)⟩,
22+
{ app := λ j, ⟨limit.π (F ⋙ forget) j, continuous_iff_le_induced.mpr (lattice.infi_le _ _)⟩,
2323
naturality' := λ j j' f, subtype.eq ((limit.cone (F ⋙ forget)).π.naturality f) } }
2424

2525
def limit_is_limit (F : J ⥤ Top.{u}) : is_limit (limit F) :=
26-
by refine is_limit.of_faithful forget (limit.is_limit _) (λ s, ⟨_, _⟩) (λ s, rfl);
27-
exact continuous_iff_le_coinduced.mpr (lattice.supr_le $ λ j,
28-
induced_le_iff_le_coinduced.mpr $ continuous_iff_le_coinduced.mp (s.π.app j).property)
26+
by { refine is_limit.of_faithful forget (limit.is_limit _) (λ s, ⟨_, _⟩) (λ s, rfl),
27+
exact continuous_iff_coinduced_le.mpr (lattice.le_infi $ λ j,
28+
coinduced_le_iff_le_induced.mp $ continuous_iff_coinduced_le.mp (s.π.app j).property) }
2929

3030
instance Top_has_limits : has_limits.{u} Top.{u} :=
3131
{ has_limits_of_shape := λ J 𝒥,
@@ -38,15 +38,15 @@ instance forget_preserves_limits : preserves_limits (forget : Top.{u} ⥤ Type u
3838
(limit.is_limit F) (limit.is_limit (F ⋙ forget)) } }
3939

4040
def colimit (F : J ⥤ Top.{u}) : cocone F :=
41-
{ X := ⟨colimit (F ⋙ forget), j, (F.obj j).str.coinduced (colimit.ι (F ⋙ forget) j)⟩,
41+
{ X := ⟨colimit (F ⋙ forget), j, (F.obj j).str.coinduced (colimit.ι (F ⋙ forget) j)⟩,
4242
ι :=
43-
{ app := λ j, ⟨colimit.ι (F ⋙ forget) j, continuous_iff_le_coinduced.mpr (lattice.infi_le _ j)⟩,
43+
{ app := λ j, ⟨colimit.ι (F ⋙ forget) j, continuous_iff_coinduced_le.mpr (lattice.le_supr _ j)⟩,
4444
naturality' := λ j j' f, subtype.eq ((colimit.cocone (F ⋙ forget)).ι.naturality f) } }
4545

4646
def colimit_is_colimit (F : J ⥤ Top.{u}) : is_colimit (colimit F) :=
47-
by refine is_colimit.of_faithful forget (colimit.is_colimit _) (λ s, ⟨_, _⟩) (λ s, rfl);
48-
exact continuous_iff_induced_le.mpr (lattice.le_infi $ λ j,
49-
induced_le_iff_le_coinduced.mpr $ continuous_iff_le_coinduced.mp (s.ι.app j).property)
47+
by { refine is_colimit.of_faithful forget (colimit.is_colimit _) (λ s, ⟨_, _⟩) (λ s, rfl),
48+
exact continuous_iff_le_induced.mpr (lattice.supr_le $ λ j,
49+
coinduced_le_iff_le_induced.mp $ continuous_iff_coinduced_le.mp (s.ι.app j).property) }
5050

5151
instance Top_has_colimits : has_colimits.{u} Top.{u} :=
5252
{ has_colimits_of_shape := λ J 𝒥,

src/topology/algebra/ordered.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,14 @@ begin
271271
letI := induced f ta,
272272
refine ⟨eq_of_nhds_eq_nhds (λ a, _)⟩,
273273
rw [nhds_induced_eq_comap, nhds_generate_from, @nhds_eq_orderable β _ _], apply le_antisymm,
274+
{ refine le_infi (λ s, le_infi $ λ hs, le_principal_iff.2 _),
275+
rcases hs with ⟨ab, b, rfl|rfl⟩,
276+
{ exact mem_comap_sets.2 ⟨{x | f b < x},
277+
mem_inf_sets_of_left $ mem_infi_sets _ $ mem_infi_sets (hf.2 ab) $ mem_principal_self _,
278+
λ x, hf.1⟩ },
279+
{ exact mem_comap_sets.2 ⟨{x | x < f b},
280+
mem_inf_sets_of_right $ mem_infi_sets _ $ mem_infi_sets (hf.2 ab) $ mem_principal_self _,
281+
λ x, hf.1⟩ } },
274282
{ rw [← map_le_iff_le_comap],
275283
refine le_inf _ _; refine le_infi (λ x, le_infi $ λ h, le_principal_iff.2 _); simp,
276284
{ rcases H₁ h with ⟨b, ab, xb⟩,
@@ -279,14 +287,6 @@ begin
279287
{ rcases H₂ h with ⟨b, ab, xb⟩,
280288
refine mem_infi_sets _ (mem_infi_sets ⟨ab, b, or.inr rfl⟩ (mem_principal_sets.2 _)),
281289
exact λ c hc, lt_of_lt_of_le (hf.2 hc) xb } },
282-
refine le_infi (λ s, le_infi $ λ hs, le_principal_iff.2 _),
283-
rcases hs with ⟨ab, b, rfl|rfl⟩,
284-
{ exact mem_comap_sets.2 ⟨{x | f b < x},
285-
mem_inf_sets_of_left $ mem_infi_sets _ $ mem_infi_sets (hf.2 ab) $ mem_principal_self _,
286-
λ x, hf.1⟩ },
287-
{ exact mem_comap_sets.2 ⟨{x | x < f b},
288-
mem_inf_sets_of_right $ mem_infi_sets _ $ mem_infi_sets (hf.2 ab) $ mem_principal_self _,
289-
λ x, hf.1⟩ }
290290
end
291291

292292
theorem induced_orderable_topology {α : Type u} {β : Type v}

src/topology/bases.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ let b' := (λf, ⋂₀ f) '' {f:set (set α) | finite f ∧ f ⊆ s ∧ ⋂₀ f
4040
by rw sInter_empty; exact nonempty_iff_univ_ne_empty.1 ⟨a⟩⟩, sInter_empty⟩, mem_univ _⟩,
4141
have generate_from s = generate_from b',
4242
from le_antisymm
43-
(generate_from_le $ assume s hs,
43+
(le_generate_from $ assume u ⟨t, ⟨hft, htb, ne⟩, eq⟩,
44+
eq ▸ @is_open_sInter _ (generate_from s) _ hft (assume s hs, generate_open.basic _ $ htb hs))
45+
(le_generate_from $ assume s hs,
4446
by_cases
4547
(assume : s = ∅, by rw [this]; apply @is_open_empty _ _)
4648
(assume : s ≠ ∅, generate_open.basic _ ⟨{s}, ⟨finite_singleton s, singleton_subset_iff.2 hs,
47-
by rwa [sInter_singleton]⟩, sInter_singleton s⟩))
48-
(generate_from_le $ assume u ⟨t, ⟨hft, htb, ne⟩, eq⟩,
49-
eq ▸ @is_open_sInter _ (generate_from s) _ hft (assume s hs, generate_open.basic _ $ htb hs)),
49+
by rwa [sInter_singleton]⟩, sInter_singleton s⟩)),
5050
this ▸ hs⟩
5151

5252
lemma is_topological_basis_of_open_of_nhds {s : set (set α)}
@@ -60,11 +60,11 @@ lemma is_topological_basis_of_open_of_nhds {s : set (set α)}
6060
let ⟨u, h₁, h₂, _⟩ := h_nhds a univ trivial (is_open_univ _) in
6161
⟨u, h₁, h₂⟩,
6262
le_antisymm
63+
(le_generate_from h_open)
6364
(assume u hu,
6465
(@is_open_iff_nhds α (generate_from _) _).mpr $ assume a hau,
6566
let ⟨v, hvs, hav, hvu⟩ := h_nhds a u hau hu in
66-
by rw nhds_generate_from; exact infi_le_of_le v (infi_le_of_le ⟨hav, hvs⟩ $ le_principal_iff.2 hvu))
67-
(generate_from_le h_open)⟩
67+
by rw nhds_generate_from; exact infi_le_of_le v (infi_le_of_le ⟨hav, hvs⟩ $ le_principal_iff.2 hvu))⟩
6868

6969
lemma mem_nhds_of_is_topological_basis {a : α} {s : set α} {b : set (set α)}
7070
(hb : is_topological_basis b) : s ∈ nhds a ↔ ∃t∈b, a ∈ t ∧ t ⊆ s :=

0 commit comments

Comments
 (0)