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

tactic: refine' ⟨fun h => ⟨h.strictMono, _⟩, _⟩
state_before: s : Set Ordinal
a : Ordinal
f : Ordinal → Ordinal
⊢ IsNormal f ↔ StrictMono f ∧ Continuous f

tactic: rw [continuous_def]
state_before: case refine'_1
s : Set Ordinal
a : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
⊢ Continuous f

tactic: intro s hs
state_before: case refine'_1
s : Set Ordinal
a : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
⊢ ∀ (s : Set Ordinal), IsOpen s → IsOpen (f ⁻¹' s)

tactic: rw [isOpen_iff] at *
state_before: case refine'_1
s✝ : Set Ordinal
a : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
s : Set Ordinal
hs : IsOpen s
⊢ IsOpen (f ⁻¹' s)

tactic: intro o ho ho'
state_before: case refine'_1
s✝ : Set Ordinal
a : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
s : Set Ordinal
hs : ∀ (o : Ordinal), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s
⊢ ∀ (o : Ordinal), o ∈ f ⁻¹' s → IsLimit o → ∃ a, 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
a : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
s : Set Ordinal
hs : ∀ (o : Ordinal), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s
o : Ordinal
ho : o ∈ f ⁻¹' s
ho' : IsLimit o
⊢ ∃ a, 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
a✝ : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
s : Set Ordinal
hs : ∀ (o : Ordinal), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s
o : Ordinal
ho : o ∈ f ⁻¹' s
ho' : IsLimit o
a : Ordinal
ha : a < f o
has : Set.Ioo a (f o) ⊆ s
⊢ ∃ a, 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
a✝ : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
s : Set Ordinal
hs : ∀ (o : Ordinal), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s
o : Ordinal
ho : o ∈ f ⁻¹' s
ho' : IsLimit o
a : Ordinal
ha : ∃ i hi, a < f i
has : Set.Ioo a (f o) ⊆ s
⊢ ∃ a, 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
a✝ : Ordinal
f : Ordinal → Ordinal
h : IsNormal f
s : Set Ordinal
hs : ∀ (o : Ordinal), o ∈ s → IsLimit o → ∃ a, a < o ∧ Set.Ioo a o ⊆ s
o : Ordinal
ho : o ∈ f ⁻¹' s
ho' : IsLimit o
a : Ordinal
has : Set.Ioo a (f o) ⊆ s
b : Ordinal
hb : b < o
hab : a < f b
⊢ ∃ a, a < o ∧ Set.Ioo a o ⊆ f ⁻¹' s

tactic: rw [isNormal_iff_strictMono_limit]
state_before: case refine'_2
s : Set Ordinal
a : Ordinal
f : Ordinal → Ordinal
⊢ StrictMono f ∧ Continuous f → IsNormal f

tactic: rintro ⟨h, h'⟩
state_before: case refine'_2
s : Set Ordinal
a : Ordinal
f : Ordinal → Ordinal
⊢ StrictMono f ∧ Continuous f →
    StrictMono f ∧ ∀ (o : Ordinal), IsLimit o → ∀ (a : Ordinal), (∀ (b : Ordinal), 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
a : Ordinal
f : Ordinal → Ordinal
h : StrictMono f
h' : Continuous f
⊢ StrictMono f ∧ ∀ (o : Ordinal), IsLimit o → ∀ (a : Ordinal), (∀ (b : Ordinal), b < o → f b ≤ a) → f o ≤ a

tactic: suffices : o ∈ f ⁻¹' Set.Iic a
state_before: case refine'_2.intro
s : Set Ordinal
a✝ : Ordinal
f : Ordinal → Ordinal
h✝ : StrictMono f
h' : Continuous f
o : Ordinal
ho : IsLimit o
a : Ordinal
h : ∀ (b : Ordinal), b < o → f b ≤ a
⊢ f o ≤ a

tactic: exact Set.mem_preimage.1 this
state_before: case refine'_2.intro
s : Set Ordinal
a✝ : Ordinal
f : Ordinal → Ordinal
h✝ : StrictMono f
h' : Continuous f
o : Ordinal
ho : IsLimit o
a : Ordinal
h : ∀ (b : Ordinal), b < o → f b ≤ a
this : o ∈ f ⁻¹' Set.Iic a
⊢ f o ≤ a

case this
s : Set Ordinal
a✝ : Ordinal
f : Ordinal → Ordinal
h✝ : StrictMono f
h' : Continuous f
o : Ordinal
ho : IsLimit o
a : Ordinal
h : ∀ (b : Ordinal), 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 this
s : Set Ordinal
a✝ : Ordinal
f : Ordinal → Ordinal
h✝ : StrictMono f
h' : Continuous f
o : Ordinal
ho : IsLimit o
a : Ordinal
h : ∀ (b : Ordinal), b < o → f b ≤ a
⊢ o ∈ f ⁻¹' Set.Iic a