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

Commit 697c8dd

Browse files
committed
refactor(topology/basic): use dot notation in is_open.union and friends (#7647)
The fact that the union of two open sets is open is called `is_open_union`. We rename it to `is_open.union` to enable dot notation. Same with `is_open_inter`, `is_closed_union` and `is_closed_inter` and `is_clopen_union` and `is_clopen_inter` and `is_clopen_diff`.
1 parent c7a5197 commit 697c8dd

33 files changed

+99
-99
lines changed

src/analysis/calculus/extend_deriv.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ begin
6969
have bound : ∀ z ∈ (B ∩ s), ∥fderiv_within ℝ f (B ∩ s) z - f'∥ ≤ ε,
7070
{ intros z z_in,
7171
convert le_of_lt (hδ _ z_in.2 z_in.1),
72-
have op : is_open (B ∩ s) := is_open_inter is_open_ball s_open,
72+
have op : is_open (B ∩ s) := is_open_ball.inter s_open,
7373
rw differentiable_at.fderiv_within _ (op.unique_diff_on z z_in),
7474
exact (diff z z_in).differentiable_at (mem_nhds_sets op z_in) },
7575
simpa using conv.norm_image_sub_le_of_norm_fderiv_within_le' diff bound u_in v_in },

src/analysis/calculus/fderiv_measurable.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ begin
124124
end
125125

126126
lemma is_open_B {K : set (E →L[𝕜] F)} {r s ε : ℝ} : is_open (B f K r s ε) :=
127-
by simp [B, is_open_Union, is_open_inter, is_open_A]
127+
by simp [B, is_open_Union, is_open.inter, is_open_A]
128128

129129
lemma A_mono (L : E →L[𝕜] F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) :
130130
A f L r ε ⊆ A f L r δ :=

src/analysis/convex/topology.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ lemma bounded_std_simplex : metric.bounded (std_simplex ι) :=
6060

6161
/-- `std_simplex ι` is closed. -/
6262
lemma is_closed_std_simplex : is_closed (std_simplex ι) :=
63-
(std_simplex_eq_inter ι).symm ▸ is_closed_inter
63+
(std_simplex_eq_inter ι).symm ▸ is_closed.inter
6464
(is_closed_Inter $ λ i, is_closed_le continuous_const (continuous_apply i))
6565
(is_closed_eq (continuous_finset_sum _ $ λ x _, continuous_apply x) continuous_const)
6666

src/data/analysis/topology.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected def id : realizer α := ⟨{x:set α // is_open x},
126126
{ f := subtype.val,
127127
top := λ _, ⟨univ, is_open_univ⟩,
128128
top_mem := mem_univ,
129-
inter := λ ⟨x, h₁⟩ ⟨y, h₂⟩ a h₃, ⟨_, is_open_inter h₁ h₂⟩,
129+
inter := λ ⟨x, h₁⟩ ⟨y, h₂⟩ a h₃, ⟨_, h₁.inter h₂⟩,
130130
inter_mem := λ ⟨x, h₁⟩ ⟨y, h₂⟩ a, id,
131131
inter_sub := λ ⟨x, h₁⟩ ⟨y, h₂⟩ a h₃, subset.refl _ },
132132
ext subtype.property $ λ x s h,

src/geometry/manifold/bump_function.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ begin
234234
rw f.image_eq_inter_preimage_of_subset_support hs,
235235
refine continuous_on.preimage_closed_of_closed
236236
((ext_chart_continuous_on_symm _ _).mono f.closed_ball_subset) _ hsc,
237-
exact is_closed_inter is_closed_closed_ball I.closed_range
237+
exact is_closed.inter is_closed_closed_ball I.closed_range
238238
end
239239

240240
/-- If `f` is a smooth bump function and `s` closed subset of the support of `f` (i.e., of the open
@@ -406,7 +406,7 @@ instance : has_coe_to_fun (smooth_bump_covering I s) := ⟨_, to_fun⟩
406406
(h₁ h₂ h₃) : ⇑(mk ι c to_fun h₁ h₂ h₃ : smooth_bump_covering I s) = to_fun :=
407407
rfl
408408

409-
/--
409+
/--
410410
We say that `f : smooth_bump_covering I s` is *subordinate* to a map `U : M → set M` if for each
411411
index `i`, we have `closure (support (f i)) ⊆ U (f i).c`. This notion is a bit more general than
412412
being subordinate to an open covering of `M`, because we make no assumption about the way `U x`

src/geometry/manifold/charted_space.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def id_restr_groupoid : structure_groupoid H :=
382382
{ members := {e | ∃ {s : set H} (h : is_open s), e ≈ local_homeomorph.of_set s h},
383383
trans' := begin
384384
rintros e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩,
385-
refine ⟨s ∩ s', is_open_inter hs hs', _⟩,
385+
refine ⟨s ∩ s', is_open.inter hs hs', _⟩,
386386
have := local_homeomorph.eq_on_source.trans' hse hse',
387387
rwa local_homeomorph.of_set_trans_of_set at this,
388388
end,
@@ -417,7 +417,7 @@ instance closed_under_restriction_id_restr_groupoid :
417417
closed_under_restriction (@id_restr_groupoid H _) :=
418418
begin
419419
rintros e ⟨s', hs', he⟩ s hs,
420-
use [s' ∩ s, is_open_inter hs' hs],
420+
use [s' ∩ s, is_open.inter hs' hs],
421421
refine setoid.trans (local_homeomorph.eq_on_source.restr he s) _,
422422
exact ⟨by simp only [hs.interior_eq] with mfld_simps, by simp only with mfld_simps⟩,
423423
end

src/geometry/manifold/local_invariant_properties.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ begin
140140
∃ (o : set M), is_open o ∧ x ∈ o ∧ o ⊆ e.source ∧ o ⊆ e'.source ∧
141141
o ∩ s ⊆ g ⁻¹' f.source ∧ o ∩ s ⊆ g⁻¹' f'.to_local_equiv.source,
142142
{ have : f.source ∩ f'.source ∈ 𝓝 (g x) :=
143-
mem_nhds_sets (is_open_inter f.open_source f'.open_source) ⟨xf, xf'⟩,
143+
mem_nhds_sets (is_open.inter f.open_source f'.open_source) ⟨xf, xf'⟩,
144144
rcases mem_nhds_within.1 (hgs.preimage_mem_nhds_within this) with ⟨u, u_open, xu, hu⟩,
145145
refine ⟨u ∩ e.source ∩ e'.source, _, ⟨⟨xu, xe⟩, xe'⟩, _, _, _, _⟩,
146-
{ exact is_open_inter (is_open_inter u_open e.open_source) e'.open_source },
146+
{ exact is_open.inter (is_open.inter u_open e.open_source) e'.open_source },
147147
{ assume x hx, exact hx.1.2 },
148148
{ assume x hx, exact hx.2 },
149149
{ assume x hx, exact (hu ⟨hx.1.1.1, hx.2⟩).1 },
@@ -199,7 +199,7 @@ begin
199199
simp only [this, hy] with mfld_simps } },
200200
rw this at E,
201201
apply (hG.is_local _ _).2 E,
202-
{ exact is_open_inter w.open_target
202+
{ exact is_open.inter w.open_target
203203
(e'.continuous_on_symm.preimage_open_of_open e'.open_target o_open) },
204204
{ simp only [xe', xe, xo] with mfld_simps },
205205
end
@@ -245,7 +245,7 @@ begin
245245
mem_nhds_sets ((chart_at H' (g x))).open_source (mem_chart_source H' (g x)),
246246
rcases mem_nhds_within.1 (hcont.preimage_mem_nhds_within this) with ⟨v, v_open, xv, hv⟩,
247247
refine ⟨u ∩ v ∩ (chart_at H x).source, _, ⟨⟨xu, xv⟩, mem_chart_source _ _⟩, _, _, _⟩,
248-
{ exact is_open_inter (is_open_inter u_open v_open) (chart_at H x).open_source },
248+
{ exact is_open.inter (is_open.inter u_open v_open) (chart_at H x).open_source },
249249
{ assume y hy, exact hy.2 },
250250
{ assume y hy, exact hv ⟨hy.1.1.2, hy.2⟩ },
251251
{ assume y hy, exact ust ⟨hy.1.1.1, hy.2⟩ } },

src/geometry/manifold/times_cont_mdiff.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ begin
634634
mem_nhds_sets (local_homeomorph.open_source _) (mem_chart_source H' (f x)),
635635
rcases mem_nhds_within.1 (h.1.preimage_mem_nhds_within this) with ⟨u, u_open, xu, hu⟩,
636636
refine ⟨u ∩ (chart_at H x).source, _, ⟨xu, mem_chart_source _ _⟩, _, _⟩,
637-
{ exact is_open_inter u_open (local_homeomorph.open_source _) },
637+
{ exact is_open.inter u_open (local_homeomorph.open_source _) },
638638
{ assume y hy, exact hy.2 },
639639
{ assume y hy, exact hu ⟨hy.1.1, hy.2⟩ } },
640640
have h' : times_cont_mdiff_within_at I I' n f (s ∩ o) x := h.mono (inter_subset_left _ _),
@@ -1181,7 +1181,7 @@ begin
11811181
suffices h : times_cont_mdiff_on I.tangent I'.tangent m (tangent_map_within I I' f s) s'_lift,
11821182
{ refine ⟨(tangent_bundle.proj I M)⁻¹' (o ∩ l.source), _, _, _⟩,
11831183
show is_open ((tangent_bundle.proj I M)⁻¹' (o ∩ l.source)), from
1184-
(is_open_inter o_open l.open_source).preimage (tangent_bundle_proj_continuous _ _) ,
1184+
(is_open.inter o_open l.open_source).preimage (tangent_bundle_proj_continuous _ _) ,
11851185
show p ∈ tangent_bundle.proj I M ⁻¹' (o ∩ l.source),
11861186
{ simp [tangent_bundle.proj] at ⊢,
11871187
have : p.1 ∈ f ⁻¹' r.source ∩ s, by simp [hp],

src/measure_theory/borel_space.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ lemma topological_space.is_topological_basis.borel_eq_generate_from [topological
9292
borel_eq_generate_from_of_subbasis hs.eq_generate_from
9393

9494
lemma is_pi_system_is_open [topological_space α] : is_pi_system (is_open : set α → Prop) :=
95-
λ s t hs ht hst, is_open_inter hs ht
95+
λ s t hs ht hst, is_open.inter hs ht
9696

9797
lemma borel_eq_generate_from_is_closed [topological_space α] :
9898
borel α = generate_from {s | is_closed s} :=

src/measure_theory/content.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,14 @@ begin
319319
intros U hU,
320320
rw μ.outer_measure_caratheodory,
321321
intro U',
322-
rw μ.outer_measure_of_is_open ((U' : set G) ∩ U) (is_open_inter U'.prop hU),
322+
rw μ.outer_measure_of_is_open ((U' : set G) ∩ U) (is_open.inter U'.prop hU),
323323
simp only [inner_content, supr_subtype'], rw [opens.coe_mk],
324324
haveI : nonempty {L : compacts G // L.1 ⊆ U' ∩ U} := ⟨⟨⊥, empty_subset _⟩⟩,
325325
rw [ennreal.supr_add],
326326
refine supr_le _, rintro ⟨L, hL⟩, simp only [subset_inter_iff] at hL,
327327
have : ↑U' \ U ⊆ U' \ L.1 := diff_subset_diff_right hL.2,
328328
refine le_trans (add_le_add_left (μ.outer_measure.mono' this) _) _,
329-
rw μ.outer_measure_of_is_open (↑U' \ L.1) (is_open_diff U'.2 L.2.is_closed),
329+
rw μ.outer_measure_of_is_open (↑U' \ L.1) (is_open.sdiff U'.2 L.2.is_closed),
330330
simp only [inner_content, supr_subtype'], rw [opens.coe_mk],
331331
haveI : nonempty {M : compacts G // M.1 ⊆ ↑U' \ L.1} := ⟨⟨⊥, empty_subset _⟩⟩,
332332
rw [ennreal.add_supr], refine supr_le _, rintro ⟨M, hM⟩, simp only [subset_diff] at hM,

0 commit comments

Comments
 (0)