Theorem: Ordinal.isNormal_iff_strictMono_and_continuous
File: Mathlib/SetTheory/Ordinal/Topology.lean

tactic: refine ⟨fun h => ⟨h.strictMono, ?_⟩, ?_⟩
state_before: s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
⊢ IsNormal f ↔ StrictMono f ∧ Continuous f
state_after: case refine_1
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
⊢ Continuous f

case refine_2
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
⊢ StrictMono f ∧ Continuous f → IsNormal f

tactic: rw [continuous_def]
state_before: case refine_1
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
⊢ Continuous f
state_after: case refine_1
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
⊢ ∀ (s : Set Ordinal.{u}), IsOpen s → IsOpen (f ⁻¹' s)

tactic: intro s hs
state_before: case refine_1
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
⊢ ∀ (s : Set Ordinal.{u}), IsOpen s → IsOpen (f ⁻¹' s)
state_after: case refine_1
s✝ : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : IsOpen s
⊢ IsOpen (f ⁻¹' s)

tactic: rw [isOpen_iff] at *
state_before: case refine_1
s✝ : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : IsOpen s
⊢ IsOpen (f ⁻¹' s)
state_after: case refine_1
s✝ : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
⊢ ∀ o ∈ f ⁻¹' s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s

tactic: intro o ho ho'
state_before: case refine_1
s✝ : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
⊢ ∀ o ∈ f ⁻¹' s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s
state_after: case refine_1
s✝ : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s

tactic: rcases hs _ ho (h.isLimit ho') with ⟨a, ha, has⟩
state_before: case refine_1
s✝ : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s
state_after: case refine_1.intro.intro
s✝ : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
a : Ordinal.{u}
ha : a < f o
has : Set.Ioo a (f o) ⊆ s
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s

tactic: rw [← IsNormal.bsup_eq.{u, u} h ho', lt_bsup] at ha
state_before: case refine_1.intro.intro
s✝ : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
a : Ordinal.{u}
ha : a < f o
has : Set.Ioo a (f o) ⊆ s
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s
state_after: case refine_1.intro.intro
s✝ : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
a : Ordinal.{u}
ha : ∃ i, ∃ (_ : i < o), a < f i
has : Set.Ioo a (f o) ⊆ s
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s

tactic: rcases ha with ⟨b, hb, hab⟩
state_before: case refine_1.intro.intro
s✝ : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
a : Ordinal.{u}
ha : ∃ i, ∃ (_ : i < o), a < f i
has : Set.Ioo a (f o) ⊆ s
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s
state_after: case refine_1.intro.intro.intro.intro
s✝ : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
a : Ordinal.{u}
has : Set.Ioo a (f o) ⊆ s
b : Ordinal.{u}
hb : b < o
hab : a < f b
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s

tactic: exact
  ⟨b, hb, fun c hc =>
    Set.mem_preimage.2 (has ⟨hab.trans (h.strictMono hc.1), h.strictMono hc.2⟩)⟩
state_before: case refine_1.intro.intro.intro.intro
s✝ : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : IsNormal f
s : Set Ordinal.{u}
hs : ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s
o : Ordinal.{u}
ho : o ∈ f ⁻¹' s
ho' : o.IsLimit
a : Ordinal.{u}
has : Set.Ioo a (f o) ⊆ s
b : Ordinal.{u}
hb : b < o
hab : a < f b
⊢ ∃ a < o, Set.Ioo a o ⊆ f ⁻¹' s
state_after: no goals

tactic: rw [isNormal_iff_strictMono_limit]
state_before: case refine_2
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
⊢ StrictMono f ∧ Continuous f → IsNormal f
state_after: case refine_2
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
⊢ StrictMono f ∧ Continuous f →
    StrictMono f ∧ ∀ (o : Ordinal.{u}), o.IsLimit → ∀ (a : Ordinal.{u}), (∀ b < o, f b ≤ a) → f o ≤ a

tactic: rintro ⟨h, h'⟩
state_before: case refine_2
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
⊢ StrictMono f ∧ Continuous f →
    StrictMono f ∧ ∀ (o : Ordinal.{u}), o.IsLimit → ∀ (a : Ordinal.{u}), (∀ b < o, f b ≤ a) → f o ≤ a
state_after: case refine_2.intro
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : StrictMono f
h' : Continuous f
⊢ StrictMono f ∧ ∀ (o : Ordinal.{u}), o.IsLimit → ∀ (a : Ordinal.{u}), (∀ b < o, f b ≤ a) → f o ≤ a

tactic: refine ⟨h, fun o ho a h => ?_⟩
state_before: case refine_2.intro
s : Set Ordinal.{u}
a : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h : StrictMono f
h' : Continuous f
⊢ StrictMono f ∧ ∀ (o : Ordinal.{u}), o.IsLimit → ∀ (a : Ordinal.{u}), (∀ b < o, f b ≤ a) → f o ≤ a
state_after: case refine_2.intro
s : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h✝ : StrictMono f
h' : Continuous f
o : Ordinal.{u}
ho : o.IsLimit
a : Ordinal.{u}
h : ∀ b < o, f b ≤ a
⊢ f o ≤ a

tactic: suffices o ∈ f ⁻¹' Set.Iic a from Set.mem_preimage.1 this
state_before: case refine_2.intro
s : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h✝ : StrictMono f
h' : Continuous f
o : Ordinal.{u}
ho : o.IsLimit
a : Ordinal.{u}
h : ∀ b < o, f b ≤ a
⊢ f o ≤ a
state_after: case refine_2.intro
s : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h✝ : StrictMono f
h' : Continuous f
o : Ordinal.{u}
ho : o.IsLimit
a : Ordinal.{u}
h : ∀ b < o, f b ≤ a
⊢ o ∈ f ⁻¹' Set.Iic a

tactic: rw [mem_closed_iff_sup (IsClosed.preimage h' (@isClosed_Iic _ _ _ _ a))]
state_before: case refine_2.intro
s : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h✝ : StrictMono f
h' : Continuous f
o : Ordinal.{u}
ho : o.IsLimit
a : Ordinal.{u}
h : ∀ b < o, f b ≤ a
⊢ o ∈ f ⁻¹' Set.Iic a
state_after: case refine_2.intro
s : Set Ordinal.{u}
a✝ : Ordinal.{u}
f : Ordinal.{u} → Ordinal.{u}
h✝ : StrictMono f
h' : Continuous f
o : Ordinal.{u}
ho : o.IsLimit
a : Ordinal.{u}
h : ∀ b < o, f b ≤ a
⊢ ∃ ι, ∃ (_ : Nonempty ι), ∃ f_1, (∀ (i : ι), f_1 i ∈ f ⁻¹' Set.Iic a) ∧ sup f_1 = o