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

Commit a803e21

Browse files
RemyDegenneurkud
andcommitted
feat(measure_theory/lattice): define typeclasses for measurability of lattice operations, define a lattice on ae_eq_fun (#10591)
As was previously done for measurability of arithmetic operations, I define typeclasses for the measurability of sup and inf in a lattice. In the borel_space file, instances of these are provided when the lattice operations are continuous. Finally I've put a lattice structure on `ae_eq_fun`. Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
1 parent ae7a88d commit a803e21

File tree

5 files changed

+327
-14
lines changed

5 files changed

+327
-14
lines changed

src/analysis/normed_space/lattice_ordered_group.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ begin
147147
simp,
148148
end
149149

150+
@[priority 100] -- see Note [lower instance priority]
151+
instance normed_lattice_add_comm_group_has_continuous_sup {α : Type*}
152+
[normed_lattice_add_comm_group α] :
153+
has_continuous_sup α :=
154+
order_dual.has_continuous_sup (order_dual α)
155+
150156
/--
151157
Let `α` be a normed lattice ordered group. Then `α` is a topological lattice in the norm topology.
152158
-/

src/measure_theory/constructions/borel_space.lean

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import measure_theory.function.ae_measurable_sequence
77
import analysis.complex.basic
88
import analysis.normed_space.finite_dimension
99
import measure_theory.group.arithmetic
10+
import measure_theory.lattice
1011
import topology.algebra.ordered.liminf_limsup
1112
import topology.continuous_function.basic
1213
import topology.instances.ereal
1314
import topology.G_delta
1415
import topology.semicontinuous
16+
import topology.order.lattice
1517

1618
/-!
1719
# Borel (measurable) space
@@ -167,6 +169,18 @@ the `σ`-algebra of measurable sets is exactly the `σ`-algebra generated by ope
167169
class borel_space (α : Type*) [topological_space α] [measurable_space α] : Prop :=
168170
(measurable_eq : ‹measurable_space α› = borel α)
169171

172+
@[priority 100]
173+
instance order_dual.opens_measurable_space {α : Type*} [topological_space α] [measurable_space α]
174+
[h : opens_measurable_space α] :
175+
opens_measurable_space (order_dual α) :=
176+
{ borel_le := h.borel_le }
177+
178+
@[priority 100]
179+
instance order_dual.borel_space {α : Type*} [topological_space α] [measurable_space α]
180+
[h : borel_space α] :
181+
borel_space (order_dual α) :=
182+
{ measurable_eq := h.measurable_eq }
183+
170184
/-- In a `borel_space` all open sets are measurable. -/
171185
@[priority 100]
172186
instance borel_space.opens_measurable {α : Type*} [topological_space α] [measurable_space α]
@@ -705,6 +719,34 @@ instance has_continuous_smul.has_measurable_smul {M α} [topological_space M]
705719
⟨λ c, (continuous_const.smul continuous_id).measurable,
706720
λ y, (continuous_id.smul continuous_const).measurable⟩
707721

722+
section lattice
723+
724+
@[priority 100]
725+
instance has_continuous_sup.has_measurable_sup [has_sup γ] [has_continuous_sup γ] :
726+
has_measurable_sup γ :=
727+
{ measurable_const_sup := λ c, (continuous_const.sup continuous_id).measurable,
728+
measurable_sup_const := λ c, (continuous_id.sup continuous_const).measurable }
729+
730+
@[priority 100]
731+
instance has_continuous_sup.has_measurable_sup₂ [second_countable_topology γ] [has_sup γ]
732+
[has_continuous_sup γ] :
733+
has_measurable_sup₂ γ :=
734+
⟨continuous_sup.measurable⟩
735+
736+
@[priority 100]
737+
instance has_continuous_inf.has_measurable_inf [has_inf γ] [has_continuous_inf γ] :
738+
has_measurable_inf γ :=
739+
{ measurable_const_inf := λ c, (continuous_const.inf continuous_id).measurable,
740+
measurable_inf_const := λ c, (continuous_id.inf continuous_const).measurable }
741+
742+
@[priority 100]
743+
instance has_continuous_inf.has_measurable_inf₂ [second_countable_topology γ] [has_inf γ]
744+
[has_continuous_inf γ] :
745+
has_measurable_inf₂ γ :=
746+
⟨continuous_inf.measurable⟩
747+
748+
end lattice
749+
708750
section homeomorph
709751

710752
@[measurability] protected lemma homeomorph.measurable (h : α ≃ₜ γ) : measurable h :=

src/measure_theory/function/ae_eq_fun.lean

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,68 @@ lift_rel_iff_coe_fn.symm
277277
instance [partial_order β] : partial_order (α →ₘ[μ] β) :=
278278
partial_order.lift to_germ to_germ_injective
279279

280-
/- TODO: Prove `L⁰` space is a lattice if β is linear order.
281-
What if β is only a lattice? -/
280+
section lattice
282281

283-
-- instance [linear_order β] : semilattice_sup (α →ₘ β) :=
284-
-- { sup := comp₂ (⊔) (_),
285-
-- .. ae_eq_fun.partial_order }
282+
section sup
283+
variables [semilattice_sup β] [has_measurable_sup₂ β]
284+
285+
instance : has_sup (α →ₘ[μ] β) := { sup := λ f g, ae_eq_fun.comp₂ (⊔) measurable_sup f g }
286+
287+
lemma coe_fn_sup (f g : α →ₘ[μ] β) : ⇑(f ⊔ g) =ᵐ[μ] λ x, f x ⊔ g x := coe_fn_comp₂ _ _ _ _
288+
289+
protected lemma le_sup_left (f g : α →ₘ[μ] β) : f ≤ f ⊔ g :=
290+
by { rw ← coe_fn_le, filter_upwards [coe_fn_sup f g], intros a ha, rw ha, exact le_sup_left, }
291+
292+
protected lemma le_sup_right (f g : α →ₘ[μ] β) : g ≤ f ⊔ g :=
293+
by { rw ← coe_fn_le, filter_upwards [coe_fn_sup f g], intros a ha, rw ha, exact le_sup_right, }
294+
295+
protected lemma sup_le (f g f' : α →ₘ[μ] β) (hf : f ≤ f') (hg : g ≤ f') : f ⊔ g ≤ f' :=
296+
begin
297+
rw ← coe_fn_le at hf hg ⊢,
298+
filter_upwards [hf, hg, coe_fn_sup f g],
299+
intros a haf hag ha_sup,
300+
rw ha_sup,
301+
exact sup_le haf hag,
302+
end
303+
304+
end sup
305+
306+
section inf
307+
variables [semilattice_inf β] [has_measurable_inf₂ β]
308+
309+
instance : has_inf (α →ₘ[μ] β) := { inf := λ f g, ae_eq_fun.comp₂ (⊓) measurable_inf f g }
310+
311+
lemma coe_fn_inf (f g : α →ₘ[μ] β) : ⇑(f ⊓ g) =ᵐ[μ] λ x, f x ⊓ g x := coe_fn_comp₂ _ _ _ _
312+
313+
protected lemma inf_le_left (f g : α →ₘ[μ] β) : f ⊓ g ≤ f :=
314+
by { rw ← coe_fn_le, filter_upwards [coe_fn_inf f g], intros a ha, rw ha, exact inf_le_left, }
315+
316+
protected lemma inf_le_right (f g : α →ₘ[μ] β) : f ⊓ g ≤ g :=
317+
by { rw ← coe_fn_le, filter_upwards [coe_fn_inf f g], intros a ha, rw ha, exact inf_le_right, }
318+
319+
protected lemma le_inf (f' f g : α →ₘ[μ] β) (hf : f' ≤ f) (hg : f' ≤ g) : f' ≤ f ⊓ g :=
320+
begin
321+
rw ← coe_fn_le at hf hg ⊢,
322+
filter_upwards [hf, hg, coe_fn_inf f g],
323+
intros a haf hag ha_inf,
324+
rw ha_inf,
325+
exact le_inf haf hag,
326+
end
327+
328+
end inf
329+
330+
instance [lattice β] [has_measurable_sup₂ β] [has_measurable_inf₂ β] : lattice (α →ₘ[μ] β) :=
331+
{ sup := has_sup.sup,
332+
le_sup_left := ae_eq_fun.le_sup_left,
333+
le_sup_right := ae_eq_fun.le_sup_right,
334+
sup_le := ae_eq_fun.sup_le,
335+
inf := has_inf.inf,
336+
inf_le_left := ae_eq_fun.inf_le_left,
337+
inf_le_right := ae_eq_fun.inf_le_right,
338+
le_inf := ae_eq_fun.le_inf,
339+
..ae_eq_fun.partial_order}
340+
341+
end lattice
286342

287343
end order
288344

src/measure_theory/lattice.lean

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
/-
2+
Copyright (c) 2021 Rémy Degenne. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Rémy Degenne
5+
-/
6+
7+
import measure_theory.measure.measure_space
8+
9+
/-!
10+
# Typeclasses for measurability of lattice operations
11+
12+
In this file we define classes `has_measurable_sup` and `has_measurable_inf` and prove dot-style
13+
lemmas (`measurable.sup`, `ae_measurable.sup` etc). For binary operations we define two typeclasses:
14+
15+
- `has_measurable_sup` says that both left and right sup are measurable;
16+
- `has_measurable_sup₂` says that `λ p : α × α, p.1 ⊔ p.2` is measurable,
17+
18+
and similarly for other binary operations. The reason for introducing these classes is that in case
19+
of topological space `α` equipped with the Borel `σ`-algebra, instances for `has_measurable_sup₂`
20+
etc require `α` to have a second countable topology.
21+
22+
For instances relating, e.g., `has_continuous_sup` to `has_measurable_sup` see file
23+
`measure_theory.borel_space`.
24+
25+
## Tags
26+
27+
measurable function, lattice operation
28+
29+
-/
30+
31+
open measure_theory
32+
33+
/-- We say that a type `has_measurable_sup` if `((⊔) c)` and `(⊔ c)` are measurable functions.
34+
For a typeclass assuming measurability of `uncurry (⊔)` see `has_measurable_sup₂`. -/
35+
class has_measurable_sup (M : Type*) [measurable_space M] [has_sup M] : Prop :=
36+
(measurable_const_sup : ∀ c : M, measurable ((⊔) c))
37+
(measurable_sup_const : ∀ c : M, measurable (⊔ c))
38+
39+
/-- We say that a type `has_measurable_sup₂` if `uncurry (⊔)` is a measurable functions.
40+
For a typeclass assuming measurability of `((⊔) c)` and `(⊔ c)` see `has_measurable_sup`. -/
41+
class has_measurable_sup₂ (M : Type*) [measurable_space M] [has_sup M] : Prop :=
42+
(measurable_sup : measurable (λ p : M × M, p.1 ⊔ p.2))
43+
44+
export has_measurable_sup₂ (measurable_sup)
45+
has_measurable_sup (measurable_const_sup measurable_sup_const)
46+
47+
/-- We say that a type `has_measurable_inf` if `((⊓) c)` and `(⊓ c)` are measurable functions.
48+
For a typeclass assuming measurability of `uncurry (⊓)` see `has_measurable_inf₂`. -/
49+
class has_measurable_inf (M : Type*) [measurable_space M] [has_inf M] : Prop :=
50+
(measurable_const_inf : ∀ c : M, measurable ((⊓) c))
51+
(measurable_inf_const : ∀ c : M, measurable (⊓ c))
52+
53+
/-- We say that a type `has_measurable_inf₂` if `uncurry (⊔)` is a measurable functions.
54+
For a typeclass assuming measurability of `((⊔) c)` and `(⊔ c)` see `has_measurable_inf`. -/
55+
class has_measurable_inf₂ (M : Type*) [measurable_space M] [has_inf M] : Prop :=
56+
(measurable_inf : measurable (λ p : M × M, p.1 ⊓ p.2))
57+
58+
export has_measurable_inf₂ (measurable_inf)
59+
has_measurable_inf (measurable_const_inf measurable_inf_const)
60+
61+
variables {M : Type*} [measurable_space M]
62+
63+
section order_dual
64+
65+
@[priority 100]
66+
instance order_dual.has_measurable_sup [has_inf M] [has_measurable_inf M] :
67+
has_measurable_sup (order_dual M) :=
68+
⟨@measurable_const_inf M _ _ _, @measurable_inf_const M _ _ _⟩
69+
70+
@[priority 100]
71+
instance order_dual.has_measurable_inf [has_sup M] [has_measurable_sup M] :
72+
has_measurable_inf (order_dual M) :=
73+
⟨@measurable_const_sup M _ _ _, @measurable_sup_const M _ _ _⟩
74+
75+
@[priority 100]
76+
instance order_dual.has_measurable_sup₂ [has_inf M] [has_measurable_inf₂ M] :
77+
has_measurable_sup₂ (order_dual M) :=
78+
⟨@measurable_inf M _ _ _⟩
79+
80+
@[priority 100]
81+
instance order_dual.has_measurable_inf₂ [has_sup M] [has_measurable_sup₂ M] :
82+
has_measurable_inf₂ (order_dual M) :=
83+
⟨@measurable_sup M _ _ _⟩
84+
85+
end order_dual
86+
87+
variables {α : Type*} {m : measurable_space α} {μ : measure α} {f g : α → M}
88+
include m
89+
90+
section sup
91+
variables [has_sup M]
92+
93+
section measurable_sup
94+
variables [has_measurable_sup M]
95+
96+
@[measurability]
97+
lemma measurable.const_sup (hf : measurable f) (c : M) : measurable (λ x, c ⊔ f x) :=
98+
(measurable_const_sup c).comp hf
99+
100+
@[measurability]
101+
lemma ae_measurable.const_sup (hf : ae_measurable f μ) (c : M) : ae_measurable (λ x, c ⊔ f x) μ :=
102+
(has_measurable_sup.measurable_const_sup c).comp_ae_measurable hf
103+
104+
@[measurability]
105+
lemma measurable.sup_const (hf : measurable f) (c : M) : measurable (λ x, f x ⊔ c) :=
106+
(measurable_sup_const c).comp hf
107+
108+
@[measurability]
109+
lemma ae_measurable.sup_const (hf : ae_measurable f μ) (c : M) :
110+
ae_measurable (λ x, f x ⊔ c) μ :=
111+
(measurable_sup_const c).comp_ae_measurable hf
112+
113+
end measurable_sup
114+
115+
section measurable_sup₂
116+
variables [has_measurable_sup₂ M]
117+
118+
@[measurability]
119+
lemma measurable.sup' (hf : measurable f) (hg : measurable g) : measurable (f ⊔ g) :=
120+
measurable_sup.comp (hf.prod_mk hg)
121+
122+
@[measurability]
123+
lemma measurable.sup (hf : measurable f) (hg : measurable g) : measurable (λ a, f a ⊔ g a) :=
124+
measurable_sup.comp (hf.prod_mk hg)
125+
126+
@[measurability]
127+
lemma ae_measurable.sup' (hf : ae_measurable f μ) (hg : ae_measurable g μ) :
128+
ae_measurable (f ⊔ g) μ :=
129+
measurable_sup.comp_ae_measurable (hf.prod_mk hg)
130+
131+
@[measurability]
132+
lemma ae_measurable.sup (hf : ae_measurable f μ) (hg : ae_measurable g μ) :
133+
ae_measurable (λ a, f a ⊔ g a) μ :=
134+
measurable_sup.comp_ae_measurable (hf.prod_mk hg)
135+
136+
omit m
137+
@[priority 100]
138+
instance has_measurable_sup₂.to_has_measurable_sup : has_measurable_sup M :=
139+
⟨λ c, measurable_const.sup measurable_id, λ c, measurable_id.sup measurable_const⟩
140+
include m
141+
142+
end measurable_sup₂
143+
144+
end sup
145+
146+
section inf
147+
variables [has_inf M]
148+
149+
section measurable_inf
150+
variables [has_measurable_inf M]
151+
152+
@[measurability]
153+
lemma measurable.const_inf (hf : measurable f) (c : M) :
154+
measurable (λ x, c ⊓ f x) :=
155+
(measurable_const_inf c).comp hf
156+
157+
@[measurability]
158+
lemma ae_measurable.const_inf (hf : ae_measurable f μ) (c : M) :
159+
ae_measurable (λ x, c ⊓ f x) μ :=
160+
(has_measurable_inf.measurable_const_inf c).comp_ae_measurable hf
161+
162+
@[measurability]
163+
lemma measurable.inf_const (hf : measurable f) (c : M) :
164+
measurable (λ x, f x ⊓ c) :=
165+
(measurable_inf_const c).comp hf
166+
167+
@[measurability]
168+
lemma ae_measurable.inf_const (hf : ae_measurable f μ) (c : M) :
169+
ae_measurable (λ x, f x ⊓ c) μ :=
170+
(measurable_inf_const c).comp_ae_measurable hf
171+
172+
end measurable_inf
173+
174+
section measurable_inf₂
175+
variables [has_measurable_inf₂ M]
176+
177+
@[measurability]
178+
lemma measurable.inf' (hf : measurable f) (hg : measurable g) : measurable (f ⊓ g) :=
179+
measurable_inf.comp (hf.prod_mk hg)
180+
181+
@[measurability]
182+
lemma measurable.inf (hf : measurable f) (hg : measurable g) : measurable (λ a, f a ⊓ g a) :=
183+
measurable_inf.comp (hf.prod_mk hg)
184+
185+
@[measurability]
186+
lemma ae_measurable.inf' (hf : ae_measurable f μ) (hg : ae_measurable g μ) :
187+
ae_measurable (f ⊓ g) μ :=
188+
measurable_inf.comp_ae_measurable (hf.prod_mk hg)
189+
190+
@[measurability]
191+
lemma ae_measurable.inf (hf : ae_measurable f μ) (hg : ae_measurable g μ) :
192+
ae_measurable (λ a, f a ⊓ g a) μ :=
193+
measurable_inf.comp_ae_measurable (hf.prod_mk hg)
194+
195+
omit m
196+
@[priority 100]
197+
instance has_measurable_inf₂.to_has_measurable_inf : has_measurable_inf M :=
198+
⟨λ c, measurable_const.inf measurable_id, λ c, measurable_id.inf measurable_const⟩
199+
include m
200+
201+
end measurable_inf₂
202+
203+
end inf

src/topology/order/lattice.lean

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,17 @@ Let `L` be a topological space and let `L×L` be equipped with the product topol
3939
class has_continuous_sup (L : Type*) [topological_space L] [has_sup L] : Prop :=
4040
(continuous_sup : continuous (λ p : L × L, p.1 ⊔ p.2))
4141

42-
/--
43-
Let `L` be a topological space with a supremum. If the order dual has a continuous infimum then the
44-
supremum is continuous.
45-
-/
4642
@[priority 100] -- see Note [lower instance priority]
47-
instance has_continuous_inf_dual_has_continuous_sup
48-
(L : Type*) [topological_space L] [has_sup L] [h: has_continuous_inf (order_dual L)] :
49-
has_continuous_sup L :=
50-
{ continuous_sup :=
51-
@has_continuous_inf.continuous_inf (order_dual L) _ _ h }
43+
instance order_dual.has_continuous_sup
44+
(L : Type*) [topological_space L] [has_inf L] [has_continuous_inf L] :
45+
has_continuous_sup (order_dual L) :=
46+
{ continuous_sup := @has_continuous_inf.continuous_inf L _ _ _ }
47+
48+
@[priority 100] -- see Note [lower instance priority]
49+
instance order_dual.has_continuous_inf
50+
(L : Type*) [topological_space L] [has_sup L] [has_continuous_sup L] :
51+
has_continuous_inf (order_dual L) :=
52+
{ continuous_inf := @has_continuous_sup.continuous_sup L _ _ _ }
5253

5354
/--
5455
Let `L` be a lattice equipped with a topology such that `L` has continuous infimum and supremum.
@@ -57,6 +58,11 @@ Then `L` is said to be a *topological lattice*.
5758
class topological_lattice (L : Type*) [topological_space L] [lattice L]
5859
extends has_continuous_inf L, has_continuous_sup L
5960

61+
@[priority 100] -- see Note [lower instance priority]
62+
instance order_dual.topological_lattice
63+
(L : Type*) [topological_space L] [lattice L] [topological_lattice L] :
64+
topological_lattice (order_dual L) := {}
65+
6066
variables {L : Type*} [topological_space L]
6167
variables {X : Type*} [topological_space X]
6268

0 commit comments

Comments
 (0)