set_theory.ordinal.topologyMathlib.SetTheory.Ordinal.Topology

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -262,7 +262,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 #align ordinal.is_normal_iff_strict_mono_and_continuous Ordinal.isNormal_iff_strictMono_and_continuous
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr < » a) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (b «expr < » a) -/
 #print Ordinal.enumOrd_isNormal_iff_isClosed /-
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
Diff
@@ -110,8 +110,8 @@ theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo
         exact H
       · exact Set.mem_singleton o
     · rintro ⟨t, ⟨a, ht⟩, hoa⟩
-      change dite _ _ _ = t at ht 
-      split_ifs at ht  with ha <;> subst ht
+      change dite _ _ _ = t at ht
+      split_ifs at ht with ha <;> subst ht
       · cases' Classical.choose_spec (h a.val a.prop ha) with H has
         rcases lt_or_eq_of_le (le_of_lt_succ hoa.2) with (hoa' | rfl)
         · exact has ⟨hoa.1, hoa'⟩
@@ -147,12 +147,12 @@ theorem mem_closure_iff_sup :
       · have : b < f (enum (· < ·) b (by rwa [type_lt])) :=
           by
           have := (hf (enum (· < ·) b (by rwa [type_lt]))).1.1
-          rwa [typein_enum] at this 
+          rwa [typein_enum] at this
         have : b ≤ sup.{u, u} f := this.le.trans (le_sup f _)
         exact this.not_lt hb.1.1
   · rintro ⟨ι, ⟨i⟩, f, hf, rfl⟩ t ht hat
     cases' eq_zero_or_pos (sup.{u, u} f) with ha₀ ha₀
-    · rw [ha₀] at hat 
+    · rw [ha₀] at hat
       use 0, hat
       convert hf i
       exact (sup_eq_zero_iff.1 ha₀ i).symm
@@ -225,9 +225,9 @@ theorem isClosed_iff_bsup :
 #print Ordinal.isLimit_of_mem_frontier /-
 theorem isLimit_of_mem_frontier (ha : a ∈ frontier s) : IsLimit a :=
   by
-  simp only [frontier_eq_closure_inter_closure, Set.mem_inter_iff, mem_closure_iff] at ha 
+  simp only [frontier_eq_closure_inter_closure, Set.mem_inter_iff, mem_closure_iff] at ha
   by_contra h
-  rw [← is_open_singleton_iff] at h 
+  rw [← is_open_singleton_iff] at h
   rcases ha.1 _ h rfl with ⟨b, hb, hb'⟩
   rcases ha.2 _ h rfl with ⟨c, hc, hc'⟩
   rw [Set.mem_singleton_iff] at *
@@ -246,7 +246,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
     rw [is_open_iff] at *
     intro o ho ho'
     rcases hs _ ho (h.is_limit ho') with ⟨a, ha, has⟩
-    rw [← IsNormal.bsup_eq.{u, u} h ho', lt_bsup] at ha 
+    rw [← IsNormal.bsup_eq.{u, u} h ho', lt_bsup] at ha
     rcases ha with ⟨b, hb, hab⟩
     exact
       ⟨b, hb, fun c hc =>
@@ -277,7 +277,7 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     congr; ext
     change ((enum_ord_order_iso hs) _).val = f x
     rw [OrderIso.apply_symm_apply]
-  · rw [is_closed_iff_bsup] at h 
+  · rw [is_closed_iff_bsup] at h
     suffices : enum_ord s a ≤ bsup.{u, u} a fun b (_ : b < a) => enum_ord s b;
     exact this.trans (bsup_le H)
     cases'
Diff
@@ -72,7 +72,51 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
 -/
 
 #print Ordinal.isOpen_iff /-
-theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by classical
+theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by
+  classical
+  refine' ⟨_, fun h => _⟩
+  · rw [isOpen_iff_generate_intervals]
+    intro h o hos ho
+    have ho₀ := Ordinal.pos_iff_ne_zero.2 ho.1
+    induction' h with t ht t u ht hu ht' hu' t ht H
+    · rcases ht with ⟨a, rfl | rfl⟩
+      · exact ⟨a, hos, fun b hb => hb.1⟩
+      · exact ⟨0, ho₀, fun b hb => hb.2.trans hos⟩
+    · exact ⟨0, ho₀, fun b _ => Set.mem_univ b⟩
+    · rcases ht' hos.1 with ⟨a, ha, ha'⟩
+      rcases hu' hos.2 with ⟨b, hb, hb'⟩
+      exact
+        ⟨_, max_lt ha hb, fun c hc =>
+          ⟨ha' ⟨(le_max_left a b).trans_lt hc.1, hc.2⟩,
+            hb' ⟨(le_max_right a b).trans_lt hc.1, hc.2⟩⟩⟩
+    · rcases hos with ⟨u, hu, hu'⟩
+      rcases H u hu hu' with ⟨a, ha, ha'⟩
+      exact ⟨a, ha, fun b hb => ⟨u, hu, ha' hb⟩⟩
+  · let f : s → Set Ordinal := fun o =>
+      if ho : is_limit o.val then Set.Ioo (Classical.choose (h o.val o.Prop ho)) (o + 1)
+      else {o.val}
+    have : ∀ a, IsOpen (f a) := fun a =>
+      by
+      change IsOpen (dite _ _ _)
+      split_ifs
+      · exact isOpen_Ioo
+      · rwa [is_open_singleton_iff]
+    convert isOpen_iUnion this
+    ext o
+    refine' ⟨fun ho => Set.mem_iUnion.2 ⟨⟨o, ho⟩, _⟩, _⟩
+    · split_ifs with ho'
+      · refine' ⟨_, lt_succ o⟩
+        cases' Classical.choose_spec (h o ho ho') with H
+        exact H
+      · exact Set.mem_singleton o
+    · rintro ⟨t, ⟨a, ht⟩, hoa⟩
+      change dite _ _ _ = t at ht 
+      split_ifs at ht  with ha <;> subst ht
+      · cases' Classical.choose_spec (h a.val a.prop ha) with H has
+        rcases lt_or_eq_of_le (le_of_lt_succ hoa.2) with (hoa' | rfl)
+        · exact has ⟨hoa.1, hoa'⟩
+        · exact a.prop
+      · convert a.prop
 #align ordinal.is_open_iff Ordinal.isOpen_iff
 -/
 
Diff
@@ -72,51 +72,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
 -/
 
 #print Ordinal.isOpen_iff /-
-theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by
-  classical
-  refine' ⟨_, fun h => _⟩
-  · rw [isOpen_iff_generate_intervals]
-    intro h o hos ho
-    have ho₀ := Ordinal.pos_iff_ne_zero.2 ho.1
-    induction' h with t ht t u ht hu ht' hu' t ht H
-    · rcases ht with ⟨a, rfl | rfl⟩
-      · exact ⟨a, hos, fun b hb => hb.1⟩
-      · exact ⟨0, ho₀, fun b hb => hb.2.trans hos⟩
-    · exact ⟨0, ho₀, fun b _ => Set.mem_univ b⟩
-    · rcases ht' hos.1 with ⟨a, ha, ha'⟩
-      rcases hu' hos.2 with ⟨b, hb, hb'⟩
-      exact
-        ⟨_, max_lt ha hb, fun c hc =>
-          ⟨ha' ⟨(le_max_left a b).trans_lt hc.1, hc.2⟩,
-            hb' ⟨(le_max_right a b).trans_lt hc.1, hc.2⟩⟩⟩
-    · rcases hos with ⟨u, hu, hu'⟩
-      rcases H u hu hu' with ⟨a, ha, ha'⟩
-      exact ⟨a, ha, fun b hb => ⟨u, hu, ha' hb⟩⟩
-  · let f : s → Set Ordinal := fun o =>
-      if ho : is_limit o.val then Set.Ioo (Classical.choose (h o.val o.Prop ho)) (o + 1)
-      else {o.val}
-    have : ∀ a, IsOpen (f a) := fun a =>
-      by
-      change IsOpen (dite _ _ _)
-      split_ifs
-      · exact isOpen_Ioo
-      · rwa [is_open_singleton_iff]
-    convert isOpen_iUnion this
-    ext o
-    refine' ⟨fun ho => Set.mem_iUnion.2 ⟨⟨o, ho⟩, _⟩, _⟩
-    · split_ifs with ho'
-      · refine' ⟨_, lt_succ o⟩
-        cases' Classical.choose_spec (h o ho ho') with H
-        exact H
-      · exact Set.mem_singleton o
-    · rintro ⟨t, ⟨a, ht⟩, hoa⟩
-      change dite _ _ _ = t at ht 
-      split_ifs at ht  with ha <;> subst ht
-      · cases' Classical.choose_spec (h a.val a.prop ha) with H has
-        rcases lt_or_eq_of_le (le_of_lt_succ hoa.2) with (hoa' | rfl)
-        · exact has ⟨hoa.1, hoa'⟩
-        · exact a.prop
-      · convert a.prop
+theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by classical
 #align ordinal.is_open_iff Ordinal.isOpen_iff
 -/
 
Diff
@@ -140,7 +140,7 @@ theorem mem_closure_iff_sup :
       refine'
         ⟨_, out_nonempty_iff_ne_zero.2 (Ordinal.pos_iff_ne_zero.1 ha₀), f, fun i => (hf i).2,
           le_antisymm (sup_le fun i => le_of_lt_succ (hf i).1.2) _⟩
-      by_contra' h
+      by_contra! h
       cases' H _ h with b hb
       rcases eq_or_lt_of_le (le_of_lt_succ hb.1.2) with (rfl | hba)
       · exact has hb.2
@@ -286,7 +286,7 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
       b hb
     rw [← hb]
     apply Hs.monotone
-    by_contra' hba
+    by_contra! hba
     apply (Hs (lt_succ b)).not_le
     rw [hb]
     exact le_bsup.{u, u} _ _ (ha.2 _ hba)
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Violeta Hernández Palacios. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Violeta Hernández Palacios
 -/
-import Mathbin.SetTheory.Ordinal.Arithmetic
-import Mathbin.Topology.Order.Basic
+import SetTheory.Ordinal.Arithmetic
+import Topology.Order.Basic
 
 #align_import set_theory.ordinal.topology from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
 
@@ -262,7 +262,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 #align ordinal.is_normal_iff_strict_mono_and_continuous Ordinal.isNormal_iff_strictMono_and_continuous
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr < » a) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (b «expr < » a) -/
 #print Ordinal.enumOrd_isNormal_iff_isClosed /-
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Violeta Hernández Palacios. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Violeta Hernández Palacios
-
-! This file was ported from Lean 3 source module set_theory.ordinal.topology
-! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.SetTheory.Ordinal.Arithmetic
 import Mathbin.Topology.Order.Basic
 
+#align_import set_theory.ordinal.topology from "leanprover-community/mathlib"@"23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6"
+
 /-!
 ### Topology of ordinals
 
@@ -265,7 +262,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 #align ordinal.is_normal_iff_strict_mono_and_continuous Ordinal.isNormal_iff_strictMono_and_continuous
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr < » a) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr < » a) -/
 #print Ordinal.enumOrd_isNormal_iff_isClosed /-
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
Diff
@@ -74,6 +74,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
 #align ordinal.is_open_singleton_iff Ordinal.isOpen_singleton_iff
 -/
 
+#print Ordinal.isOpen_iff /-
 theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by
   classical
   refine' ⟨_, fun h => _⟩
@@ -120,6 +121,7 @@ theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo
         · exact a.prop
       · convert a.prop
 #align ordinal.is_open_iff Ordinal.isOpen_iff
+-/
 
 #print Ordinal.mem_closure_iff_sup /-
 theorem mem_closure_iff_sup :
Diff
@@ -263,7 +263,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 #align ordinal.is_normal_iff_strict_mono_and_continuous Ordinal.isNormal_iff_strictMono_and_continuous
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr < » a) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (b «expr < » a) -/
 #print Ordinal.enumOrd_isNormal_iff_isClosed /-
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
Diff
@@ -59,7 +59,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
     · convert isOpen_gt' (1 : Ordinal)
       ext
       exact ordinal.lt_one_iff_zero.symm
-    · convert@isOpen_Ioo _ _ _ _ b (a + 1)
+    · convert @isOpen_Ioo _ _ _ _ b (a + 1)
       ext c
       refine' ⟨fun hc => _, _⟩
       · rw [Set.mem_singleton_iff.1 hc]
@@ -76,49 +76,49 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
 
 theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by
   classical
-    refine' ⟨_, fun h => _⟩
-    · rw [isOpen_iff_generate_intervals]
-      intro h o hos ho
-      have ho₀ := Ordinal.pos_iff_ne_zero.2 ho.1
-      induction' h with t ht t u ht hu ht' hu' t ht H
-      · rcases ht with ⟨a, rfl | rfl⟩
-        · exact ⟨a, hos, fun b hb => hb.1⟩
-        · exact ⟨0, ho₀, fun b hb => hb.2.trans hos⟩
-      · exact ⟨0, ho₀, fun b _ => Set.mem_univ b⟩
-      · rcases ht' hos.1 with ⟨a, ha, ha'⟩
-        rcases hu' hos.2 with ⟨b, hb, hb'⟩
-        exact
-          ⟨_, max_lt ha hb, fun c hc =>
-            ⟨ha' ⟨(le_max_left a b).trans_lt hc.1, hc.2⟩,
-              hb' ⟨(le_max_right a b).trans_lt hc.1, hc.2⟩⟩⟩
-      · rcases hos with ⟨u, hu, hu'⟩
-        rcases H u hu hu' with ⟨a, ha, ha'⟩
-        exact ⟨a, ha, fun b hb => ⟨u, hu, ha' hb⟩⟩
-    · let f : s → Set Ordinal := fun o =>
-        if ho : is_limit o.val then Set.Ioo (Classical.choose (h o.val o.Prop ho)) (o + 1)
-        else {o.val}
-      have : ∀ a, IsOpen (f a) := fun a =>
-        by
-        change IsOpen (dite _ _ _)
-        split_ifs
-        · exact isOpen_Ioo
-        · rwa [is_open_singleton_iff]
-      convert isOpen_iUnion this
-      ext o
-      refine' ⟨fun ho => Set.mem_iUnion.2 ⟨⟨o, ho⟩, _⟩, _⟩
-      · split_ifs with ho'
-        · refine' ⟨_, lt_succ o⟩
-          cases' Classical.choose_spec (h o ho ho') with H
-          exact H
-        · exact Set.mem_singleton o
-      · rintro ⟨t, ⟨a, ht⟩, hoa⟩
-        change dite _ _ _ = t at ht 
-        split_ifs  at ht  with ha <;> subst ht
-        · cases' Classical.choose_spec (h a.val a.prop ha) with H has
-          rcases lt_or_eq_of_le (le_of_lt_succ hoa.2) with (hoa' | rfl)
-          · exact has ⟨hoa.1, hoa'⟩
-          · exact a.prop
-        · convert a.prop
+  refine' ⟨_, fun h => _⟩
+  · rw [isOpen_iff_generate_intervals]
+    intro h o hos ho
+    have ho₀ := Ordinal.pos_iff_ne_zero.2 ho.1
+    induction' h with t ht t u ht hu ht' hu' t ht H
+    · rcases ht with ⟨a, rfl | rfl⟩
+      · exact ⟨a, hos, fun b hb => hb.1⟩
+      · exact ⟨0, ho₀, fun b hb => hb.2.trans hos⟩
+    · exact ⟨0, ho₀, fun b _ => Set.mem_univ b⟩
+    · rcases ht' hos.1 with ⟨a, ha, ha'⟩
+      rcases hu' hos.2 with ⟨b, hb, hb'⟩
+      exact
+        ⟨_, max_lt ha hb, fun c hc =>
+          ⟨ha' ⟨(le_max_left a b).trans_lt hc.1, hc.2⟩,
+            hb' ⟨(le_max_right a b).trans_lt hc.1, hc.2⟩⟩⟩
+    · rcases hos with ⟨u, hu, hu'⟩
+      rcases H u hu hu' with ⟨a, ha, ha'⟩
+      exact ⟨a, ha, fun b hb => ⟨u, hu, ha' hb⟩⟩
+  · let f : s → Set Ordinal := fun o =>
+      if ho : is_limit o.val then Set.Ioo (Classical.choose (h o.val o.Prop ho)) (o + 1)
+      else {o.val}
+    have : ∀ a, IsOpen (f a) := fun a =>
+      by
+      change IsOpen (dite _ _ _)
+      split_ifs
+      · exact isOpen_Ioo
+      · rwa [is_open_singleton_iff]
+    convert isOpen_iUnion this
+    ext o
+    refine' ⟨fun ho => Set.mem_iUnion.2 ⟨⟨o, ho⟩, _⟩, _⟩
+    · split_ifs with ho'
+      · refine' ⟨_, lt_succ o⟩
+        cases' Classical.choose_spec (h o ho ho') with H
+        exact H
+      · exact Set.mem_singleton o
+    · rintro ⟨t, ⟨a, ht⟩, hoa⟩
+      change dite _ _ _ = t at ht 
+      split_ifs at ht  with ha <;> subst ht
+      · cases' Classical.choose_spec (h a.val a.prop ha) with H has
+        rcases lt_or_eq_of_le (le_of_lt_succ hoa.2) with (hoa' | rfl)
+        · exact has ⟨hoa.1, hoa'⟩
+        · exact a.prop
+      · convert a.prop
 #align ordinal.is_open_iff Ordinal.isOpen_iff
 
 #print Ordinal.mem_closure_iff_sup /-
Diff
@@ -112,8 +112,8 @@ theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo
           exact H
         · exact Set.mem_singleton o
       · rintro ⟨t, ⟨a, ht⟩, hoa⟩
-        change dite _ _ _ = t at ht
-        split_ifs  at ht with ha <;> subst ht
+        change dite _ _ _ = t at ht 
+        split_ifs  at ht  with ha <;> subst ht
         · cases' Classical.choose_spec (h a.val a.prop ha) with H has
           rcases lt_or_eq_of_le (le_of_lt_succ hoa.2) with (hoa' | rfl)
           · exact has ⟨hoa.1, hoa'⟩
@@ -124,7 +124,7 @@ theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo
 #print Ordinal.mem_closure_iff_sup /-
 theorem mem_closure_iff_sup :
     a ∈ closure s ↔
-      ∃ (ι : Type u)(_ : Nonempty ι)(f : ι → Ordinal), (∀ i, f i ∈ s) ∧ sup.{u, u} f = a :=
+      ∃ (ι : Type u) (_ : Nonempty ι) (f : ι → Ordinal), (∀ i, f i ∈ s) ∧ sup.{u, u} f = a :=
   by
   refine' mem_closure_iff.trans ⟨fun h => _, _⟩
   · by_cases has : a ∈ s
@@ -148,12 +148,12 @@ theorem mem_closure_iff_sup :
       · have : b < f (enum (· < ·) b (by rwa [type_lt])) :=
           by
           have := (hf (enum (· < ·) b (by rwa [type_lt]))).1.1
-          rwa [typein_enum] at this
+          rwa [typein_enum] at this 
         have : b ≤ sup.{u, u} f := this.le.trans (le_sup f _)
         exact this.not_lt hb.1.1
   · rintro ⟨ι, ⟨i⟩, f, hf, rfl⟩ t ht hat
     cases' eq_zero_or_pos (sup.{u, u} f) with ha₀ ha₀
-    · rw [ha₀] at hat
+    · rw [ha₀] at hat 
       use 0, hat
       convert hf i
       exact (sup_eq_zero_iff.1 ha₀ i).symm
@@ -166,7 +166,7 @@ theorem mem_closure_iff_sup :
 
 #print Ordinal.mem_closed_iff_sup /-
 theorem mem_closed_iff_sup (hs : IsClosed s) :
-    a ∈ s ↔ ∃ (ι : Type u)(hι : Nonempty ι)(f : ι → Ordinal), (∀ i, f i ∈ s) ∧ sup.{u, u} f = a :=
+    a ∈ s ↔ ∃ (ι : Type u) (hι : Nonempty ι) (f : ι → Ordinal), (∀ i, f i ∈ s) ∧ sup.{u, u} f = a :=
   by rw [← mem_closure_iff_sup, hs.closure_eq]
 #align ordinal.mem_closed_iff_sup Ordinal.mem_closed_iff_sup
 -/
@@ -174,7 +174,7 @@ theorem mem_closed_iff_sup (hs : IsClosed s) :
 #print Ordinal.mem_closure_iff_bsup /-
 theorem mem_closure_iff_bsup :
     a ∈ closure s ↔
-      ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
+      ∃ (o : Ordinal) (ho : o ≠ 0) (f : ∀ a < o, Ordinal),
         (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a :=
   mem_closure_iff_sup.trans
     ⟨fun ⟨ι, ⟨i⟩, f, hf, ha⟩ =>
@@ -189,7 +189,7 @@ theorem mem_closure_iff_bsup :
 #print Ordinal.mem_closed_iff_bsup /-
 theorem mem_closed_iff_bsup (hs : IsClosed s) :
     a ∈ s ↔
-      ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
+      ∃ (o : Ordinal) (ho : o ≠ 0) (f : ∀ a < o, Ordinal),
         (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a :=
   by rw [← mem_closure_iff_bsup, hs.closure_eq]
 #align ordinal.mem_closed_iff_bsup Ordinal.mem_closed_iff_bsup
@@ -226,9 +226,9 @@ theorem isClosed_iff_bsup :
 #print Ordinal.isLimit_of_mem_frontier /-
 theorem isLimit_of_mem_frontier (ha : a ∈ frontier s) : IsLimit a :=
   by
-  simp only [frontier_eq_closure_inter_closure, Set.mem_inter_iff, mem_closure_iff] at ha
+  simp only [frontier_eq_closure_inter_closure, Set.mem_inter_iff, mem_closure_iff] at ha 
   by_contra h
-  rw [← is_open_singleton_iff] at h
+  rw [← is_open_singleton_iff] at h 
   rcases ha.1 _ h rfl with ⟨b, hb, hb'⟩
   rcases ha.2 _ h rfl with ⟨c, hc, hc'⟩
   rw [Set.mem_singleton_iff] at *
@@ -247,7 +247,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
     rw [is_open_iff] at *
     intro o ho ho'
     rcases hs _ ho (h.is_limit ho') with ⟨a, ha, has⟩
-    rw [← IsNormal.bsup_eq.{u, u} h ho', lt_bsup] at ha
+    rw [← IsNormal.bsup_eq.{u, u} h ho', lt_bsup] at ha 
     rcases ha with ⟨b, hb, hab⟩
     exact
       ⟨b, hb, fun c hc =>
@@ -275,10 +275,10 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
   · let g : ι → Ordinal.{u} := fun i => (enum_ord_order_iso hs).symm ⟨_, hf i⟩
     suffices enum_ord s (sup.{u, u} g) = sup.{u, u} f by rw [← this]; exact enum_ord_mem hs _
     rw [@IsNormal.sup.{u, u, u} _ h ι g hι]
-    congr ; ext
+    congr; ext
     change ((enum_ord_order_iso hs) _).val = f x
     rw [OrderIso.apply_symm_apply]
-  · rw [is_closed_iff_bsup] at h
+  · rw [is_closed_iff_bsup] at h 
     suffices : enum_ord s a ≤ bsup.{u, u} a fun b (_ : b < a) => enum_ord s b;
     exact this.trans (bsup_le H)
     cases'
Diff
@@ -171,6 +171,7 @@ theorem mem_closed_iff_sup (hs : IsClosed s) :
 #align ordinal.mem_closed_iff_sup Ordinal.mem_closed_iff_sup
 -/
 
+#print Ordinal.mem_closure_iff_bsup /-
 theorem mem_closure_iff_bsup :
     a ∈ closure s ↔
       ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
@@ -183,13 +184,16 @@ theorem mem_closure_iff_bsup :
       ⟨_, out_nonempty_iff_ne_zero.2 ho, familyOfBFamily o f, fun i => hf _ _, by
         rwa [sup_eq_bsup]⟩⟩
 #align ordinal.mem_closure_iff_bsup Ordinal.mem_closure_iff_bsup
+-/
 
+#print Ordinal.mem_closed_iff_bsup /-
 theorem mem_closed_iff_bsup (hs : IsClosed s) :
     a ∈ s ↔
       ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
         (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a :=
   by rw [← mem_closure_iff_bsup, hs.closure_eq]
 #align ordinal.mem_closed_iff_bsup Ordinal.mem_closed_iff_bsup
+-/
 
 #print Ordinal.isClosed_iff_sup /-
 theorem isClosed_iff_sup :
@@ -204,6 +208,7 @@ theorem isClosed_iff_sup :
 #align ordinal.is_closed_iff_sup Ordinal.isClosed_iff_sup
 -/
 
+#print Ordinal.isClosed_iff_bsup /-
 theorem isClosed_iff_bsup :
     IsClosed s ↔
       ∀ {o : Ordinal} (ho : o ≠ 0) (f : ∀ a < o, Ordinal),
@@ -216,6 +221,7 @@ theorem isClosed_iff_bsup :
     apply H (type_ne_zero_iff_nonempty.2 hι)
     exact fun i hi => hf _
 #align ordinal.is_closed_iff_bsup Ordinal.isClosed_iff_bsup
+-/
 
 #print Ordinal.isLimit_of_mem_frontier /-
 theorem isLimit_of_mem_frontier (ha : a ∈ frontier s) : IsLimit a :=
@@ -258,6 +264,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 -/
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr < » a) -/
+#print Ordinal.enumOrd_isNormal_iff_isClosed /-
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
   by
@@ -285,6 +292,7 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     rw [hb]
     exact le_bsup.{u, u} _ _ (ha.2 _ hba)
 #align ordinal.enum_ord_is_normal_iff_is_closed Ordinal.enumOrd_isNormal_iff_isClosed
+-/
 
 end Ordinal
 
Diff
@@ -74,12 +74,6 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
 #align ordinal.is_open_singleton_iff Ordinal.isOpen_singleton_iff
 -/
 
-/- warning: ordinal.is_open_iff -> Ordinal.isOpen_iff is a dubious translation:
-lean 3 declaration is
-  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsOpen.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s) (forall (o : Ordinal.{u1}), (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) o s) -> (Ordinal.IsLimit.{u1} o) -> (Exists.{succ (succ u1)} Ordinal.{u1} (fun (a : Ordinal.{u1}) => Exists.{0} (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) (fun (H : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) => HasSubset.Subset.{succ u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasSubset.{succ u1} Ordinal.{u1}) (Set.Ioo.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1}) a o) s))))
-but is expected to have type
-  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsOpen.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s) (forall (o : Ordinal.{u1}), (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) o s) -> (Ordinal.IsLimit.{u1} o) -> (Exists.{succ (succ u1)} Ordinal.{u1} (fun (a : Ordinal.{u1}) => And (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) (HasSubset.Subset.{succ u1} (Set.{succ u1} Ordinal.{u1}) (Set.instHasSubsetSet.{succ u1} Ordinal.{u1}) (Set.Ioo.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1}) a o) s))))
-Case conversion may be inaccurate. Consider using '#align ordinal.is_open_iff Ordinal.isOpen_iffₓ'. -/
 theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s := by
   classical
     refine' ⟨_, fun h => _⟩
@@ -177,12 +171,6 @@ theorem mem_closed_iff_sup (hs : IsClosed s) :
 #align ordinal.mem_closed_iff_sup Ordinal.mem_closed_iff_sup
 -/
 
-/- warning: ordinal.mem_closure_iff_bsup -> Ordinal.mem_closure_iff_bsup is a dubious translation:
-lean 3 declaration is
-  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) a (closure.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s)) (Exists.{succ (succ u1)} Ordinal.{u1} (fun {o : Ordinal.{u1}} => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a)))))
-but is expected to have type
-  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, Iff (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) a (closure.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s)) (Exists.{succ (succ u1)} Ordinal.{u1} (fun (o : Ordinal.{u1}) => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a)))))
-Case conversion may be inaccurate. Consider using '#align ordinal.mem_closure_iff_bsup Ordinal.mem_closure_iff_bsupₓ'. -/
 theorem mem_closure_iff_bsup :
     a ∈ closure s ↔
       ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
@@ -196,12 +184,6 @@ theorem mem_closure_iff_bsup :
         rwa [sup_eq_bsup]⟩⟩
 #align ordinal.mem_closure_iff_bsup Ordinal.mem_closure_iff_bsup
 
-/- warning: ordinal.mem_closed_iff_bsup -> Ordinal.mem_closed_iff_bsup is a dubious translation:
-lean 3 declaration is
-  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, (IsClosed.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s) -> (Iff (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) a s) (Exists.{succ (succ u1)} Ordinal.{u1} (fun {o : Ordinal.{u1}} => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a))))))
-but is expected to have type
-  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, (IsClosed.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s) -> (Iff (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) a s) (Exists.{succ (succ u1)} Ordinal.{u1} (fun (o : Ordinal.{u1}) => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a))))))
-Case conversion may be inaccurate. Consider using '#align ordinal.mem_closed_iff_bsup Ordinal.mem_closed_iff_bsupₓ'. -/
 theorem mem_closed_iff_bsup (hs : IsClosed s) :
     a ∈ s ↔
       ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
@@ -222,12 +204,6 @@ theorem isClosed_iff_sup :
 #align ordinal.is_closed_iff_sup Ordinal.isClosed_iff_sup
 -/
 
-/- warning: ordinal.is_closed_iff_bsup -> Ordinal.isClosed_iff_bsup is a dubious translation:
-lean 3 declaration is
-  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsClosed.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s) (forall {o : Ordinal.{u1}}, (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) -> (forall (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}), (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (f i hi) s) -> (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (Ordinal.bsup.{u1, u1} o f) s)))
-but is expected to have type
-  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsClosed.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s) (forall {o : Ordinal.{u1}}, (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) -> (forall (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}), (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (f i hi) s) -> (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (Ordinal.bsup.{u1, u1} o f) s)))
-Case conversion may be inaccurate. Consider using '#align ordinal.is_closed_iff_bsup Ordinal.isClosed_iff_bsupₓ'. -/
 theorem isClosed_iff_bsup :
     IsClosed s ↔
       ∀ {o : Ordinal} (ho : o ≠ 0) (f : ∀ a < o, Ordinal),
@@ -281,12 +257,6 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 #align ordinal.is_normal_iff_strict_mono_and_continuous Ordinal.isNormal_iff_strictMono_and_continuous
 -/
 
-/- warning: ordinal.enum_ord_is_normal_iff_is_closed -> Ordinal.enumOrd_isNormal_iff_isClosed is a dubious translation:
-lean 3 declaration is
-  forall {s : Set.{succ u1} Ordinal.{u1}}, (Set.Unbounded.{succ u1} Ordinal.{u1} (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1}))) s) -> (Iff (Ordinal.IsNormal.{u1, u1} (Ordinal.enumOrd.{u1} s)) (IsClosed.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s))
-but is expected to have type
-  forall {s : Set.{succ u1} Ordinal.{u1}}, (Set.Unbounded.{succ u1} Ordinal.{u1} (fun (x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20420 : Ordinal.{u1}) (x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20422 : Ordinal.{u1}) => LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20420 x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20422) s) -> (Iff (Ordinal.IsNormal.{u1, u1} (Ordinal.enumOrd.{u1} s)) (IsClosed.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s))
-Case conversion may be inaccurate. Consider using '#align ordinal.enum_ord_is_normal_iff_is_closed Ordinal.enumOrd_isNormal_iff_isClosedₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr < » a) -/
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
Diff
@@ -273,8 +273,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
   · rw [is_normal_iff_strict_mono_limit]
     rintro ⟨h, h'⟩
     refine' ⟨h, fun o ho a h => _⟩
-    suffices : o ∈ f ⁻¹' Set.Iic a
-    exact Set.mem_preimage.1 this
+    suffices : o ∈ f ⁻¹' Set.Iic a; exact Set.mem_preimage.1 this
     rw [mem_closed_iff_sup (IsClosed.preimage h' (@isClosed_Iic _ _ _ _ a))]
     exact
       ⟨_, out_nonempty_iff_ne_zero.2 ho.1, typein (· < ·), fun i => h _ (typein_lt_self i),
@@ -297,17 +296,13 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     ⟨fun h => is_closed_iff_sup.2 fun ι hι f hf => _, fun h =>
       (is_normal_iff_strict_mono_limit _).2 ⟨Hs, fun a ha o H => _⟩⟩
   · let g : ι → Ordinal.{u} := fun i => (enum_ord_order_iso hs).symm ⟨_, hf i⟩
-    suffices enum_ord s (sup.{u, u} g) = sup.{u, u} f
-      by
-      rw [← this]
-      exact enum_ord_mem hs _
+    suffices enum_ord s (sup.{u, u} g) = sup.{u, u} f by rw [← this]; exact enum_ord_mem hs _
     rw [@IsNormal.sup.{u, u, u} _ h ι g hι]
-    congr
-    ext
+    congr ; ext
     change ((enum_ord_order_iso hs) _).val = f x
     rw [OrderIso.apply_symm_apply]
   · rw [is_closed_iff_bsup] at h
-    suffices : enum_ord s a ≤ bsup.{u, u} a fun b (_ : b < a) => enum_ord s b
+    suffices : enum_ord s a ≤ bsup.{u, u} a fun b (_ : b < a) => enum_ord s b;
     exact this.trans (bsup_le H)
     cases'
       enum_ord_surjective hs _
Diff
@@ -76,7 +76,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
 
 /- warning: ordinal.is_open_iff -> Ordinal.isOpen_iff is a dubious translation:
 lean 3 declaration is
-  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsOpen.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s) (forall (o : Ordinal.{u1}), (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) o s) -> (Ordinal.IsLimit.{u1} o) -> (Exists.{succ (succ u1)} Ordinal.{u1} (fun (a : Ordinal.{u1}) => Exists.{0} (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) (fun (H : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) => HasSubset.Subset.{succ u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasSubset.{succ u1} Ordinal.{u1}) (Set.Ioo.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1}) a o) s))))
+  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsOpen.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s) (forall (o : Ordinal.{u1}), (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) o s) -> (Ordinal.IsLimit.{u1} o) -> (Exists.{succ (succ u1)} Ordinal.{u1} (fun (a : Ordinal.{u1}) => Exists.{0} (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) (fun (H : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) => HasSubset.Subset.{succ u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasSubset.{succ u1} Ordinal.{u1}) (Set.Ioo.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1}) a o) s))))
 but is expected to have type
   forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsOpen.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s) (forall (o : Ordinal.{u1}), (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) o s) -> (Ordinal.IsLimit.{u1} o) -> (Exists.{succ (succ u1)} Ordinal.{u1} (fun (a : Ordinal.{u1}) => And (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) (HasSubset.Subset.{succ u1} (Set.{succ u1} Ordinal.{u1}) (Set.instHasSubsetSet.{succ u1} Ordinal.{u1}) (Set.Ioo.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1}) a o) s))))
 Case conversion may be inaccurate. Consider using '#align ordinal.is_open_iff Ordinal.isOpen_iffₓ'. -/
@@ -177,7 +177,12 @@ theorem mem_closed_iff_sup (hs : IsClosed s) :
 #align ordinal.mem_closed_iff_sup Ordinal.mem_closed_iff_sup
 -/
 
-#print Ordinal.mem_closure_iff_bsup /-
+/- warning: ordinal.mem_closure_iff_bsup -> Ordinal.mem_closure_iff_bsup is a dubious translation:
+lean 3 declaration is
+  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, Iff (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) a (closure.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s)) (Exists.{succ (succ u1)} Ordinal.{u1} (fun {o : Ordinal.{u1}} => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a)))))
+but is expected to have type
+  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, Iff (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) a (closure.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s)) (Exists.{succ (succ u1)} Ordinal.{u1} (fun (o : Ordinal.{u1}) => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a)))))
+Case conversion may be inaccurate. Consider using '#align ordinal.mem_closure_iff_bsup Ordinal.mem_closure_iff_bsupₓ'. -/
 theorem mem_closure_iff_bsup :
     a ∈ closure s ↔
       ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
@@ -190,16 +195,19 @@ theorem mem_closure_iff_bsup :
       ⟨_, out_nonempty_iff_ne_zero.2 ho, familyOfBFamily o f, fun i => hf _ _, by
         rwa [sup_eq_bsup]⟩⟩
 #align ordinal.mem_closure_iff_bsup Ordinal.mem_closure_iff_bsup
--/
 
-#print Ordinal.mem_closed_iff_bsup /-
+/- warning: ordinal.mem_closed_iff_bsup -> Ordinal.mem_closed_iff_bsup is a dubious translation:
+lean 3 declaration is
+  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, (IsClosed.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s) -> (Iff (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) a s) (Exists.{succ (succ u1)} Ordinal.{u1} (fun {o : Ordinal.{u1}} => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a))))))
+but is expected to have type
+  forall {s : Set.{succ u1} Ordinal.{u1}} {a : Ordinal.{u1}}, (IsClosed.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s) -> (Iff (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) a s) (Exists.{succ (succ u1)} Ordinal.{u1} (fun (o : Ordinal.{u1}) => Exists.{0} (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) (fun (ho : Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) => Exists.{succ (succ u1)} (forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) (fun (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}) => And (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (f i hi) s) (Eq.{succ (succ u1)} Ordinal.{u1} (Ordinal.bsup.{u1, u1} o f) a))))))
+Case conversion may be inaccurate. Consider using '#align ordinal.mem_closed_iff_bsup Ordinal.mem_closed_iff_bsupₓ'. -/
 theorem mem_closed_iff_bsup (hs : IsClosed s) :
     a ∈ s ↔
       ∃ (o : Ordinal)(ho : o ≠ 0)(f : ∀ a < o, Ordinal),
         (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a :=
   by rw [← mem_closure_iff_bsup, hs.closure_eq]
 #align ordinal.mem_closed_iff_bsup Ordinal.mem_closed_iff_bsup
--/
 
 #print Ordinal.isClosed_iff_sup /-
 theorem isClosed_iff_sup :
@@ -214,7 +222,12 @@ theorem isClosed_iff_sup :
 #align ordinal.is_closed_iff_sup Ordinal.isClosed_iff_sup
 -/
 
-#print Ordinal.isClosed_iff_bsup /-
+/- warning: ordinal.is_closed_iff_bsup -> Ordinal.isClosed_iff_bsup is a dubious translation:
+lean 3 declaration is
+  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsClosed.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s) (forall {o : Ordinal.{u1}}, (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (OfNat.mk.{succ u1} Ordinal.{u1} 0 (Zero.zero.{succ u1} Ordinal.{u1} Ordinal.hasZero.{u1})))) -> (forall (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}), (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (f i hi) s) -> (Membership.Mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.hasMem.{succ u1} Ordinal.{u1}) (Ordinal.bsup.{u1, u1} o f) s)))
+but is expected to have type
+  forall {s : Set.{succ u1} Ordinal.{u1}}, Iff (IsClosed.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s) (forall {o : Ordinal.{u1}}, (Ne.{succ (succ u1)} Ordinal.{u1} o (OfNat.ofNat.{succ u1} Ordinal.{u1} 0 (Zero.toOfNat0.{succ u1} Ordinal.{u1} Ordinal.zero.{u1}))) -> (forall (f : forall (a : Ordinal.{u1}), (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) a o) -> Ordinal.{u1}), (forall (i : Ordinal.{u1}) (hi : LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) i o), Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (f i hi) s) -> (Membership.mem.{succ u1, succ u1} Ordinal.{u1} (Set.{succ u1} Ordinal.{u1}) (Set.instMembershipSet.{succ u1} Ordinal.{u1}) (Ordinal.bsup.{u1, u1} o f) s)))
+Case conversion may be inaccurate. Consider using '#align ordinal.is_closed_iff_bsup Ordinal.isClosed_iff_bsupₓ'. -/
 theorem isClosed_iff_bsup :
     IsClosed s ↔
       ∀ {o : Ordinal} (ho : o ≠ 0) (f : ∀ a < o, Ordinal),
@@ -227,7 +240,6 @@ theorem isClosed_iff_bsup :
     apply H (type_ne_zero_iff_nonempty.2 hι)
     exact fun i hi => hf _
 #align ordinal.is_closed_iff_bsup Ordinal.isClosed_iff_bsup
--/
 
 #print Ordinal.isLimit_of_mem_frontier /-
 theorem isLimit_of_mem_frontier (ha : a ∈ frontier s) : IsLimit a :=
@@ -270,8 +282,13 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 #align ordinal.is_normal_iff_strict_mono_and_continuous Ordinal.isNormal_iff_strictMono_and_continuous
 -/
 
+/- warning: ordinal.enum_ord_is_normal_iff_is_closed -> Ordinal.enumOrd_isNormal_iff_isClosed is a dubious translation:
+lean 3 declaration is
+  forall {s : Set.{succ u1} Ordinal.{u1}}, (Set.Unbounded.{succ u1} Ordinal.{u1} (LT.lt.{succ u1} Ordinal.{u1} (Preorder.toHasLt.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1}))) s) -> (Iff (Ordinal.IsNormal.{u1, u1} (Ordinal.enumOrd.{u1} s)) (IsClosed.{succ u1} Ordinal.{u1} Ordinal.topologicalSpace.{u1} s))
+but is expected to have type
+  forall {s : Set.{succ u1} Ordinal.{u1}}, (Set.Unbounded.{succ u1} Ordinal.{u1} (fun (x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20420 : Ordinal.{u1}) (x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20422 : Ordinal.{u1}) => LT.lt.{succ u1} Ordinal.{u1} (Preorder.toLT.{succ u1} Ordinal.{u1} (PartialOrder.toPreorder.{succ u1} Ordinal.{u1} Ordinal.partialOrder.{u1})) x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20420 x._@.Mathlib.SetTheory.Ordinal.Topology._hyg.20422) s) -> (Iff (Ordinal.IsNormal.{u1, u1} (Ordinal.enumOrd.{u1} s)) (IsClosed.{succ u1} Ordinal.{u1} Ordinal.instTopologicalSpaceOrdinal.{u1} s))
+Case conversion may be inaccurate. Consider using '#align ordinal.enum_ord_is_normal_iff_is_closed Ordinal.enumOrd_isNormal_iff_isClosedₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr < » a) -/
-#print Ordinal.enumOrd_isNormal_iff_isClosed /-
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
   by
@@ -303,7 +320,6 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     rw [hb]
     exact le_bsup.{u, u} _ _ (ha.2 _ hba)
 #align ordinal.enum_ord_is_normal_iff_is_closed Ordinal.enumOrd_isNormal_iff_isClosed
--/
 
 end Ordinal
 
Diff
@@ -109,9 +109,9 @@ theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo
         split_ifs
         · exact isOpen_Ioo
         · rwa [is_open_singleton_iff]
-      convert isOpen_unionᵢ this
+      convert isOpen_iUnion this
       ext o
-      refine' ⟨fun ho => Set.mem_unionᵢ.2 ⟨⟨o, ho⟩, _⟩, _⟩
+      refine' ⟨fun ho => Set.mem_iUnion.2 ⟨⟨o, ho⟩, _⟩, _⟩
       · split_ifs with ho'
         · refine' ⟨_, lt_succ o⟩
           cases' Classical.choose_spec (h o ho ho') with H
Diff
@@ -59,7 +59,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a :=
     · convert isOpen_gt' (1 : Ordinal)
       ext
       exact ordinal.lt_one_iff_zero.symm
-    · convert @isOpen_Ioo _ _ _ _ b (a + 1)
+    · convert@isOpen_Ioo _ _ _ _ b (a + 1)
       ext c
       refine' ⟨fun hc => _, _⟩
       · rw [Set.mem_singleton_iff.1 hc]
Diff
@@ -270,7 +270,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
 #align ordinal.is_normal_iff_strict_mono_and_continuous Ordinal.isNormal_iff_strictMono_and_continuous
 -/
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (b «expr < » a) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (b «expr < » a) -/
 #print Ordinal.enumOrd_isNormal_iff_isClosed /-
 theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     IsNormal (enumOrd s) ↔ IsClosed s :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Violeta Hernández Palacios
 
 ! This file was ported from Lean 3 source module set_theory.ordinal.topology
-! leanprover-community/mathlib commit e2d165c81d899f79a6f112fa38f2daaa5f6a250d
+! leanprover-community/mathlib commit 23aa88e32dcc9d2a24cca7bc23268567ed4cd7d6
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Topology.Order.Basic
 /-!
 ### Topology of ordinals
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 We prove some miscellaneous results involving the order topology of ordinals.
 
 ### Main results

Changes in mathlib4

mathlib3
mathlib4
refactor(Topology/Order/Basic): split up large file (#11992)

This splits up the file Mathlib/Topology/Order/Basic.lean (currently > 2000 lines) into several smaller files.

Diff
@@ -5,7 +5,7 @@ Authors: Violeta Hernández Palacios
 -/
 import Mathlib.SetTheory.Ordinal.Arithmetic
 import Mathlib.Tactic.TFAE
-import Mathlib.Topology.Order.Basic
+import Mathlib.Topology.Order.Monotone
 
 #align_import set_theory.ordinal.topology from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
 
chore: classify todo porting notes (#11216)

Classifies by adding issue number #11215 to porting notes claiming "TODO".

Diff
@@ -53,7 +53,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a := by
     · exact (ha ha').elim
 #align ordinal.is_open_singleton_iff Ordinal.isOpen_singleton_iff
 
--- Porting note: todo: generalize to a `SuccOrder`
+-- Porting note (#11215): TODO: generalize to a `SuccOrder`
 theorem nhds_right' (a : Ordinal) : 𝓝[>] a = ⊥ := (covBy_succ a).nhdsWithin_Ioi
 
 -- todo: generalize to a `SuccOrder`
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -53,7 +53,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a := by
     · exact (ha ha').elim
 #align ordinal.is_open_singleton_iff Ordinal.isOpen_singleton_iff
 
--- porting note: todo: generalize to a `SuccOrder`
+-- Porting note: todo: generalize to a `SuccOrder`
 theorem nhds_right' (a : Ordinal) : 𝓝[>] a = ⊥ := (covBy_succ a).nhdsWithin_Ioi
 
 -- todo: generalize to a `SuccOrder`
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
@@ -198,8 +198,7 @@ theorem isNormal_iff_strictMono_and_continuous (f : Ordinal.{u} → Ordinal.{u})
   · rw [isNormal_iff_strictMono_limit]
     rintro ⟨h, h'⟩
     refine' ⟨h, fun o ho a h => _⟩
-    suffices : o ∈ f ⁻¹' Set.Iic a
-    exact Set.mem_preimage.1 this
+    suffices o ∈ f ⁻¹' Set.Iic a from Set.mem_preimage.1 this
     rw [mem_closed_iff_sup (IsClosed.preimage h' (@isClosed_Iic _ _ _ _ a))]
     exact
       ⟨_, out_nonempty_iff_ne_zero.2 ho.1, typein (· < ·), fun i => h _ (typein_lt_self i),
@@ -222,8 +221,8 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     change ((enumOrdOrderIso hs) _).val = f x
     rw [OrderIso.apply_symm_apply]
   · rw [isClosed_iff_bsup] at h
-    suffices : enumOrd s a ≤ bsup.{u, u} a fun b (_ : b < a) => enumOrd s b
-    exact this.trans (bsup_le H)
+    suffices enumOrd s a ≤ bsup.{u, u} a fun b (_ : b < a) => enumOrd s b from
+      this.trans (bsup_le H)
     cases' enumOrd_surjective hs _
         (h ha.1 (fun b _ => enumOrd s b) fun b _ => enumOrd_mem hs b) with
       b hb
chore(Covby): rename Covby to CovBy (#9578)

Rename

  • CovbyCovBy, WcovbyWCovBy
  • *covby**covBy*
  • wcovby.finset_valWCovBy.finset_val, wcovby.finset_coeWCovBy.finset_coe
  • Covby.is_coatomCovBy.isCoatom
Diff
@@ -54,7 +54,7 @@ theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ ¬IsLimit a := by
 #align ordinal.is_open_singleton_iff Ordinal.isOpen_singleton_iff
 
 -- porting note: todo: generalize to a `SuccOrder`
-theorem nhds_right' (a : Ordinal) : 𝓝[>] a = ⊥ := (covby_succ a).nhdsWithin_Ioi
+theorem nhds_right' (a : Ordinal) : 𝓝[>] a = ⊥ := (covBy_succ a).nhdsWithin_Ioi
 
 -- todo: generalize to a `SuccOrder`
 theorem nhds_left'_eq_nhds_ne (a : Ordinal) : 𝓝[<] a = 𝓝[≠] a := by
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -96,7 +96,7 @@ theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
     exact id
   tfae_have 2 → 3
   · intro h
-    cases' (s ∩ Iic a).eq_empty_or_nonempty with he hne
+    rcases (s ∩ Iic a).eq_empty_or_nonempty with he | hne
     · simp [he] at h
     · refine ⟨hne, (isLUB_of_mem_closure ?_ h).csSup_eq hne⟩
       exact fun x hx => hx.2
chore: rename by_contra' to by_contra! (#8797)

To fit with the "please try harder" convention of ! tactics.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -229,7 +229,7 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
       b hb
     rw [← hb]
     apply Hs.monotone
-    by_contra' hba
+    by_contra! hba
     apply (Hs (lt_succ b)).not_le
     rw [hb]
     exact le_bsup.{u, u} _ _ (ha.2 _ hba)
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 Violeta Hernández Palacios. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Violeta Hernández Palacios
-
-! This file was ported from Lean 3 source module set_theory.ordinal.topology
-! leanprover-community/mathlib commit 740acc0e6f9adf4423f92a485d0456fc271482da
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.SetTheory.Ordinal.Arithmetic
 import Mathlib.Tactic.TFAE
 import Mathlib.Topology.Order.Basic
 
+#align_import set_theory.ordinal.topology from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
+
 /-!
 ### Topology of ordinals
 
feat(Data.Set.Basic/Data.Finset.Basic): rename insert_subset (#5450)

Currently, (for both Set and Finset) insert_subset is an iff lemma stating that insert a s ⊆ t if and only if a ∈ t and s ⊆ t. For both types, this PR renames this lemma to insert_subset_iff, and adds an insert_subset lemma that gives the implication just in the reverse direction : namely theorem insert_subset (ha : a ∈ t) (hs : s ⊆ t) : insert a s ⊆ t .

This both aligns the naming with union_subset and union_subset_iff, and removes the need for the awkward insert_subset.mpr ⟨_,_⟩ idiom. It touches a lot of files (too many to list), but in a trivial way.

Diff
@@ -81,7 +81,7 @@ theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo
   by_cases ho' : IsLimit o
   · simp only [(nhdsBasis_Ioc ho'.1).mem_iff, ho', true_implies]
     refine exists_congr fun a => and_congr_right fun ha => ?_
-    simp only [← Set.Ioo_insert_right ha, Set.insert_subset, ho, true_and]
+    simp only [← Set.Ioo_insert_right ha, Set.insert_subset_iff, ho, true_and]
   · simp [nhds_eq_pure.2 ho', ho, ho']
 #align ordinal.is_open_iff Ordinal.isOpen_iff
 
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -89,8 +89,8 @@ open List Set in
 theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
     TFAE [a ∈ closure s,
       a ∈ closure (s ∩ Iic a),
-      (s ∩ Iic a).Nonempty ∧ supₛ (s ∩ Iic a) = a,
-      ∃ t, t ⊆ s ∧ t.Nonempty ∧ BddAbove t ∧ supₛ t = a,
+      (s ∩ Iic a).Nonempty ∧ sSup (s ∩ Iic a) = a,
+      ∃ t, t ⊆ s ∧ t.Nonempty ∧ BddAbove t ∧ sSup t = a,
       ∃ (o : Ordinal.{u}), o ≠ 0 ∧ ∃ (f : ∀ x < o, Ordinal),
         (∀ x hx, f x hx ∈ s) ∧ bsup.{u, u} o f = a,
       ∃ (ι : Type u), Nonempty ι ∧ ∃ f : ι → Ordinal, (∀ i, f i ∈ s) ∧ sup.{u, u} f = a] := by
@@ -101,19 +101,19 @@ theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
   · intro h
     cases' (s ∩ Iic a).eq_empty_or_nonempty with he hne
     · simp [he] at h
-    · refine ⟨hne, (isLUB_of_mem_closure ?_ h).csupₛ_eq hne⟩
+    · refine ⟨hne, (isLUB_of_mem_closure ?_ h).csSup_eq hne⟩
       exact fun x hx => hx.2
   tfae_have 3 → 4
   · exact fun h => ⟨_, inter_subset_left _ _, h.1, bddAbove_Iic.mono (inter_subset_right _ _), h.2⟩
   tfae_have 4 → 5
   · rintro ⟨t, hts, hne, hbdd, rfl⟩
-    have hlub : IsLUB t (supₛ t) := isLUB_csupₛ hne hbdd
+    have hlub : IsLUB t (sSup t) := isLUB_csSup hne hbdd
     let ⟨y, hyt⟩ := hne
     classical
-      refine ⟨succ (supₛ t), succ_ne_zero _, fun x _ => if x ∈ t then x else y, fun x _ => ?_, ?_⟩
+      refine ⟨succ (sSup t), succ_ne_zero _, fun x _ => if x ∈ t then x else y, fun x _ => ?_, ?_⟩
       · simp only
         split_ifs with h <;> exact hts ‹_›
-      · refine le_antisymm (bsup_le fun x _ => ?_) (csupₛ_le hne fun x hx => ?_)
+      · refine le_antisymm (bsup_le fun x _ => ?_) (csSup_le hne fun x hx => ?_)
         · split_ifs <;> exact hlub.1 ‹_›
         · refine (if_pos hx).symm.trans_le (le_bsup _ _ <| (hlub.1 hx).trans_lt (lt_succ _))
   tfae_have 5 → 6
@@ -121,8 +121,8 @@ theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
     exact ⟨_, out_nonempty_iff_ne_zero.2 h₀, familyOfBFamily o f, fun _ => hfs _ _, rfl⟩
   tfae_have 6 → 1
   · rintro ⟨ι, hne, f, hfs, rfl⟩
-    rw [sup, supᵢ]
-    exact closure_mono (range_subset_iff.2 hfs) <| csupₛ_mem_closure (range_nonempty f)
+    rw [sup, iSup]
+    exact closure_mono (range_subset_iff.2 hfs) <| csSup_mem_closure (range_nonempty f)
       (bddAbove_range.{u, u} f)
   tfae_finish
 
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -216,8 +216,7 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
     ⟨fun h => isClosed_iff_sup.2 fun {ι} hι f hf => _, fun h =>
       (isNormal_iff_strictMono_limit _).2 ⟨Hs, fun a ha o H => _⟩⟩
   · let g : ι → Ordinal.{u} := fun i => (enumOrdOrderIso hs).symm ⟨_, hf i⟩
-    suffices enumOrd s (sup.{u, u} g) = sup.{u, u} f
-      by
+    suffices enumOrd s (sup.{u, u} g) = sup.{u, u} f by
       rw [← this]
       exact enumOrd_mem hs _
     rw [@IsNormal.sup.{u, u, u} _ h ι g hι]
chore: restore some tfae proofs (#2959)
Diff
@@ -9,6 +9,7 @@ Authors: Violeta Hernández Palacios
 ! if you have ported upstream changes.
 -/
 import Mathlib.SetTheory.Ordinal.Arithmetic
+import Mathlib.Tactic.TFAE
 import Mathlib.Topology.Order.Basic
 
 /-!
@@ -93,15 +94,18 @@ theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
       ∃ (o : Ordinal.{u}), o ≠ 0 ∧ ∃ (f : ∀ x < o, Ordinal),
         (∀ x hx, f x hx ∈ s) ∧ bsup.{u, u} o f = a,
       ∃ (ι : Type u), Nonempty ι ∧ ∃ f : ι → Ordinal, (∀ i, f i ∈ s) ∧ sup.{u, u} f = a] := by
-  apply_rules [tfae_of_cycle, Chain.cons, Chain.nil]
+  tfae_have 1 → 2
   · simp only [mem_closure_iff_nhdsWithin_neBot, inter_comm s, nhdsWithin_inter', nhds_left_eq_nhds]
     exact id
+  tfae_have 2 → 3
   · intro h
     cases' (s ∩ Iic a).eq_empty_or_nonempty with he hne
     · simp [he] at h
     · refine ⟨hne, (isLUB_of_mem_closure ?_ h).csupₛ_eq hne⟩
       exact fun x hx => hx.2
+  tfae_have 3 → 4
   · exact fun h => ⟨_, inter_subset_left _ _, h.1, bddAbove_Iic.mono (inter_subset_right _ _), h.2⟩
+  tfae_have 4 → 5
   · rintro ⟨t, hts, hne, hbdd, rfl⟩
     have hlub : IsLUB t (supₛ t) := isLUB_csupₛ hne hbdd
     let ⟨y, hyt⟩ := hne
@@ -112,12 +116,15 @@ theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
       · refine le_antisymm (bsup_le fun x _ => ?_) (csupₛ_le hne fun x hx => ?_)
         · split_ifs <;> exact hlub.1 ‹_›
         · refine (if_pos hx).symm.trans_le (le_bsup _ _ <| (hlub.1 hx).trans_lt (lt_succ _))
+  tfae_have 5 → 6
   · rintro ⟨o, h₀, f, hfs, rfl⟩
     exact ⟨_, out_nonempty_iff_ne_zero.2 h₀, familyOfBFamily o f, fun _ => hfs _ _, rfl⟩
+  tfae_have 6 → 1
   · rintro ⟨ι, hne, f, hfs, rfl⟩
     rw [sup, supᵢ]
     exact closure_mono (range_subset_iff.2 hfs) <| csupₛ_mem_closure (range_nonempty f)
       (bddAbove_range.{u, u} f)
+  tfae_finish
 
 theorem mem_closure_iff_sup :
     a ∈ closure s ↔
@@ -233,4 +240,3 @@ theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
 #align ordinal.enum_ord_is_normal_iff_is_closed Ordinal.enumOrd_isNormal_iff_isClosed
 
 end Ordinal
-
feat: port SetTheory.Ordinal.Topology (#2342)

Dependencies 8 + 350

351 files ported (97.8%)
154584 lines ported (96.9%)
Show graph

The unported dependencies are