Skip to content

Commit a91e88c

Browse files
farmanbblake-farman
andcommitted
feat(RingTheory/IdealFilter): topologies associated to ideal filters (leanprover-community#33853)
This PR introduces topological structures on a ring arising from an IdealFilter. Main additions: * `IdealFilter.addGroupFilterBasis` and the induced additive group topology. * Under `F.IsUniform`, `IdealFilter.ringFilterBasis` and the induced ring topology. * A characterization of uniform ideal filters in terms of the existence of a `RingFilterBasis` (`isUniform_iff_exists_ringFilterBasis`). * Neighborhood characterizations for both the additive and ring topologies. * A proof that the resulting ring topology is linear (`IsLinearTopology`). The construction follows the standard picture of uniform (Gabriel) filters generating linear topologies on rings, using colon ideals to witness stability under right multiplication. This provides the topological counterpart to the algebraic theory of ideal filters developed in RingTheory/IdealFilter/Basic. Co-authored-by: blake-farman <blake.farman@gmail.com>
1 parent f6d9e1d commit a91e88c

3 files changed

Lines changed: 149 additions & 6 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6130,6 +6130,7 @@ public import Mathlib.RingTheory.Ideal.Quotient.Operations
61306130
public import Mathlib.RingTheory.Ideal.Quotient.PowTransition
61316131
public import Mathlib.RingTheory.Ideal.Span
61326132
public import Mathlib.RingTheory.IdealFilter.Basic
6133+
public import Mathlib.RingTheory.IdealFilter.Topology
61336134
public import Mathlib.RingTheory.Idempotents
61346135
public import Mathlib.RingTheory.Int.Basic
61356136
public import Mathlib.RingTheory.IntegralClosure.Algebra.Basic

Mathlib/RingTheory/IdealFilter/Basic.lean

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace IdealFilter
7676
variable {A : Type*} [Ring A]
7777

7878
/-- A filter of ideals is *uniform* if it is closed under colon by singletons. -/
79-
structure IsUniform (F : IdealFilter A) : Prop where
79+
class IsUniform (F : IdealFilter A) : Prop where
8080
/-- **Axiom T3.** See [stenstrom1975]. -/
8181
colon_mem {I : Ideal A} (hI : I ∈ F) (a : A) : I.colon {a} ∈ F
8282

@@ -166,24 +166,26 @@ scoped infixl:70 " • " => gabrielComposition
166166

167167
/-- An ideal filter is Gabriel if it satisfies `IsUniform` and axiom T4.
168168
See [nLab: Gabriel filter](<https://ncatlab.org/nlab/show/Gabriel+filter>). -/
169-
structure IsGabriel (F : IdealFilter A) extends F.IsUniform where
169+
class IsGabriel (F : IdealFilter A) extends F.IsUniform where
170170
/-- **Axiom T4.** See [stenstrom1975]. -/
171171
gabriel_closed (I : Ideal A) (h : ∃ J ∈ F, ∀ x ∈ J, I.colon {x} ∈ F) : I ∈ F
172172

173173
/-- Characterization of Gabriel filters via `IsUniform` and idempotence of
174174
`gabrielComposition`. -/
175175
theorem isGabriel_iff (F : IdealFilter A) : F.IsGabriel ↔ F.IsUniform ∧ F • F = F := by
176176
constructor
177-
· rintro ⟨h₁, h₂⟩
178-
refine ⟨h₁, ?_⟩
177+
· intro hF
178+
refine ⟨hF.toIsUniform, ?_⟩
179179
ext I
180180
constructor <;> intro hI
181181
· rcases hI with ⟨J, hJ, htors⟩
182-
refine h₂ I ⟨J, hJ, fun x hx ↦ ?_⟩
182+
refine hF.gabriel_closed I ⟨J, hJ, fun x hx ↦ ?_⟩
183183
rcases htors x hx with ⟨K, hK, hincl⟩
184184
exact Order.PFilter.mem_of_le hincl hK
185185
· exact ⟨I, hI, isTorsionQuot_self F I⟩
186-
· refine fun ⟨h₁, h₂⟩ ↦ ⟨h₁, fun I ⟨J, hJ, hcolon⟩ ↦ ?_⟩
186+
· rintro ⟨h₁, h₂⟩
187+
refine { toIsUniform := h₁, gabriel_closed := ?_ }
188+
rintro I ⟨J, hJ, hcolon⟩
187189
exact h₂.le ⟨J, hJ, fun x hx ↦ ⟨I.colon {x}, hcolon x hx, by simp⟩⟩
188190

189191
end IdealFilter
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/-
2+
Copyright (c) 2025 Blake Farman. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Blake Farman
5+
-/
6+
module
7+
8+
public import Mathlib.RingTheory.IdealFilter.Basic
9+
public import Mathlib.Topology.Algebra.LinearTopology
10+
public import Mathlib.Topology.Algebra.FilterBasis
11+
12+
/-!
13+
# Topologies associated to ideal filters
14+
15+
This file constructs topological structures on a ring from an `IdealFilter` and characterizes
16+
uniform ideal filters in terms of ring filter bases.
17+
18+
## Main definitions
19+
* `WithIdealFilter`: Type synonym for a ring that depends on a choice of ideal filter. This can be
20+
used to assign and infer instances on a ring that depend on an ideal filter.
21+
* `IdealFilter.addGroupFilterBasis`: the `AddGroupFilterBasis` with sets the ideals of `F`.
22+
* `IdealFilter.ringFilterBasis`: under `[F.IsUniform]`, the `RingFilterBasis` with sets the ideals
23+
of `F`.
24+
25+
## Main statements
26+
27+
* `IdealFilter.isUniform_iff_exists_ringFilterBasis`: An `IdealFilter` on a ring `A` is uniform if
28+
and only if its ideals form a `RingFilterBasis` for `A`.
29+
30+
## References
31+
32+
* [nLab: Uniform filter](<https://ncatlab.org/nlab/show/uniform+filter>)
33+
34+
## Tags
35+
36+
ring theory, ideal, filter, linear topology
37+
-/
38+
39+
@[expose] public section
40+
41+
open scoped Pointwise Topology
42+
43+
namespace IdealFilter
44+
45+
/-- The additive-group filter basis whose sets are the ideals belonging to the ideal filter `F`. -/
46+
def addGroupFilterBasis {A : Type*} [Ring A] (F : IdealFilter A) : AddGroupFilterBasis A where
47+
sets := {(I : Set A) | I ∈ F}
48+
nonempty := ⟨_, ⟨_, F.nonempty.choose_spec, rfl⟩⟩
49+
inter_sets := by
50+
rintro s t ⟨I, hI, rfl⟩ ⟨J, hJ, rfl⟩
51+
exact ⟨I ⊓ J, ⟨I ⊓ J, Order.PFilter.inf_mem hI hJ, rfl⟩, fun _ h ↦ h⟩
52+
zero' := by aesop
53+
add' := by aesop
54+
neg' := by aesop
55+
conj' := by aesop
56+
57+
/-- Under `[F.IsUniform]`, the ring filter basis obtained from `addGroupFilterBasis`. -/
58+
@[simps! -isSimp sets]
59+
def ringFilterBasis {A : Type*} [Ring A] {F : IdealFilter A} [F.IsUniform] :
60+
RingFilterBasis A where
61+
__ := F.addGroupFilterBasis
62+
mul' := by
63+
rintro U ⟨I, hI, rfl⟩
64+
exact ⟨I, ⟨I, hI, rfl⟩, Set.mul_subset_iff.mpr fun _ h₁ _ h₂ ↦ mul_mem h₁ h₂⟩
65+
mul_left' := by
66+
rintro x₀ U ⟨I, hI, rfl⟩
67+
exact ⟨I, ⟨I, hI, rfl⟩, fun a ha ↦ Ideal.mul_mem_left I x₀ ha⟩
68+
mul_right' := by
69+
rintro x₀ U ⟨I, hI, rfl⟩
70+
refine ⟨I.colon {x₀}, ⟨I.colon {x₀}, IsUniform.colon_mem hI x₀, rfl⟩,
71+
fun a ha ↦ Set.mem_preimage.mpr (Submodule.mem_colon_singleton.mp ha)⟩
72+
73+
/-- An `IdealFilter` on a ring `A` is uniform if and only if its ideals form a `RingFilterBasis`
74+
for `A`. -/
75+
theorem isUniform_iff_exists_ringFilterBasis {A : Type*} [Ring A] {F : IdealFilter A} :
76+
F.IsUniform ↔ ∃ B : RingFilterBasis A, B.sets = {(I : Set A) | I ∈ F} := by
77+
refine ⟨fun _ ↦ ⟨F.ringFilterBasis, rfl⟩, fun ⟨B, hB⟩ ↦ ⟨fun {I} hI a ↦ ?_⟩⟩
78+
obtain ⟨V, hbasis, hsub⟩ := B.mul_right a (U := I) (hB.ge (by simpa))
79+
obtain ⟨J, hJ, rfl⟩ := hB.le hbasis
80+
exact Order.PFilter.mem_of_le (fun x hx ↦ by simpa using (hsub hx)) hJ
81+
82+
end IdealFilter
83+
84+
/-- Type synonym for a ring that depends on a choice of ideal filter. We use this to assign a
85+
topology generated by the ideal filter. -/
86+
@[nolint unusedArguments]
87+
def WithIdealFilter {A : Type*} [Ring A] : IdealFilter A → Type _ := fun _ => A
88+
89+
namespace WithIdealFilter
90+
91+
open IdealFilter
92+
93+
variable {A : Type*} [Ring A] {F : IdealFilter A}
94+
95+
instance instRing : Ring (WithIdealFilter F) := inferInstanceAs (Ring A)
96+
97+
/-- View an ideal of `A` as a subset of `WithIdealFilter F`. -/
98+
abbrev idealSet (I : Ideal A) : Set (WithIdealFilter F) := (I : Set A)
99+
100+
/-- The topology on `A` induced by `addGroupFilterBasis`. -/
101+
instance instTopologicalSpace : TopologicalSpace (WithIdealFilter F) :=
102+
F.addGroupFilterBasis.topology
103+
104+
/-- The topology `F.addGroupFilterBasis.topology` endows `A` with the structure of a topological
105+
additive group. -/
106+
instance instIsTopologicalAddGroup : IsTopologicalAddGroup (WithIdealFilter F) :=
107+
F.addGroupFilterBasis.isTopologicalAddGroup
108+
109+
/-- A set `s` is a neighbourhood of `a` iff it contains a left-additive coset of some ideal
110+
`I ∈ F`. -/
111+
lemma mem_nhds_iff {a : (WithIdealFilter F)} {s : Set (WithIdealFilter F)} :
112+
s ∈ 𝓝 a ↔ ∃ I ∈ F, a +ᵥ idealSet I ⊆ s := by
113+
constructor
114+
· intro hs
115+
rcases ((F.addGroupFilterBasis).nhds_hasBasis a).mem_iff.1 hs with ⟨t, ht, hts⟩
116+
rcases ht with ⟨I, hI, rfl⟩
117+
exact ⟨I, hI, hts⟩
118+
· rintro ⟨I, hI, hIs⟩
119+
refine ((F.addGroupFilterBasis).nhds_hasBasis a).mem_iff.2 ?_
120+
exact ⟨I, ⟨I, hI, rfl⟩, hIs⟩
121+
122+
/-- A set `s` is a neighbourhood of `0` iff it contains an ideal belonging to `F`. -/
123+
lemma mem_nhds_zero_iff {s : Set (WithIdealFilter F)} :
124+
s ∈ 𝓝 0 ↔ ∃ I ∈ F, idealSet I ⊆ s := by
125+
simpa [zero_vadd] using mem_nhds_iff (a := 0) (s := s)
126+
127+
/-- The topology is linear in the sense that `𝓝 0` has a basis of ideals. -/
128+
instance instIsLinearTopology : IsLinearTopology (WithIdealFilter F) (WithIdealFilter F) :=
129+
IsLinearTopology.mk_of_hasBasis' (R := (WithIdealFilter F))
130+
(M := (WithIdealFilter F))
131+
(ι := Ideal A) (S := Ideal A)
132+
(p := fun I : Ideal A ↦ I ∈ F) (s := fun I : Ideal A ↦ I)
133+
⟨fun _ ↦ mem_nhds_zero_iff⟩
134+
(fun I a _ hm ↦ Submodule.smul_mem I a hm)
135+
136+
/-- Under `[F.IsUniform]`, `A` is a topological ring with the induced topology. -/
137+
instance instIsTopologicalRing [F.IsUniform] : IsTopologicalRing (WithIdealFilter F) :=
138+
F.ringFilterBasis.isTopologicalRing
139+
140+
end WithIdealFilter

0 commit comments

Comments
 (0)