topology.instances.discreteMathlib.Topology.Instances.Discrete

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -5,7 +5,7 @@ Authors: Rémy Degenne
 -/
 import Order.SuccPred.Basic
 import Topology.Order.Basic
-import Topology.MetricSpace.MetrizableUniformity
+import Topology.Metrizable.Uniformity
 
 #align_import topology.instances.discrete from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
 
Diff
@@ -38,8 +38,8 @@ instance (priority := 100) DiscreteTopology.firstCountableTopology [DiscreteTopo
 #align discrete_topology.first_countable_topology DiscreteTopology.firstCountableTopology
 -/
 
-#print DiscreteTopology.secondCountableTopology_of_encodable /-
-instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
+#print DiscreteTopology.secondCountableTopology_of_countable /-
+instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable
     [hd : DiscreteTopology α] [Encodable α] : SecondCountableTopology α :=
   haveI : ∀ i : α, second_countable_topology ↥({i} : Set α) := fun i =>
     {
@@ -47,7 +47,7 @@ instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
         ⟨{univ}, countable_singleton _, by simp only [eq_iff_true_of_subsingleton]⟩ }
   second_countable_topology_of_countable_cover (singletons_open_iff_discrete.mpr hd)
     (Union_of_singleton α)
-#align discrete_topology.second_countable_topology_of_encodable DiscreteTopology.secondCountableTopology_of_encodable
+#align discrete_topology.second_countable_topology_of_encodable DiscreteTopology.secondCountableTopology_of_countable
 -/
 
 #print bot_topologicalSpace_eq_generateFrom_of_pred_succOrder /-
@@ -94,23 +94,23 @@ theorem LinearOrder.bot_topologicalSpace_eq_generateFrom {α} [LinearOrder α] [
   refine' (eq_bot_of_singletons_open fun a => _).symm
   have h_singleton_eq_inter : {a} = Iic a ∩ Ici a := by rw [inter_comm, Ici_inter_Iic, Icc_self a]
   by_cases ha_top : IsTop a
-  · rw [ha_top.Iic_eq, inter_comm, inter_univ] at h_singleton_eq_inter 
+  · rw [ha_top.Iic_eq, inter_comm, inter_univ] at h_singleton_eq_inter
     by_cases ha_bot : IsBot a
-    · rw [ha_bot.Ici_eq] at h_singleton_eq_inter 
+    · rw [ha_bot.Ici_eq] at h_singleton_eq_inter
       rw [h_singleton_eq_inter]
       apply isOpen_univ
-    · rw [isBot_iff_isMin] at ha_bot 
-      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter 
+    · rw [isBot_iff_isMin] at ha_bot
+      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter
       rw [h_singleton_eq_inter]
       exact is_open_generate_from_of_mem ⟨pred a, Or.inl rfl⟩
-  · rw [isTop_iff_isMax] at ha_top 
-    rw [← Iio_succ_of_not_is_max ha_top] at h_singleton_eq_inter 
+  · rw [isTop_iff_isMax] at ha_top
+    rw [← Iio_succ_of_not_is_max ha_top] at h_singleton_eq_inter
     by_cases ha_bot : IsBot a
-    · rw [ha_bot.Ici_eq, inter_univ] at h_singleton_eq_inter 
+    · rw [ha_bot.Ici_eq, inter_univ] at h_singleton_eq_inter
       rw [h_singleton_eq_inter]
       exact is_open_generate_from_of_mem ⟨succ a, Or.inr rfl⟩
-    · rw [isBot_iff_isMin] at ha_bot 
-      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter 
+    · rw [isBot_iff_isMin] at ha_bot
+      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter
       rw [h_singleton_eq_inter]
       apply IsOpen.inter
       · exact is_open_generate_from_of_mem ⟨succ a, Or.inr rfl⟩
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2022 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 -/
-import Mathbin.Order.SuccPred.Basic
-import Mathbin.Topology.Order.Basic
-import Mathbin.Topology.MetricSpace.MetrizableUniformity
+import Order.SuccPred.Basic
+import Topology.Order.Basic
+import Topology.MetricSpace.MetrizableUniformity
 
 #align_import topology.instances.discrete from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module topology.instances.discrete
-! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Order.SuccPred.Basic
 import Mathbin.Topology.Order.Basic
 import Mathbin.Topology.MetricSpace.MetrizableUniformity
 
+#align_import topology.instances.discrete from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
+
 /-!
 # Instances related to the discrete topology
 
Diff
@@ -53,6 +53,7 @@ instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
 #align discrete_topology.second_countable_topology_of_encodable DiscreteTopology.secondCountableTopology_of_encodable
 -/
 
+#print bot_topologicalSpace_eq_generateFrom_of_pred_succOrder /-
 theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder {α} [PartialOrder α] [PredOrder α]
     [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] :
     (⊥ : TopologicalSpace α) = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} :=
@@ -68,6 +69,7 @@ theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder {α} [PartialOrde
   · exact is_open_generate_from_of_mem ⟨succ a, Or.inr rfl⟩
   · exact is_open_generate_from_of_mem ⟨pred a, Or.inl rfl⟩
 #align bot_topological_space_eq_generate_from_of_pred_succ_order bot_topologicalSpace_eq_generateFrom_of_pred_succOrder
+-/
 
 #print discreteTopology_iff_orderTopology_of_pred_succ' /-
 theorem discreteTopology_iff_orderTopology_of_pred_succ' [PartialOrder α] [PredOrder α]
@@ -88,6 +90,7 @@ instance (priority := 100) DiscreteTopology.orderTopology_of_pred_succ' [h : Dis
 #align discrete_topology.order_topology_of_pred_succ' DiscreteTopology.orderTopology_of_pred_succ'
 -/
 
+#print LinearOrder.bot_topologicalSpace_eq_generateFrom /-
 theorem LinearOrder.bot_topologicalSpace_eq_generateFrom {α} [LinearOrder α] [PredOrder α]
     [SuccOrder α] : (⊥ : TopologicalSpace α) = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} :=
   by
@@ -116,6 +119,7 @@ theorem LinearOrder.bot_topologicalSpace_eq_generateFrom {α} [LinearOrder α] [
       · exact is_open_generate_from_of_mem ⟨succ a, Or.inr rfl⟩
       · exact is_open_generate_from_of_mem ⟨pred a, Or.inl rfl⟩
 #align linear_order.bot_topological_space_eq_generate_from LinearOrder.bot_topologicalSpace_eq_generateFrom
+-/
 
 #print discreteTopology_iff_orderTopology_of_pred_succ /-
 theorem discreteTopology_iff_orderTopology_of_pred_succ [LinearOrder α] [PredOrder α]
Diff
@@ -55,7 +55,7 @@ instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
 
 theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder {α} [PartialOrder α] [PredOrder α]
     [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] :
-    (⊥ : TopologicalSpace α) = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a } :=
+    (⊥ : TopologicalSpace α) = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} :=
   by
   refine' (eq_bot_of_singletons_open fun a => _).symm
   have h_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a) :=
@@ -89,7 +89,7 @@ instance (priority := 100) DiscreteTopology.orderTopology_of_pred_succ' [h : Dis
 -/
 
 theorem LinearOrder.bot_topologicalSpace_eq_generateFrom {α} [LinearOrder α] [PredOrder α]
-    [SuccOrder α] : (⊥ : TopologicalSpace α) = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a } :=
+    [SuccOrder α] : (⊥ : TopologicalSpace α) = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a} :=
   by
   refine' (eq_bot_of_singletons_open fun a => _).symm
   have h_singleton_eq_inter : {a} = Iic a ∩ Ici a := by rw [inter_comm, Ici_inter_Iic, Icc_self a]
Diff
@@ -94,23 +94,23 @@ theorem LinearOrder.bot_topologicalSpace_eq_generateFrom {α} [LinearOrder α] [
   refine' (eq_bot_of_singletons_open fun a => _).symm
   have h_singleton_eq_inter : {a} = Iic a ∩ Ici a := by rw [inter_comm, Ici_inter_Iic, Icc_self a]
   by_cases ha_top : IsTop a
-  · rw [ha_top.Iic_eq, inter_comm, inter_univ] at h_singleton_eq_inter
+  · rw [ha_top.Iic_eq, inter_comm, inter_univ] at h_singleton_eq_inter 
     by_cases ha_bot : IsBot a
-    · rw [ha_bot.Ici_eq] at h_singleton_eq_inter
+    · rw [ha_bot.Ici_eq] at h_singleton_eq_inter 
       rw [h_singleton_eq_inter]
       apply isOpen_univ
-    · rw [isBot_iff_isMin] at ha_bot
-      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter
+    · rw [isBot_iff_isMin] at ha_bot 
+      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter 
       rw [h_singleton_eq_inter]
       exact is_open_generate_from_of_mem ⟨pred a, Or.inl rfl⟩
-  · rw [isTop_iff_isMax] at ha_top
-    rw [← Iio_succ_of_not_is_max ha_top] at h_singleton_eq_inter
+  · rw [isTop_iff_isMax] at ha_top 
+    rw [← Iio_succ_of_not_is_max ha_top] at h_singleton_eq_inter 
     by_cases ha_bot : IsBot a
-    · rw [ha_bot.Ici_eq, inter_univ] at h_singleton_eq_inter
+    · rw [ha_bot.Ici_eq, inter_univ] at h_singleton_eq_inter 
       rw [h_singleton_eq_inter]
       exact is_open_generate_from_of_mem ⟨succ a, Or.inr rfl⟩
-    · rw [isBot_iff_isMin] at ha_bot
-      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter
+    · rw [isBot_iff_isMin] at ha_bot 
+      rw [← Ioi_pred_of_not_is_min ha_bot] at h_singleton_eq_inter 
       rw [h_singleton_eq_inter]
       apply IsOpen.inter
       · exact is_open_generate_from_of_mem ⟨succ a, Or.inr rfl⟩
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
 
 ! This file was ported from Lean 3 source module topology.instances.discrete
-! leanprover-community/mathlib commit bcfa726826abd57587355b4b5b7e78ad6527b7e4
+! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Topology.MetricSpace.MetrizableUniformity
 /-!
 # Instances related to the discrete topology
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We prove that the discrete topology is
 * first-countable,
 * second-countable for an encodable type,
@@ -31,11 +34,14 @@ open Order Set TopologicalSpace Filter
 
 variable {α : Type _} [TopologicalSpace α]
 
+#print DiscreteTopology.firstCountableTopology /-
 instance (priority := 100) DiscreteTopology.firstCountableTopology [DiscreteTopology α] :
     FirstCountableTopology α
     where nhds_generated_countable := by rw [nhds_discrete]; exact is_countably_generated_pure
 #align discrete_topology.first_countable_topology DiscreteTopology.firstCountableTopology
+-/
 
+#print DiscreteTopology.secondCountableTopology_of_encodable /-
 instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
     [hd : DiscreteTopology α] [Encodable α] : SecondCountableTopology α :=
   haveI : ∀ i : α, second_countable_topology ↥({i} : Set α) := fun i =>
@@ -45,6 +51,7 @@ instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
   second_countable_topology_of_countable_cover (singletons_open_iff_discrete.mpr hd)
     (Union_of_singleton α)
 #align discrete_topology.second_countable_topology_of_encodable DiscreteTopology.secondCountableTopology_of_encodable
+-/
 
 theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder {α} [PartialOrder α] [PredOrder α]
     [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] :
@@ -62,6 +69,7 @@ theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder {α} [PartialOrde
   · exact is_open_generate_from_of_mem ⟨pred a, Or.inl rfl⟩
 #align bot_topological_space_eq_generate_from_of_pred_succ_order bot_topologicalSpace_eq_generateFrom_of_pred_succOrder
 
+#print discreteTopology_iff_orderTopology_of_pred_succ' /-
 theorem discreteTopology_iff_orderTopology_of_pred_succ' [PartialOrder α] [PredOrder α]
     [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] : DiscreteTopology α ↔ OrderTopology α :=
   by
@@ -71,11 +79,14 @@ theorem discreteTopology_iff_orderTopology_of_pred_succ' [PartialOrder α] [Pred
   · rw [h.topology_eq_generate_intervals]
     exact bot_topological_space_eq_generate_from_of_pred_succ_order.symm
 #align discrete_topology_iff_order_topology_of_pred_succ' discreteTopology_iff_orderTopology_of_pred_succ'
+-/
 
+#print DiscreteTopology.orderTopology_of_pred_succ' /-
 instance (priority := 100) DiscreteTopology.orderTopology_of_pred_succ' [h : DiscreteTopology α]
     [PartialOrder α] [PredOrder α] [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] : OrderTopology α :=
   discreteTopology_iff_orderTopology_of_pred_succ'.1 h
 #align discrete_topology.order_topology_of_pred_succ' DiscreteTopology.orderTopology_of_pred_succ'
+-/
 
 theorem LinearOrder.bot_topologicalSpace_eq_generateFrom {α} [LinearOrder α] [PredOrder α]
     [SuccOrder α] : (⊥ : TopologicalSpace α) = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a } :=
@@ -106,6 +117,7 @@ theorem LinearOrder.bot_topologicalSpace_eq_generateFrom {α} [LinearOrder α] [
       · exact is_open_generate_from_of_mem ⟨pred a, Or.inl rfl⟩
 #align linear_order.bot_topological_space_eq_generate_from LinearOrder.bot_topologicalSpace_eq_generateFrom
 
+#print discreteTopology_iff_orderTopology_of_pred_succ /-
 theorem discreteTopology_iff_orderTopology_of_pred_succ [LinearOrder α] [PredOrder α]
     [SuccOrder α] : DiscreteTopology α ↔ OrderTopology α :=
   by
@@ -115,15 +127,20 @@ theorem discreteTopology_iff_orderTopology_of_pred_succ [LinearOrder α] [PredOr
   · rw [h.topology_eq_generate_intervals]
     exact linear_order.bot_topological_space_eq_generate_from.symm
 #align discrete_topology_iff_order_topology_of_pred_succ discreteTopology_iff_orderTopology_of_pred_succ
+-/
 
+#print DiscreteTopology.orderTopology_of_pred_succ /-
 instance (priority := 100) DiscreteTopology.orderTopology_of_pred_succ [h : DiscreteTopology α]
     [LinearOrder α] [PredOrder α] [SuccOrder α] : OrderTopology α :=
   discreteTopology_iff_orderTopology_of_pred_succ.mp h
 #align discrete_topology.order_topology_of_pred_succ DiscreteTopology.orderTopology_of_pred_succ
+-/
 
+#print DiscreteTopology.metrizableSpace /-
 instance (priority := 100) DiscreteTopology.metrizableSpace [DiscreteTopology α] :
     MetrizableSpace α := by
   obtain rfl := DiscreteTopology.eq_bot α
   exact @UniformSpace.metrizableSpace α ⊥ (is_countably_generated_principal _) _
 #align discrete_topology.metrizable_space DiscreteTopology.metrizableSpace
+-/
 
Diff
@@ -33,9 +33,7 @@ variable {α : Type _} [TopologicalSpace α]
 
 instance (priority := 100) DiscreteTopology.firstCountableTopology [DiscreteTopology α] :
     FirstCountableTopology α
-    where nhds_generated_countable := by
-    rw [nhds_discrete]
-    exact is_countably_generated_pure
+    where nhds_generated_countable := by rw [nhds_discrete]; exact is_countably_generated_pure
 #align discrete_topology.first_countable_topology DiscreteTopology.firstCountableTopology
 
 instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable

Changes in mathlib4

mathlib3
mathlib4
chore(Topology/Instances/Discrete): merge 2 instances (#11296)

Prove DiscreteTopology.secondCountableTopology_of_countable directly, deprecate DiscreteTopology.secondCountableTopology_of_encodable.

Diff
@@ -33,18 +33,19 @@ instance (priority := 100) DiscreteTopology.firstCountableTopology [DiscreteTopo
   nhds_generated_countable := by rw [nhds_discrete]; exact isCountablyGenerated_pure
 #align discrete_topology.first_countable_topology DiscreteTopology.firstCountableTopology
 
-instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
-    [hd : DiscreteTopology α] [Encodable α] : SecondCountableTopology α :=
+instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable
+    [hd : DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
   haveI : ∀ i : α, SecondCountableTopology (↥({i} : Set α)) := fun i =>
     { is_open_generated_countable :=
         ⟨{univ}, countable_singleton _, by simp only [eq_iff_true_of_subsingleton]⟩ }
   secondCountableTopology_of_countable_cover (singletons_open_iff_discrete.mpr hd)
     (iUnion_of_singleton α)
-#align discrete_topology.second_countable_topology_of_encodable DiscreteTopology.secondCountableTopology_of_encodable
+#align discrete_topology.second_countable_topology_of_encodable DiscreteTopology.secondCountableTopology_of_countable
 
-instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type*}
+@[deprecated DiscreteTopology.secondCountableTopology_of_countable] -- 2024-03-11
+theorem DiscreteTopology.secondCountableTopology_of_encodable {α : Type*}
     [TopologicalSpace α] [DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
-  @DiscreteTopology.secondCountableTopology_of_encodable _ _ _ (Encodable.ofCountable _)
+  DiscreteTopology.secondCountableTopology_of_countable
 #align discrete_topology.second_countable_topology_of_countable DiscreteTopology.secondCountableTopology_of_countable
 
 theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder [PartialOrder α] [PredOrder α]
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -52,8 +52,8 @@ theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder [PartialOrder α]
     (⊥ : TopologicalSpace α) = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a } := by
   refine' (eq_bot_of_singletons_open fun a => _).symm
   have h_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a) := by
-    suffices h_singleton_eq_inter' : {a} = Iic a ∩ Ici a
-    · rw [h_singleton_eq_inter', ← Ioi_pred, ← Iio_succ]
+    suffices h_singleton_eq_inter' : {a} = Iic a ∩ Ici a by
+      rw [h_singleton_eq_inter', ← Ioi_pred, ← Iio_succ]
     rw [inter_comm, Ici_inter_Iic, Icc_self a]
   rw [h_singleton_eq_inter]
   letI := Preorder.topology α
chore: move DiscreteTopology.secondCountableTopology_of_countable (#10615)

Implement a porting note to move this instance to a much more natural file.

Diff
@@ -42,6 +42,11 @@ instance (priority := 100) DiscreteTopology.secondCountableTopology_of_encodable
     (iUnion_of_singleton α)
 #align discrete_topology.second_countable_topology_of_encodable DiscreteTopology.secondCountableTopology_of_encodable
 
+instance (priority := 100) DiscreteTopology.secondCountableTopology_of_countable {α : Type*}
+    [TopologicalSpace α] [DiscreteTopology α] [Countable α] : SecondCountableTopology α :=
+  @DiscreteTopology.secondCountableTopology_of_encodable _ _ _ (Encodable.ofCountable _)
+#align discrete_topology.second_countable_topology_of_countable DiscreteTopology.secondCountableTopology_of_countable
+
 theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder [PartialOrder α] [PredOrder α]
     [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] :
     (⊥ : TopologicalSpace α) = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a } := by
chore(Topology): move some definitions to new files (#10151)

In some cases, the order of implicit arguments changed because now they appear in a different order in variables.

Also, some definitions used greek letters for topological spaces, changed to X/Y.

Diff
@@ -51,8 +51,8 @@ theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder [PartialOrder α]
     · rw [h_singleton_eq_inter', ← Ioi_pred, ← Iio_succ]
     rw [inter_comm, Ici_inter_Iic, Icc_self a]
   rw [h_singleton_eq_inter]
-  -- Porting note: Specified instance for `IsOpen.inter` explicitly to fix an error.
-  apply @IsOpen.inter _ _ _ (generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a })
+  letI := Preorder.topology α
+  apply IsOpen.inter
   · exact isOpen_generateFrom_of_mem ⟨succ a, Or.inr rfl⟩
   · exact isOpen_generateFrom_of_mem ⟨pred a, Or.inl rfl⟩
 #align bot_topological_space_eq_generate_from_of_pred_succ_order bot_topologicalSpace_eq_generateFrom_of_pred_succOrder
@@ -96,7 +96,8 @@ theorem LinearOrder.bot_topologicalSpace_eq_generateFrom [LinearOrder α] [PredO
       rw [← Ioi_pred_of_not_isMin ha_bot] at h_singleton_eq_inter
       rw [h_singleton_eq_inter]
       -- Porting note: Specified instance for `IsOpen.inter` explicitly to fix an error.
-      apply @IsOpen.inter _ _ _ (generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a })
+      letI := Preorder.topology α
+      apply IsOpen.inter
       · exact isOpen_generateFrom_of_mem ⟨succ a, Or.inr rfl⟩
       · exact isOpen_generateFrom_of_mem ⟨pred a, Or.inl rfl⟩
 #align linear_order.bot_topological_space_eq_generate_from LinearOrder.bot_topologicalSpace_eq_generateFrom
chore: split Topology.MetricSpace.Metrizable* (#7912)

Move

  • basic definitions to Topology.Metrizable.Basic,
  • Urysohn's metrization theorem to `Topology.Metrizable.Urysohns', and
  • metrizability of a uniform space with countably generated uniformity to Topology.Metrizable.Uniform.

The next step is to redefine Metrizable as "uniformizable with countably generated uniformity" and make this definition available much earlier.

Diff
@@ -5,7 +5,7 @@ Authors: Rémy Degenne
 -/
 import Mathlib.Order.SuccPred.Basic
 import Mathlib.Topology.Order.Basic
-import Mathlib.Topology.MetricSpace.MetrizableUniformity
+import Mathlib.Topology.Metrizable.Uniformity
 
 #align_import topology.instances.discrete from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -26,7 +26,7 @@ and `OrderTopology ℕ` become available.
 
 open Order Set TopologicalSpace Filter
 
-variable {α : Type _} [TopologicalSpace α]
+variable {α : Type*} [TopologicalSpace α]
 
 instance (priority := 100) DiscreteTopology.firstCountableTopology [DiscreteTopology α] :
     FirstCountableTopology α where
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2022 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne
-
-! This file was ported from Lean 3 source module topology.instances.discrete
-! leanprover-community/mathlib commit bcfa726826abd57587355b4b5b7e78ad6527b7e4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Order.SuccPred.Basic
 import Mathlib.Topology.Order.Basic
 import Mathlib.Topology.MetricSpace.MetrizableUniformity
 
+#align_import topology.instances.discrete from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
+
 /-!
 # Instances related to the discrete topology
 
feat: port Topology.Instances.Discrete (#4479)

Dependencies 10 + 690

691 files ported (98.6%)
301541 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file