-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem IsNormal.isFundamentalSequence {f : Ordinal.{u} → Ordinal.{u}} (hf : IsNormal f)
    {a o} (ha : IsLimit a) {g} (hg : IsFundamentalSequence a o g) :
    IsFundamentalSequence (f a) o fun b hb => f (g b hb)

Proof state:
case refine_1.intro.intro.intro.refine_2
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
H : ∀ (i : ι), ∃ b < a, f' i ≤ f b
b : Ordinal.{u}
hb : b < a
this : ∃ i, f b ≤ f' i
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

Tactic:
obtain ⟨i, hi⟩ := this

Result:
case refine_1.intro.intro.intro.refine_2.intro
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
H : ∀ (i : ι), ∃ b < a, f' i ≤ f b
b : Ordinal.{u}
hb : b < a
i : ι
hi : f b ≤ f' i
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

Proof state:
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
i : ι
this : f' i < lsub f'
⊢ ∃ b < a, f' i ≤ f b

Tactic:
rw [hf', ← IsNormal.blsub_eq.{u, u} hf ha, lt_blsub_iff] at this

Result:
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
i : ι
this : ∃ i_1, ∃ (_ : i_1 < a), f' i ≤ f i_1
⊢ ∃ b < a, f' i ≤ f b

Proof state:
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
this : (lsub fun i => sInf {b | f' i ≤ f b}) = a
⊢ (lsub fun i => sInf {b | f' i ≤ f b}).cof ≤ #ι

Tactic:
apply cof_lsub_le

Result:
no goals

Proof state:
case refine_2
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
⊢ (a.blsub fun b x => f b) = f a

Tactic:
exact IsNormal.blsub_eq.{u, u} hf ha

Result:
no goals

Proof state:
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
H : ∀ (i : ι), ∃ b < a, f' i ≤ f b
b✝ : Ordinal.{u}
hb✝ : b✝ < a
i : ι
hi : f b✝ ≤ f' i
b : Ordinal.{u}
left✝ : b < a
hb : f' i ≤ f b
⊢ b ∈ fun c =>
    Quot.lift
      (fun a₁ =>
        Quotient.lift
          ((fun x x_1 =>
              match x with
              | { α := α, r := r, wo := wo } =>
                match x_1 with
                | { α := α_1, r := s, wo := wo } => Nonempty (r ≼i s))
            a₁)
          ⋯ (f c))
      ⋯ (f' i)

Tactic:
exact hb

Result:
no goals

Proof state:
case refine_1.intro.intro.intro
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
⊢ a.cof ≤ #ι

Tactic:
suffices (lsub.{u, u} fun i => sInf { b : Ordinal | f' i ≤ f b }) = a by
  rw [← this]
  apply cof_lsub_le

Result:
case refine_1.intro.intro.intro
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
⊢ (lsub fun i => sInf {b | f' i ≤ f b}) = a

Proof state:
case refine_1
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
⊢ o ≤ (f a).cof.ord

Tactic:
rcases exists_lsub_cof (f a) with ⟨ι, f', hf', hι⟩

Result:
case refine_1.intro.intro.intro
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
⊢ o ≤ (f a).cof.ord

Proof state:
case refine_1.intro.intro.intro.refine_1.intro.intro
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
H : ∀ (i : ι), ∃ b < a, f' i ≤ f b
i : ι
b : Ordinal.{u}
hb : b < a
hb' : f' i ≤ f b
⊢ sInf {b | f' i ≤ f b} < a

Tactic:
exact lt_of_le_of_lt (csInf_le' hb') hb

Result:
no goals

Proof state:
case refine_1.intro.intro.intro.refine_2
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
H : ∀ (i : ι), ∃ b < a, f' i ≤ f b
b : Ordinal.{u}
hb : b < a
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

Tactic:
have := hf.strictMono hb

Result:
case refine_1.intro.intro.intro.refine_2
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
H : ∀ (i : ι), ∃ b < a, f' i ≤ f b
b : Ordinal.{u}
hb : b < a
this : f b < f a
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

Proof state:
case refine_1.intro.intro.intro
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
⊢ (lsub fun i => sInf {b | f' i ≤ f b}) = a

Tactic:
have H : ∀ i, ∃ b < a, f' i ≤ f b := fun i => by
  have := lt_lsub.{u, u} f' i
  rw [hf', ← IsNormal.blsub_eq.{u, u} hf ha, lt_blsub_iff] at this
  simpa using this

Result:
case refine_1.intro.intro.intro
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
H : ∀ (i : ι), ∃ b < a, f' i ≤ f b
⊢ (lsub fun i => sInf {b | f' i ≤ f b}) = a

Proof state:
f : Ordinal.{u} → Ordinal.{u}
hf : IsNormal f
a o : Ordinal.{u}
ha : a.IsLimit
g : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hg : a.IsFundamentalSequence o g
ι : Type u
f' : ι → Ordinal.{u}
hf' : lsub f' = f a
hι : #ι = (f a).cof
i : ι
this : ∃ i_1, ∃ (_ : i_1 < a), f' i ≤ f i_1
⊢ ∃ b < a, f' i ≤ f b

Tactic:
simpa using this

Result:
no goals