Skip to content

Commit 073ff37

Browse files
committed
feat: make topologicalClosure a ClosureOperator
1 parent 032b054 commit 073ff37

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

Mathlib/Topology/Algebra/Module/Basic.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@ variable [ContinuousAdd M]
154154

155155
/-- The (topological-space) closure of a submodule of a topological `R`-module `M` is itself
156156
a submodule. -/
157-
def Submodule.topologicalClosure (s : Submodule R M) : Submodule R M :=
158-
{ s.toAddSubmonoid.topologicalClosure with
159-
smul_mem' := s.mapsTo_smul_closure }
157+
def Submodule.topologicalClosure : ClosureOperator (Submodule R M) := .mk₂
158+
(fun s ↦ { s.toAddSubmonoid.topologicalClosure with smul_mem' := s.mapsTo_smul_closure })
159+
(fun _ ↦ subset_closure)
160+
(fun _ _ h ↦ closure_minimal h isClosed_closure)
160161

161162
@[simp, norm_cast]
162163
theorem Submodule.topologicalClosure_coe (s : Submodule R M) :

Mathlib/Topology/Algebra/Monoid.lean

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public import Mathlib.Order.Filter.Pointwise
1313
public import Mathlib.Topology.Algebra.MulAction
1414
public import Mathlib.Topology.ContinuousMap.Basic
1515
public import Mathlib.Topology.Algebra.Monoid.Defs
16+
public import Mathlib.Order.Closure
1617

1718
/-!
1819
# Theory of topological monoids
@@ -691,10 +692,12 @@ theorem Submonoid.top_closure_mul_self_eq (s : Submonoid M) :
691692
itself a submonoid. -/
692693
@[to_additive /-- The (topological-space) closure of an additive submonoid of a space `M` with
693694
`ContinuousAdd` is itself an additive submonoid. -/]
694-
def Submonoid.topologicalClosure (s : Submonoid M) : Submonoid M where
695-
carrier := _root_.closure (s : Set M)
696-
one_mem' := _root_.subset_closure s.one_mem
697-
mul_mem' ha hb := s.top_closure_mul_self_subset ⟨_, ha, _, hb, rfl⟩
695+
def Submonoid.topologicalClosure : ClosureOperator (Submonoid M) := .mk₂
696+
(fun s ↦ { carrier := _root_.closure s
697+
one_mem' := _root_.subset_closure s.one_mem
698+
mul_mem' ha hb := s.top_closure_mul_self_subset ⟨_, ha, _, hb, rfl⟩})
699+
(fun _ ↦ _root_.subset_closure)
700+
(fun _ _ h ↦ closure_minimal h isClosed_closure)
698701

699702
@[to_additive]
700703
theorem Submonoid.coe_topologicalClosure (s : Submonoid M) :

0 commit comments

Comments
 (0)