Theorem: Ordinal.enumOrd_range
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: apply Ordinal.induction o
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o : Ordinal.{u_1}
⊢ enumOrd (range f) o = f o
state_after: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o : Ordinal.{u_1}
⊢ ∀ (j : Ordinal.{u_1}), (∀ k < j, enumOrd (range f) k = f k) → enumOrd (range f) j = f j

tactic: intro a H
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o : Ordinal.{u_1}
⊢ ∀ (j : Ordinal.{u_1}), (∀ k < j, enumOrd (range f) k = f k) → enumOrd (range f) j = f j
state_after: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
⊢ enumOrd (range f) a = f a

tactic: rw [enumOrd_def a]
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
⊢ enumOrd (range f) a = f a
state_after: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
⊢ sInf (range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}) = f a

tactic: have Hfa : f a ∈ range f ∩ { b | ∀ c, c < a → enumOrd (range f) c < b } :=
  ⟨mem_range_self a, fun b hb => by
    rw [H b hb]
    exact hf hb⟩
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
⊢ sInf (range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}) = f a
state_after: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
⊢ sInf (range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}) = f a

tactic: refine (csInf_le' Hfa).antisymm ((le_csInf_iff'' ⟨_, Hfa⟩).2 ?_)
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
⊢ sInf (range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}) = f a
state_after: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
⊢ ∀ b ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}, f a ≤ b

tactic: rintro _ ⟨⟨c, rfl⟩, hc : ∀ b < a, enumOrd (range f) b < f c⟩
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
⊢ ∀ b ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}, f a ≤ b
state_after: case intro.intro
S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
c : Ordinal.{u_1}
hc : ∀ b < a, enumOrd (range f) b < f c
⊢ f a ≤ f c

tactic: rw [hf.le_iff_le]
state_before: case intro.intro
S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
c : Ordinal.{u_1}
hc : ∀ b < a, enumOrd (range f) b < f c
⊢ f a ≤ f c
state_after: case intro.intro
S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
c : Ordinal.{u_1}
hc : ∀ b < a, enumOrd (range f) b < f c
⊢ a ≤ c

tactic: contrapose! hc
state_before: case intro.intro
S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
c : Ordinal.{u_1}
hc : ∀ b < a, enumOrd (range f) b < f c
⊢ a ≤ c
state_after: case intro.intro
S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
c : Ordinal.{u_1}
hc : c < a
⊢ ∃ b < a, f c ≤ enumOrd (range f) b

tactic: exact ⟨c, hc, (H c hc).ge⟩
state_before: case intro.intro
S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
Hfa : f a ∈ range f ∩ {b | ∀ c < a, enumOrd (range f) c < b}
c : Ordinal.{u_1}
hc : c < a
⊢ ∃ b < a, f c ≤ enumOrd (range f) b
state_after: no goals

tactic: rw [H b hb]
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
b : Ordinal.{u_1}
hb : b < a
⊢ enumOrd (range f) b < f a
state_after: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
b : Ordinal.{u_1}
hb : b < a
⊢ f b < f a

tactic: exact hf hb
state_before: S : Set Ordinal.{u}
f : Ordinal.{u_1} → Ordinal.{u_1}
hf : StrictMono f
o a : Ordinal.{u_1}
H : ∀ k < a, enumOrd (range f) k = f k
b : Ordinal.{u_1}
hb : b < a
⊢ f b < f a
state_after: no goals