@@ -25,17 +25,15 @@ absolute value (resp. `p`-adic absolute value) on `ℚ` is extended to `ℝ` (re
2525
2626## Implementation notes
2727
28- This topology is not defined as an instance since it may not be the desired topology on
29- a linearly ordered commutative group with zero. You can locally activate this topology using
30- `local attribute [instance] linear_ordered_comm_group_with_zero.topological_space`
31- All other instances will (`ordered_topology`, `t3_space`, `has_continuous_mul`) then follow.
32-
28+ This topology is not defined as a global instance since it may not be the desired topology on a
29+ linearly ordered commutative group with zero. You can locally activate this topology using
30+ `open_locale with_zero_topology`.
3331-/
3432
3533open_locale topology filter
3634open topological_space filter set function
3735
38- namespace linear_ordered_comm_group_with_zero
36+ namespace with_zero_topology
3937
4038variables {α Γ₀ : Type *} [linear_ordered_comm_group_with_zero Γ₀] {γ γ₁ γ₂ : Γ₀} {l : filter α}
4139 {f : α → Γ₀}
@@ -45,7 +43,7 @@ A subset U is open if 0 ∉ U or if there is an invertible element γ₀ such th
4543protected def topological_space : topological_space Γ₀ :=
4644topological_space.mk_of_nhds $ update pure 0 $ ⨅ γ ≠ 0 , 𝓟 (Iio γ)
4745
48- local attribute [instance] linear_ordered_comm_group_with_zero .topological_space
46+ localized " attribute [instance] with_zero_topology .topological_space" in with_zero_topology
4947
5048lemma nhds_eq_update : (𝓝 : Γ₀ → filter Γ₀) = update pure 0 (⨅ γ ≠ 0 , 𝓟 (Iio γ)) :=
5149funext $ nhds_mk_of_nhds_single $ le_infi₂ $ λ γ h₀, le_principal_iff.2 $ zero_lt_iff.2 h₀
@@ -134,8 +132,7 @@ is_open_iff.mpr $ imp_iff_not_or.mp $ λ ha, ⟨a, ne_of_gt ha, subset.rfl⟩
134132
135133/-- The topology on a linearly ordered group with zero element adjoined is compatible with the order
136134structure: the set `{p : Γ₀ × Γ₀ | p.1 ≤ p.2}` is closed. -/
137- @[priority 100 ]
138- instance order_closed_topology : order_closed_topology Γ₀ :=
135+ protected lemma order_closed_topology : order_closed_topology Γ₀ :=
139136{ is_closed_le' :=
140137 begin
141138 simp only [← is_open_compl_iff, compl_set_of, not_le, is_open_iff_mem_nhds],
@@ -144,9 +141,10 @@ instance order_closed_topology : order_closed_topology Γ₀ :=
144141 exact Iio_mem_nhds hab
145142 end }
146143
144+ localized " attribute [instance] with_zero_topology.order_closed_topology" in with_zero_topology
145+
147146/-- The topology on a linearly ordered group with zero element adjoined is T₃. -/
148- @[priority 100 ]
149- instance t3_space : t3_space Γ₀ :=
147+ lemma t3_space : t3_space Γ₀ :=
150148{ to_regular_space := regular_space.of_lift'_closure $ λ γ,
151149 begin
152150 rcases ne_or_eq γ 0 with h₀|rfl,
@@ -156,10 +154,11 @@ instance t3_space : t3_space Γ₀ :=
156154 (λ x hx, is_closed_iff.2 $ or.inl $ zero_lt_iff.2 hx) },
157155 end }
158156
157+ localized " attribute [instance] with_zero_topology.t3_space" in with_zero_topology
158+
159159/-- The topology on a linearly ordered group with zero element adjoined makes it a topological
160160monoid. -/
161- @[priority 100 ]
162- instance : has_continuous_mul Γ₀ :=
161+ protected lemma has_continuous_mul : has_continuous_mul Γ₀ :=
163162⟨begin
164163 rw continuous_iff_continuous_at,
165164 rintros ⟨x, y⟩,
@@ -182,8 +181,11 @@ instance : has_continuous_mul Γ₀ :=
182181 exact pure_le_nhds (x * y) }
183182end ⟩
184183
185- @[priority 100 ]
186- instance : has_continuous_inv₀ Γ₀ :=
184+ localized " attribute [instance] with_zero_topology.has_continuous_mul" in with_zero_topology
185+
186+ protected lemma has_continuous_inv₀ : has_continuous_inv₀ Γ₀ :=
187187⟨λ γ h, by { rw [continuous_at, nhds_of_ne_zero h], exact pure_le_nhds γ⁻¹ }⟩
188188
189- end linear_ordered_comm_group_with_zero
189+ localized " attribute [instance] with_zero_topology.has_continuous_inv₀" in with_zero_topology
190+
191+ end with_zero_topology
0 commit comments