Skip to content

Commit 25fee2c

Browse files
committed
feat(Topology/UniformSpace): add isRefl_of_mem_uniformity (leanprover-community#32850)
This PR adds a lemma to directly obtain `U.IsRefl` for an entourage `U` of a uniform space.
1 parent c4c891f commit 25fee2c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

Mathlib/Dynamics/TopologicalEntropy/NetEntropy.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ theorem coverEntropyInf_eq_iSup_netEntropyInfEntourage :
333333
coverEntropyInf T F = ⨆ U ∈ 𝓤 X, netEntropyInfEntourage T F U := by
334334
apply le_antisymm <;> refine iSup₂_le fun U U_uni ↦ ?_
335335
· obtain ⟨V, V_uni, V_symm, V_U⟩ := comp_symm_mem_uniformity_sets U_uni
336-
have := SetRel.id_subset_iff.1 <| refl_le_uniformity V_uni
336+
have := isRefl_of_mem_uniformity V_uni
337337
apply (coverEntropyInfEntourage_antitone T F V_U).trans (le_iSup₂_of_le V V_uni _)
338338
exact coverEntropyInfEntourage_le_netEntropyInfEntourage T F
339339
· apply (netEntropyInfEntourage_antitone T F SetRel.symmetrize_subset_self).trans
@@ -349,7 +349,7 @@ theorem coverEntropy_eq_iSup_netEntropyEntourage :
349349
apply le_antisymm <;> refine iSup₂_le fun U U_uni ↦ ?_
350350
· obtain ⟨V, V_uni, V_symm, V_comp_U⟩ := comp_symm_mem_uniformity_sets U_uni
351351
apply (coverEntropyEntourage_antitone T F V_comp_U).trans (le_iSup₂_of_le V V_uni _)
352-
have := SetRel.id_subset_iff.1 <| refl_le_uniformity V_uni
352+
have := isRefl_of_mem_uniformity V_uni
353353
exact coverEntropyEntourage_le_netEntropyEntourage T F
354354
· apply (netEntropyEntourage_antitone T F SetRel.symmetrize_subset_self).trans
355355
apply (le_iSup₂ (SetRel.symmetrize U) (symmetrize_mem_uniformity U_uni)).trans'

Mathlib/Topology/UniformSpace/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ theorem eventually_uniformity_iterate_comp_subset {s : SetRel α α} (hs : s ∈
8585
rcases comp_mem_uniformity_sets hs with ⟨t, htU, hts⟩
8686
refine (ihn htU).mono fun U hU => ?_
8787
rw [Function.iterate_succ_apply']
88-
have : SetRel.IsRefl t := SetRel.id_subset_iff.1 <| refl_le_uniformity htU
88+
have := isRefl_of_mem_uniformity htU
8989
exact ⟨hU.1.trans <| SetRel.left_subset_comp.trans hts,
9090
(SetRel.comp_subset_comp hU.1 hU.2).trans hts⟩
9191

Mathlib/Topology/UniformSpace/Closeds.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected abbrev UniformSpace.hausdorff : UniformSpace (Set α) := .ofCore
102102
refl := by
103103
simp_rw [Filter.principal_le_lift', SetRel.id_subset_iff]
104104
intro (U : SetRel α α) hU
105-
have : U.IsRefl := ⟨fun _ => refl_mem_uniformity hU⟩
105+
have := isRefl_of_mem_uniformity hU
106106
exact isRefl_hausdorffEntourage U
107107
symm :=
108108
Filter.tendsto_lift'.mpr fun U hU => Filter.mem_of_superset

Mathlib/Topology/UniformSpace/Defs.lean

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,9 @@ instance uniformity.neBot [Nonempty α] : NeBot (𝓤 α) :=
470470
theorem refl_mem_uniformity {x : α} {s : SetRel α α} (h : s ∈ 𝓤 α) : (x, x) ∈ s :=
471471
refl_le_uniformity h rfl
472472

473+
theorem isRefl_of_mem_uniformity {s : SetRel α α} (h : s ∈ 𝓤 α) : s.IsRefl :=
474+
fun _ => refl_mem_uniformity h⟩
475+
473476
theorem mem_uniformity_of_eq {x y : α} {s : SetRel α α} (h : s ∈ 𝓤 α) (hx : x = y) : (x, y) ∈ s :=
474477
refl_le_uniformity h hx
475478

@@ -480,8 +483,8 @@ theorem comp_le_uniformity : ((𝓤 α).lift' fun s : SetRel α α => s ○ s)
480483
UniformSpace.comp
481484

482485
theorem lift'_comp_uniformity : ((𝓤 α).lift' fun s : SetRel α α => s ○ s) = 𝓤 α :=
483-
comp_le_uniformity.antisymm <| le_lift'.2 fun s hs ↦ mem_of_superset hs <|
484-
have : SetRel.IsRefl s := ⟨fun _ ↦ refl_mem_uniformity hs⟩; SetRel.left_subset_comp
486+
comp_le_uniformity.antisymm <| le_lift'.2 fun _s hs ↦ mem_of_superset hs <|
487+
have := isRefl_of_mem_uniformity hs; SetRel.left_subset_comp
485488

486489
theorem tendsto_swap_uniformity : Tendsto (@Prod.swap α α) (𝓤 α) (𝓤 α) :=
487490
symm_le_uniformity
@@ -561,7 +564,7 @@ theorem uniformity_lift_le_comp {f : SetRel α α → Filter β} (h : Monotone f
561564
theorem comp3_mem_uniformity {s : SetRel α α} (hs : s ∈ 𝓤 α) : ∃ t ∈ 𝓤 α, t ○ (t ○ t) ⊆ s :=
562565
let ⟨_t', ht', ht's⟩ := comp_mem_uniformity_sets hs
563566
let ⟨t, ht, htt'⟩ := comp_mem_uniformity_sets ht'
564-
have : SetRel.IsRefl t := SetRel.id_subset_iff.1 <| refl_le_uniformity ht
567+
have := isRefl_of_mem_uniformity ht
565568
⟨t, ht, (SetRel.comp_subset_comp (SetRel.left_subset_comp.trans htt') htt').trans ht's⟩
566569

567570
/-- See also `comp3_mem_uniformity`. -/
@@ -580,7 +583,7 @@ theorem comp_symm_mem_uniformity_sets {s : SetRel α α} (hs : s ∈ 𝓤 α) :
580583
_ ⊆ s := w_sub
581584

582585
theorem subset_comp_self_of_mem_uniformity {s : SetRel α α} (h : s ∈ 𝓤 α) : s ⊆ s ○ s :=
583-
have : SetRel.IsRefl s := SetRel.id_subset_iff.1 <| refl_le_uniformity h; SetRel.left_subset_comp
586+
have := isRefl_of_mem_uniformity h; SetRel.left_subset_comp
584587

585588
theorem comp_comp_symm_mem_uniformity_sets {s : SetRel α α} (hs : s ∈ 𝓤 α) :
586589
∃ t ∈ 𝓤 α, SetRel.IsSymm t ∧ t ○ t ○ t ⊆ s := by

0 commit comments

Comments
 (0)