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

Commit 366a449

Browse files
committed
doc(topology/algebra/ring): add module docs + tidy (#7893)
Co-authored-by: Eric <37984851+ericrbg@users.noreply.github.com>
1 parent a564bf1 commit 366a449

File tree

2 files changed

+49
-49
lines changed

2 files changed

+49
-49
lines changed

src/ring_theory/ideal/basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,18 @@ protected theorem nontrivial {I : ideal α} (hI : I ≠ ⊤) : nontrivial I.quot
490490
lemma mk_surjective : function.surjective (mk I) :=
491491
λ y, quotient.induction_on' y (λ x, exists.intro x rfl)
492492

493+
/-- If `I` is an ideal of a commutative ring `R`, if `q : R → R/I` is the quotient map, and if
494+
`s ⊆ R` is a subset, then `q⁻¹(q(s)) = ⋃ᵢ(i + s)`, the union running over all `i ∈ I`. -/
495+
lemma quotient_ring_saturate (I : ideal α) (s : set α) :
496+
mk I ⁻¹' (mk I '' s) = (⋃ x : I, (λ y, x.1 + y) '' s) :=
497+
begin
498+
ext x,
499+
simp only [mem_preimage, mem_image, mem_Union, ideal.quotient.eq],
500+
exact ⟨λ ⟨a, a_in, h⟩, ⟨⟨_, I.neg_mem h⟩, a, a_in, by simp⟩,
501+
λ ⟨⟨i, hi⟩, a, ha, eq⟩,
502+
⟨a, ha, by rw [← eq, sub_add_eq_sub_sub_swap, sub_self, zero_sub]; exact I.neg_mem hi⟩⟩
503+
end
504+
493505
instance (I : ideal α) [hI : I.is_prime] : integral_domain I.quotient :=
494506
{ eq_zero_or_eq_zero_of_mul_eq_zero := λ a b,
495507
quotient.induction_on₂' a b $ λ a b hab,

src/topology/algebra/ring.lean

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@ import ring_theory.ideal.basic
1010
import ring_theory.subring
1111
import algebra.ring.prod
1212

13+
/-!
14+
15+
# Topological (semi)rings
16+
17+
A topological (semi)ring is a (semi)ring equipped with a topology such that all operations are
18+
continuous. Besides this definition, this file proves that the topological closure of a subring
19+
(resp. an ideal) is a subring (resp. an ideal) and defines products and quotients
20+
of topological (semi)rings.
21+
22+
## Main Results
23+
24+
- `subring.topological_closure`/`subsemiring.topological_closure`: the topological closure of a
25+
`subring`/`subsemiring` is itself a `sub(semi)ring`.
26+
- `prod_ring`/`prod_semiring`: The product of two topological (semi)rings.
27+
- `ideal.closure`: The closure of an ideal is an ideal.
28+
- `topological_ring_quotient`: The quotient of a topological ring by an ideal is a topological ring.
29+
30+
-/
31+
1332
open classical set filter topological_space
1433
open_locale classical
1534

@@ -52,14 +71,6 @@ lemma subsemiring.topological_closure_minimal
5271
s.topological_closure ≤ t :=
5372
closure_minimal h ht
5473

55-
instance (S : submonoid α) : has_continuous_mul (S.topological_closure) :=
56-
{ continuous_mul :=
57-
begin
58-
apply continuous_induced_rng,
59-
change continuous (λ p : S.topological_closure × S.topological_closure, (p.1 : α) * (p.2 : α)),
60-
continuity,
61-
end }
62-
6374
/-- The product topology on the cartesian product of two topological semirings
6475
makes the product into a topological semiring. -/
6576
instance prod_semiring {β : Type*}
@@ -113,17 +124,14 @@ instance subring.topological_closure_topological_ring (s : subring α) :
113124
..s.to_submonoid.topological_closure_has_continuous_mul }
114125

115126
lemma subring.subring_topological_closure (s : subring α) :
116-
s ≤ s.topological_closure :=
117-
subset_closure
127+
s ≤ s.topological_closure := subset_closure
118128

119129
lemma subring.is_closed_topological_closure (s : subring α) :
120-
is_closed (s.topological_closure : set α) :=
121-
by convert is_closed_closure
130+
is_closed (s.topological_closure : set α) := by convert is_closed_closure
122131

123132
lemma subring.topological_closure_minimal
124133
(s : subring α) {t : subring α} (h : s ≤ t) (ht : is_closed (t : set α)) :
125-
s.topological_closure ≤ t :=
126-
closure_minimal h ht
134+
s.topological_closure ≤ t := closure_minimal h ht
127135

128136
end topological_ring
129137

@@ -132,14 +140,11 @@ variables {α : Type*} [topological_space α] [comm_ring α] [topological_ring
132140

133141
/-- The closure of an ideal in a topological ring as an ideal. -/
134142
def ideal.closure (S : ideal α) : ideal α :=
135-
{ carrier := closure S,
136-
smul_mem' := assume c x hx,
137-
have continuous (λx:α, c * x) := continuous_const.mul continuous_id,
138-
map_mem_closure this hx $ assume a, S.mul_mem_left _,
143+
{ carrier := closure S,
144+
smul_mem' := λ c x hx, map_mem_closure (mul_left_continuous _) hx $ λ a, S.mul_mem_left c,
139145
..(add_submonoid.topological_closure S.to_add_submonoid) }
140146

141-
@[simp] lemma ideal.coe_closure (S : ideal α) :
142-
(S.closure : set α) = closure S := rfl
147+
@[simp] lemma ideal.coe_closure (S : ideal α) : (S.closure : set α) = closure S := rfl
143148

144149
end topological_comm_ring
145150

@@ -150,51 +155,34 @@ open ideal.quotient
150155
instance topological_ring_quotient_topology : topological_space N.quotient :=
151156
by dunfold ideal.quotient submodule.quotient; apply_instance
152157

153-
lemma quotient_ring_saturate {α : Type*} [comm_ring α] (N : ideal α) (s : set α) :
154-
mk N ⁻¹' (mk N '' s) = (⋃ x : N, (λ y, x.1 + y) '' s) :=
155-
begin
156-
ext x,
157-
simp only [mem_preimage, mem_image, mem_Union, ideal.quotient.eq],
158-
split,
159-
{ exact assume ⟨a, a_in, h⟩, ⟨⟨_, N.neg_mem h⟩, a, a_in, by simp⟩ },
160-
{ exact assume ⟨⟨i, hi⟩, a, ha, eq⟩, ⟨a, ha,
161-
by rw [← eq, sub_add_eq_sub_sub_swap, sub_self, zero_sub];
162-
exact N.neg_mem hi⟩ }
163-
end
158+
-- note for the reader: in the following, `mk` is `ideal.quotient.mk`, the canonical map `R → R/I`.
164159

165160
variable [topological_ring α]
166161

167162
lemma quotient_ring.is_open_map_coe : is_open_map (mk N) :=
168163
begin
169-
assume s s_op,
170-
show is_open (mk N ⁻¹' (mk N '' s)),
171-
rw quotient_ring_saturate N s,
172-
exact is_open_Union (assume ⟨n, _⟩, is_open_map_add_left n s s_op)
164+
intros s s_op,
165+
change is_open (mk N ⁻¹' (mk N '' s)),
166+
rw quotient_ring_saturate,
167+
exact is_open_Union (λ ⟨n, _⟩, is_open_map_add_left n s s_op)
173168
end
174169

175170
lemma quotient_ring.quotient_map_coe_coe : quotient_map (λ p : α × α, (mk N p.1, mk N p.2)) :=
176-
begin
177-
apply is_open_map.to_quotient_map,
178-
{ exact (quotient_ring.is_open_map_coe N).prod (quotient_ring.is_open_map_coe N) },
179-
{ exact (continuous_quot_mk.comp continuous_fst).prod_mk
180-
(continuous_quot_mk.comp continuous_snd) },
181-
{ rintro ⟨⟨x⟩, ⟨y⟩⟩,
182-
exact ⟨(x, y), rfl⟩ }
183-
end
171+
is_open_map.to_quotient_map
172+
((quotient_ring.is_open_map_coe N).prod (quotient_ring.is_open_map_coe N))
173+
((continuous_quot_mk.comp continuous_fst).prod_mk (continuous_quot_mk.comp continuous_snd))
174+
(by rintro ⟨⟨x⟩, ⟨y⟩⟩; exact ⟨(x, y), rfl⟩)
184175

185176
instance topological_ring_quotient : topological_ring N.quotient :=
186177
{ continuous_add :=
187178
have cont : continuous (mk N ∘ (λ (p : α × α), p.fst + p.snd)) :=
188179
continuous_quot_mk.comp continuous_add,
189-
(quotient_map.continuous_iff (quotient_ring.quotient_map_coe_coe N)).2 cont,
180+
(quotient_map.continuous_iff (quotient_ring.quotient_map_coe_coe N)).mpr cont,
190181
continuous_neg :=
191-
begin
192-
convert continuous_quotient_lift _ (continuous_quot_mk.comp continuous_neg),
193-
apply_instance,
194-
end,
182+
by convert continuous_quotient_lift _ (continuous_quot_mk.comp continuous_neg); apply_instance,
195183
continuous_mul :=
196184
have cont : continuous (mk N ∘ (λ (p : α × α), p.fst * p.snd)) :=
197185
continuous_quot_mk.comp continuous_mul,
198-
(quotient_map.continuous_iff (quotient_ring.quotient_map_coe_coe N)).2 cont }
186+
(quotient_map.continuous_iff (quotient_ring.quotient_map_coe_coe N)).mpr cont }
199187

200188
end topological_ring

0 commit comments

Comments
 (0)