Theorem: Ordinal.IsNormal.isFundamentalSequence
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: refine' ⟨_, @fun i j _ _ h => hf.strictMono (hg.2.1 _ _ h), _⟩
state_before: α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
⊢ IsFundamentalSequence (f a) o fun b hb => f (g b hb)

tactic: rcases exists_lsub_cof (f a) with ⟨ι, f', hf', hι⟩
state_before: case refine'_1
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
⊢ o ≤ ord (cof (f a))

tactic: rw [← hg.cof_eq, ord_le_ord, ← hι]
state_before: case refine'_1.intro.intro.intro
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
⊢ o ≤ ord (cof (f a))

tactic: suffices (lsub.{u, u} fun i => sInf { b : Ordinal | f' i ≤ f b }) = a by
  rw [← this]
  apply cof_lsub_le
state_before: case refine'_1.intro.intro.intro
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
⊢ cof 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
state_before: case refine'_1.intro.intro.intro
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
⊢ (lsub fun i => sInf {b | f' i ≤ f b}) = a

tactic: refine' (lsub_le fun i => _).antisymm (le_of_forall_lt fun b hb => _)
state_before: case refine'_1.intro.intro.intro
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
⊢ (lsub fun i => sInf {b | f' i ≤ f b}) = a

tactic: rw [← this]
state_before: α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
this : (lsub fun i => sInf {b | f' i ≤ f b}) = a
⊢ cof a ≤ (#ι)

tactic: apply cof_lsub_le
state_before: α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
this : (lsub fun i => sInf {b | f' i ≤ f b}) = a
⊢ cof (lsub fun i => sInf {b | f' i ≤ f b}) ≤ (#ι)

tactic: have := lt_lsub.{u, u} f' i
state_before: α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
i : ι
⊢ ∃ b, b < a ∧ f' i ≤ f b

tactic: rw [hf', ← IsNormal.blsub_eq.{u, u} hf ha, lt_blsub_iff] at this
state_before: α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
i : ι
this : f' i < lsub f'
⊢ ∃ b, b < a ∧ f' i ≤ f b

tactic: simpa using this
state_before: α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
i : ι
this : ∃ i_1 hi, f' i ≤ f i_1
⊢ ∃ b, b < a ∧ f' i ≤ f b

tactic: rcases H i with ⟨b, hb, hb'⟩
state_before: case refine'_1.intro.intro.intro.refine'_1
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
i : ι
⊢ sInf {b | f' i ≤ f b} < a

tactic: exact lt_of_le_of_lt (csInf_le' hb') hb
state_before: case refine'_1.intro.intro.intro.refine'_1.intro.intro
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
i : ι
b : Ordinal
hb : b < a
hb' : f' i ≤ f b
⊢ sInf {b | f' i ≤ f b} < a

tactic: have := hf.strictMono hb
state_before: case refine'_1.intro.intro.intro.refine'_2
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
b : Ordinal
hb : b < a
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

tactic: rw [← hf', lt_lsub_iff] at this
state_before: case refine'_1.intro.intro.intro.refine'_2
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
b : Ordinal
hb : b < a
this : f b < f a
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

tactic: cases' this with i hi
state_before: case refine'_1.intro.intro.intro.refine'_2
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
b : Ordinal
hb : b < a
this : ∃ i, f b ≤ f' i
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

tactic: rcases H i with ⟨b, _, hb⟩
state_before: case refine'_1.intro.intro.intro.refine'_2.intro
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
b : Ordinal
hb : b < a
i : ι
hi : f b ≤ f' i
⊢ b < lsub fun i => sInf {b | f' i ≤ f b}

tactic: exact
  ((le_csInf_iff'' ⟨b, by exact hb⟩).2 fun c hc =>
    hf.strictMono.le_iff_le.1 (hi.trans hc)).trans_lt (lt_lsub _ i)
state_before: case refine'_1.intro.intro.intro.refine'_2.intro.intro.intro
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
b✝ : Ordinal
hb✝ : b✝ < a
i : ι
hi : f b✝ ≤ f' i
b : Ordinal
left✝ : b < a
hb : f' i ≤ f b
⊢ b✝ < lsub fun i => sInf {b | f' i ≤ f b}

tactic: exact hb
state_before: α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
ι : Type u
f' : ι → Ordinal
hf' : lsub f' = f a
hι : (#ι) = cof (f a)
H : ∀ (i : ι), ∃ b, b < a ∧ f' i ≤ f b
b✝ : Ordinal
hb✝ : b✝ < a
i : ι
hi : f b✝ ≤ f' i
b : Ordinal
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₁)
          (_ :
            ∀ (a b : WellOrder),
              a ≈ b →
                (match a₁ with
                  | { α := α, r := r, wo := wo } =>
                    match a with
                    | { α := α_1, r := s, wo := wo } => Nonempty (r ≼i s)) =
                  match a₁ with
                  | { α := α, r := r, wo := wo } =>
                    match b with
                    | { α := α_1, r := s, wo := wo } => Nonempty (r ≼i s))
          (f c))
      (_ :
        ∀ (a b : WellOrder),
          a ≈ b →
            (fun a₁ =>
                  Quotient.lift
                    (fun x =>
                      match a₁ with
                      | { α := α, r := r, wo := wo } =>
                        match x with
                        | { α := α_1, r := s, wo := wo } => Nonempty (r ≼i s))
                    (_ :
                      ∀ (a b : WellOrder),
                        a ≈ b →
                          (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₁ a =
                            (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₁ b)
                    (f c))
                a =
              (fun a₁ =>
                  Quotient.lift
                    (fun x =>
                      match a₁ with
                      | { α := α, r := r, wo := wo } =>
                        match x with
                        | { α := α_1, r := s, wo := wo } => Nonempty (r ≼i s))
                    (_ :
                      ∀ (a b : WellOrder),
                        a ≈ b →
                          (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₁ a =
                            (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₁ b)
                    (f c))
                b)
      (f' i)

tactic: rw [@blsub_comp.{u, u, u} a _ (fun b _ => f b) (@fun i j _ _ h => hf.strictMono.monotone h) g
    hg.2.2]
state_before: case refine'_2
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
⊢ (blsub o fun b hb => f (g b hb)) = f a

tactic: exact IsNormal.blsub_eq.{u, u} hf ha
state_before: case refine'_2
α : Type ?u.94822
r : α → α → Prop
f : Ordinal → Ordinal
hf : IsNormal f
a o : Ordinal
ha : IsLimit a
g : (b : Ordinal) → b < o → Ordinal
hg : IsFundamentalSequence a o g
⊢ (blsub a fun b x => f b) = f a