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

Commit b87c267

Browse files
feat(topology/algebra/group): add small topology lemma (#12931)
Adds a small topology lemma by splitting `compact_open_separated_mul` into `compact_open_separated_mul_left/right`, which was useful in my proof of `Steinhaus theorem` (see #12932), as in a non-abelian group, the current version was not sufficient. Co-authored-by: YaelDillies <yael.dillies@gmail.com>
1 parent 89c8112 commit b87c267

File tree

5 files changed

+169
-25
lines changed

5 files changed

+169
-25
lines changed

src/algebra/ring/opposite.lean

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,77 @@ instance [group_with_zero α] : group_with_zero αᵐᵒᵖ :=
8282

8383
end mul_opposite
8484

85+
namespace add_opposite
86+
87+
instance [distrib α] : distrib αᵃᵒᵖ :=
88+
{ left_distrib := λ x y z, unop_injective $ mul_add x _ _,
89+
right_distrib := λ x y z, unop_injective $ add_mul _ _ z,
90+
.. add_opposite.has_add α, .. @add_opposite.has_mul α _}
91+
92+
instance [mul_zero_class α] : mul_zero_class αᵃᵒᵖ :=
93+
{ zero := 0,
94+
mul := (*),
95+
zero_mul := λ x, unop_injective $ zero_mul $ unop x,
96+
mul_zero := λ x, unop_injective $ mul_zero $ unop x }
97+
98+
instance [mul_zero_one_class α] : mul_zero_one_class αᵃᵒᵖ :=
99+
{ .. add_opposite.mul_zero_class α, .. add_opposite.mul_one_class α }
100+
101+
instance [semigroup_with_zero α] : semigroup_with_zero αᵃᵒᵖ :=
102+
{ .. add_opposite.semigroup α, .. add_opposite.mul_zero_class α }
103+
104+
instance [monoid_with_zero α] : monoid_with_zero αᵃᵒᵖ :=
105+
{ .. add_opposite.monoid α, .. add_opposite.mul_zero_one_class α }
106+
107+
instance [non_unital_non_assoc_semiring α] : non_unital_non_assoc_semiring αᵃᵒᵖ :=
108+
{ .. add_opposite.add_comm_monoid α, .. add_opposite.mul_zero_class α, .. add_opposite.distrib α }
109+
110+
instance [non_unital_semiring α] : non_unital_semiring αᵃᵒᵖ :=
111+
{ .. add_opposite.semigroup_with_zero α, .. add_opposite.non_unital_non_assoc_semiring α }
112+
113+
instance [non_assoc_semiring α] : non_assoc_semiring αᵃᵒᵖ :=
114+
{ .. add_opposite.mul_zero_one_class α, .. add_opposite.non_unital_non_assoc_semiring α }
115+
116+
instance [semiring α] : semiring αᵃᵒᵖ :=
117+
{ .. add_opposite.non_unital_semiring α, .. add_opposite.non_assoc_semiring α,
118+
.. add_opposite.monoid_with_zero α }
119+
120+
instance [comm_semiring α] : comm_semiring αᵃᵒᵖ :=
121+
{ .. add_opposite.semiring α, .. add_opposite.comm_semigroup α }
122+
123+
instance [non_unital_non_assoc_ring α] : non_unital_non_assoc_ring αᵃᵒᵖ :=
124+
{ .. add_opposite.add_comm_group α, .. add_opposite.mul_zero_class α, .. add_opposite.distrib α}
125+
126+
instance [non_unital_ring α] : non_unital_ring αᵃᵒᵖ :=
127+
{ .. add_opposite.add_comm_group α, .. add_opposite.semigroup_with_zero α,
128+
.. add_opposite.distrib α}
129+
130+
instance [non_assoc_ring α] : non_assoc_ring αᵃᵒᵖ :=
131+
{ .. add_opposite.add_comm_group α, .. add_opposite.mul_zero_one_class α, .. add_opposite.distrib α}
132+
133+
instance [ring α] : ring αᵃᵒᵖ :=
134+
{ .. add_opposite.add_comm_group α, .. add_opposite.monoid α, .. add_opposite.semiring α }
135+
136+
instance [comm_ring α] : comm_ring αᵃᵒᵖ :=
137+
{ .. add_opposite.ring α, .. add_opposite.comm_semiring α }
138+
139+
instance [has_zero α] [has_mul α] [no_zero_divisors α] : no_zero_divisors αᵃᵒᵖ :=
140+
{ eq_zero_or_eq_zero_of_mul_eq_zero := λ x y (H : op (_ * _) = op (0:α)),
141+
or.imp (λ hx, unop_injective hx) (λ hy, unop_injective hy)
142+
((@eq_zero_or_eq_zero_of_mul_eq_zero α _ _ _ _ _) $ op_injective H) }
143+
144+
instance [ring α] [is_domain α] : is_domain αᵃᵒᵖ :=
145+
{ .. add_opposite.no_zero_divisors α, .. add_opposite.ring α, .. add_opposite.nontrivial α }
146+
147+
instance [group_with_zero α] : group_with_zero αᵃᵒᵖ :=
148+
{ mul_inv_cancel := λ x hx, unop_injective $ mul_inv_cancel $ unop_injective.ne hx,
149+
inv_zero := unop_injective inv_zero,
150+
.. add_opposite.monoid_with_zero α, .. add_opposite.div_inv_monoid α,
151+
.. add_opposite.nontrivial α }
152+
153+
154+
end add_opposite
155+
85156
open mul_opposite
86157

87158
/-- A ring homomorphism `f : R →+* S` such that `f x` commutes with `f y` for all `x, y` defines

src/data/set/pointwise.lean

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Authors: Johan Commelin, Floris van Doorn
55
-/
66
import algebra.module.basic
77
import data.set.finite
8+
import algebra.opposites
9+
import data.set.opposite
810
import group_theory.submonoid.basic
911

1012
/-!
@@ -355,6 +357,19 @@ begin
355357
exact mul_le_mul' (hbA hxa) (hbB hxb),
356358
end
357359

360+
open mul_opposite
361+
362+
@[to_additive]
363+
lemma image_op_mul {α : Type*} [has_mul α] {s t : set α} : op '' (s * t) = (op '' t) * (op '' s) :=
364+
begin
365+
ext x,
366+
split,
367+
{ rintro ⟨-, ⟨x, y, hx, hy, rfl⟩, rfl⟩,
368+
apply mul_mem_mul (mem_image_of_mem op hy) (mem_image_of_mem op hx) },
369+
{ rintro ⟨-, -, ⟨y, hy, rfl⟩, ⟨z, hz, rfl⟩, rfl⟩,
370+
refine ⟨z*y, mul_mem_mul hz hy, op_mul z y⟩ }
371+
end
372+
358373
end mul
359374

360375
open_locale pointwise

src/measure_theory/measure/haar.lean

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -417,28 +417,32 @@ begin
417417
rcases compact_compact_separated K₁.2 K₂.2 (disjoint_iff.mp h) with
418418
⟨U₁, U₂, h1U₁, h1U₂, h2U₁, h2U₂, hU⟩,
419419
rw [← disjoint_iff_inter_eq_empty] at hU,
420-
rcases compact_open_separated_mul K₁.2 h1U₁ h2U₁ with ⟨V₁, h1V₁, h2V₁, h3V₁⟩,
421-
rcases compact_open_separated_mul K₂.2 h1U₂ h2U₂ with ⟨V₂, h1V₂, h2V₂, h3V₂⟩,
420+
rcases compact_open_separated_mul_right K₁.2 h1U₁ h2U₁ with ⟨L₁, h1L₁, h2L₁⟩,
421+
rcases mem_nhds_iff.mp h1L₁ with ⟨V₁, h1V₁, h2V₁, h3V₁⟩,
422+
replace h2L₁ := subset.trans (mul_subset_mul_left h1V₁) h2L₁,
423+
rcases compact_open_separated_mul_right K₂.2 h1U₂ h2U₂ with ⟨L₂, h1L₂, h2L₂⟩,
424+
rcases mem_nhds_iff.mp h1L₂ with ⟨V₂, h1V₂, h2V₂, h3V₂⟩,
425+
replace h2L₂ := subset.trans (mul_subset_mul_left h1V₂) h2L₂,
422426
let eval : (compacts G → ℝ) → ℝ := λ f, f K₁ + f K₂ - f (K₁ ⊔ K₂),
423427
have : continuous eval :=
424428
((@continuous_add ℝ _ _ _).comp ((continuous_apply K₁).prod_mk (continuous_apply K₂))).sub
425429
(continuous_apply (K₁ ⊔ K₂)),
426430
rw [eq_comm, ← sub_eq_zero], show chaar K₀ ∈ eval ⁻¹' {(0 : ℝ)},
427431
let V := V₁ ∩ V₂,
428432
apply mem_of_subset_of_mem _ (chaar_mem_cl_prehaar K₀
429-
⟨V⁻¹, (is_open.inter h1V₁ h1V₂).preimage continuous_inv,
430-
by simp only [mem_inv, one_inv, h2V₁, h2V₂, V, mem_inter_eq, true_and]⟩),
433+
⟨V⁻¹, (is_open.inter h2V₁ h2V₂).preimage continuous_inv,
434+
by simp only [mem_inv, one_inv, h3V₁, h3V₂, V, mem_inter_eq, true_and]⟩),
431435
unfold cl_prehaar, rw is_closed.closure_subset_iff,
432436
{ rintro _ ⟨U, ⟨h1U, h2U, h3U⟩, rfl⟩,
433437
simp only [mem_preimage, eval, sub_eq_zero, mem_singleton_iff], rw [eq_comm],
434438
apply prehaar_sup_eq,
435439
{ rw h2U.interior_eq, exact ⟨1, h3U⟩ },
436440
{ refine disjoint_of_subset _ _ hU,
437-
{ refine subset.trans (mul_subset_mul subset.rfl _) h3V₁,
441+
{ refine subset.trans (mul_subset_mul subset.rfl _) h2L₁,
438442
exact subset.trans (inv_subset.mpr h1U) (inter_subset_left _ _) },
439-
{ refine subset.trans (mul_subset_mul subset.rfl _) h3V₂,
443+
{ refine subset.trans (mul_subset_mul subset.rfl _) h2L₂,
440444
exact subset.trans (inv_subset.mpr h1U) (inter_subset_right _ _) }}},
441-
{ apply continuous_iff_is_closed.mp this, exact is_closed_singleton },
445+
{ apply continuous_iff_is_closed.mp this, exact is_closed_singleton }
442446
end
443447

444448
@[to_additive is_left_invariant_add_chaar]

src/topology/algebra/group.lean

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import order.filter.pointwise
88
import topology.algebra.monoid
99
import topology.compact_open
1010
import topology.sets.compacts
11+
import topology.algebra.constructions
1112

1213
/-!
1314
# Theory of topological groups
@@ -464,6 +465,17 @@ instance pi.topological_group {C : β → Type*} [∀ b, topological_space (C b)
464465
[∀ b, group (C b)] [∀ b, topological_group (C b)] : topological_group (Π b, C b) :=
465466
{ continuous_inv := continuous_pi (λ i, (continuous_apply i).inv) }
466467

468+
open mul_opposite
469+
470+
@[to_additive]
471+
instance [group α] [has_continuous_inv α] : has_continuous_inv αᵐᵒᵖ :=
472+
{ continuous_inv := continuous_induced_rng $ (@continuous_inv α _ _ _).comp continuous_unop }
473+
474+
/-- If multiplication is continuous in `α`, then it also is in `αᵐᵒᵖ`. -/
475+
@[to_additive "If addition is continuous in `α`, then it also is in `αᵃᵒᵖ`."]
476+
instance [group α] [topological_group α] :
477+
topological_group αᵐᵒᵖ := { }
478+
467479
variable (G)
468480

469481
/-- Inversion in a topological group as a homeomorphism. -/
@@ -916,27 +928,43 @@ section
916928
variables [topological_space G] [group G] [topological_group G]
917929

918930
/-- Given a compact set `K` inside an open set `U`, there is a open neighborhood `V` of `1`
919-
such that `KV ⊆ U`. -/
931+
such that `K * V ⊆ U`. -/
920932
@[to_additive "Given a compact set `K` inside an open set `U`, there is a open neighborhood `V` of
921933
`0` such that `K + V ⊆ U`."]
922-
lemma compact_open_separated_mul {K U : set G} (hK : is_compact K) (hU : is_open U) (hKU : K ⊆ U) :
923-
∃ V : set G, is_open V ∧ (1 : G) ∈ V ∧ K * V ⊆ U :=
934+
lemma compact_open_separated_mul_right {K U : set G} (hK : is_compact K) (hU : is_open U)
935+
(hKU : K ⊆ U) : ∃ V ∈ 𝓝 (1 : G), K * V ⊆ U :=
936+
begin
937+
apply hK.induction_on,
938+
{ exact ⟨univ, by simp⟩ },
939+
{ rintros s t hst ⟨V, hV, hV'⟩,
940+
exact ⟨V, hV, (mul_subset_mul_right hst).trans hV'⟩ },
941+
{ rintros s t ⟨V, V_in, hV'⟩ ⟨W, W_in, hW'⟩,
942+
use [V ∩ W, inter_mem V_in W_in],
943+
rw union_mul,
944+
exact union_subset ((mul_subset_mul_left (V.inter_subset_left W)).trans hV')
945+
((mul_subset_mul_left (V.inter_subset_right W)).trans hW') },
946+
{ intros x hx,
947+
have := tendsto_mul (show U ∈ 𝓝 (x * 1), by simpa using hU.mem_nhds (hKU hx)),
948+
rw [nhds_prod_eq, mem_map, mem_prod_iff] at this,
949+
rcases this with ⟨t, ht, s, hs, h⟩,
950+
rw [← image_subset_iff, image_mul_prod] at h,
951+
exact ⟨t, mem_nhds_within_of_mem_nhds ht, s, hs, h⟩ }
952+
end
953+
954+
open mul_opposite
955+
956+
/-- Given a compact set `K` inside an open set `U`, there is a open neighborhood `V` of `1`
957+
such that `V * K ⊆ U`. -/
958+
@[to_additive "Given a compact set `K` inside an open set `U`, there is a open neighborhood `V` of
959+
`0` such that `V + K ⊆ U`."]
960+
lemma compact_open_separated_mul_left {K U : set G} (hK : is_compact K) (hU : is_open U)
961+
(hKU : K ⊆ U) : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U :=
924962
begin
925-
let W : G → set G := λ x, (λ y, x * y) ⁻¹' U,
926-
have h1W : ∀ x, is_open (W x) := λ x, hU.preimage (continuous_mul_left x),
927-
have h2W : ∀ x ∈ K, (1 : G) ∈ W x := λ x hx, by simp only [mem_preimage, mul_one, hKU hx],
928-
choose V hV using λ x : K, exists_open_nhds_one_mul_subset ((h1W x).mem_nhds (h2W x.1 x.2)),
929-
let X : K → set G := λ x, (λ y, (x : G)⁻¹ * y) ⁻¹' (V x),
930-
obtain ⟨t, ht⟩ : ∃ t : finset ↥K, K ⊆ ⋃ i ∈ t, X i,
931-
{ refine hK.elim_finite_subcover X (λ x, (hV x).1.preimage (continuous_mul_left x⁻¹)) _,
932-
intros x hx, rw [mem_Union], use ⟨x, hx⟩, rw [mem_preimage], convert (hV _).2.1,
933-
simp only [mul_left_inv, subtype.coe_mk] },
934-
refine ⟨⋂ x ∈ t, V x, is_open_bInter (finite_mem_finset _) (λ x hx, (hV x).1), _, _⟩,
935-
{ simp only [mem_Inter], intros x hx, exact (hV x).2.1 },
936-
rintro _ ⟨x, y, hx, hy, rfl⟩, simp only [mem_Inter] at hy,
937-
have := ht hx, simp only [mem_Union, mem_preimage] at this, rcases this with ⟨z, h1z, h2z⟩,
938-
have : (z : G)⁻¹ * x * y ∈ W z := (hV z).2.2 (mul_mem_mul h2z (hy z h1z)),
939-
rw [mem_preimage] at this, convert this using 1, simp only [mul_assoc, mul_inv_cancel_left]
963+
rcases compact_open_separated_mul_right (hK.image continuous_op) (op_homeomorph.is_open_map U hU)
964+
(image_subset op hKU) with ⟨V, (hV : V ∈ 𝓝 (op (1 : G))), hV' : op '' K * V ⊆ op '' U⟩,
965+
refine ⟨op ⁻¹' V, continuous_op.continuous_at hV, _⟩,
966+
rwa [← image_preimage_eq V op_surjective, ← image_op_mul, image_subset_iff,
967+
preimage_image_eq _ op_injective] at hV'
940968
end
941969

942970
/-- A compact set is covered by finitely many left multiplicative translates of a set

src/topology/algebra/ring.lean

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,32 @@ instance {β : Type*} {C : β → Type*} [∀ b, topological_space (C b)]
100100
[Π b, semiring (C b)] [Π b, topological_ring (C b)] : topological_ring (Π b, C b) := {}
101101
end
102102

103+
section mul_opposite
104+
open mul_opposite
105+
106+
instance [semiring α] [topological_space α] [has_continuous_add α] : has_continuous_add αᵐᵒᵖ :=
107+
{ continuous_add := continuous_induced_rng $ (@continuous_add α _ _ _).comp
108+
(continuous_unop.prod_map continuous_unop) }
109+
110+
instance [semiring α] [topological_space α] [topological_ring α] :
111+
topological_ring αᵐᵒᵖ := {}
112+
113+
end mul_opposite
114+
115+
section add_opposite
116+
open add_opposite
117+
118+
instance [semiring α] [topological_space α] [has_continuous_mul α] :
119+
has_continuous_mul αᵃᵒᵖ :=
120+
{ continuous_mul := by convert
121+
(continuous_op.comp $ (@continuous_mul α _ _ _).comp $ continuous_unop.prod_map continuous_unop) }
122+
123+
instance [semiring α] [topological_space α] [topological_ring α] :
124+
topological_ring αᵃᵒᵖ := {}
125+
126+
end add_opposite
127+
128+
103129
section
104130
variables {R : Type*} [ring R] [topological_space R]
105131

0 commit comments

Comments
 (0)