|
| 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