Theorem: Ordinal.exists_fundamental_sequence
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

Proof steps:
state_before: α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
⊢ ∃ f, a.IsFundamentalSequence a.cof.ord f
state_after: α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
⊢ ∃ o f, a.IsFundamentalSequence o f
tactic: suffices h : ∃ o f, IsFundamentalSequence a o f by
    rcases h with ⟨o, f, hf⟩
    exact ⟨_, hf.ord_cof⟩
state_before: α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
⊢ ∃ o f, a.IsFundamentalSequence o f
state_after: case intro.intro.intro
α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
⊢ ∃ o f, a.IsFundamentalSequence o f
tactic: rcases exists_lsub_cof a with ⟨ι, f, hf, hι⟩
state_before: case intro.intro.intro
α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
⊢ ∃ o f, a.IsFundamentalSequence o f
state_after: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
⊢ ∃ o f, a.IsFundamentalSequence o f
tactic: rcases ord_eq ι with ⟨r, wo, hr⟩
state_before: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
⊢ ∃ o f, a.IsFundamentalSequence o f
state_after: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this : IsWellOrder ι r
⊢ ∃ o f, a.IsFundamentalSequence o f
tactic: haveI := wo
state_before: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this : IsWellOrder ι r
⊢ ∃ o f, a.IsFundamentalSequence o f
state_after: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
⊢ ∃ o f, a.IsFundamentalSequence o f
tactic: let r' := Subrel r { i | ∀ j, r j i → f j < f i }
state_before: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
⊢ ∃ o f, a.IsFundamentalSequence o f
state_after: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
hrr' : r' ↪r r := Subrel.relEmbedding r {i | ∀ (j : ι), r j i → f j < f i}
⊢ ∃ o f, a.IsFundamentalSequence o f
tactic: let hrr' : r' ↪r r := Subrel.relEmbedding _ _
state_before: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
hrr' : r' ↪r r := Subrel.relEmbedding r {i | ∀ (j : ι), r j i → f j < f i}
⊢ ∃ o f, a.IsFundamentalSequence o f
state_after: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this✝ : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
hrr' : r' ↪r r := Subrel.relEmbedding r {i | ∀ (j : ι), r j i → f j < f i}
this : IsWellOrder (↑{i | ∀ (j : ι), r j i → f j < f i}) r'
⊢ ∃ o f, a.IsFundamentalSequence o f
tactic: haveI := hrr'.isWellOrder
state_before: case intro.intro.intro.intro.intro
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this✝ : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
hrr' : r' ↪r r := Subrel.relEmbedding r {i | ∀ (j : ι), r j i → f j < f i}
this : IsWellOrder (↑{i | ∀ (j : ι), r j i → f j < f i}) r'
⊢ ∃ o f, a.IsFundamentalSequence o f
state_after: case intro.intro.intro.intro.intro.refine_1
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this✝ : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
hrr' : r' ↪r r := Subrel.relEmbedding r {i | ∀ (j : ι), r j i → f j < f i}
this : IsWellOrder (↑{i | ∀ (j : ι), r j i → f j < f i}) r'
⊢ type r ≤ a.cof.ord

case intro.intro.intro.intro.intro.refine_2
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this✝ : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
hrr' : r' ↪r r := Subrel.relEmbedding r {i | ∀ (j : ι), r j i → f j < f i}
this : IsWellOrder (↑{i | ∀ (j : ι), r j i → f j < f i}) r'
i j : Ordinal.{u}
x✝¹ : i < type r'
h : j < type r'
x✝ : i < j
⊢ r ↑(enum r' i x✝¹) ↑(enum r' j h)

case intro.intro.intro.intro.intro.refine_3
α : Type u_1
r✝ : α → α → Prop
a : Ordinal.{u}
ι : Type u
f : ι → Ordinal.{u}
hf : lsub f = a
hι : #ι = a.cof
r : ι → ι → Prop
wo : IsWellOrder ι r
hr : (#ι).ord = type r
this✝ : IsWellOrder ι r
r' : ↑{i | ∀ (j : ι), r j i → f j < f i} → ↑{i | ∀ (j : ι), r j i → f j < f i} → Prop :=
  Subrel r {i | ∀ (j : ι), r j i → f j < f i}
hrr' : r' ↪r r := Subrel.relEmbedding r {i | ∀ (j : ι), r j i → f j < f i}
this : IsWellOrder (↑{i | ∀ (j : ι), r j i → f j < f i}) r'
⊢ a ≤ (type r').blsub fun i x => f ↑(enum r' i x)
tactic: refine
    ⟨_, _, hrr'.ordinal_type_le.trans ?_, @fun i j _ h _ => (enum r' j h).prop _ ?_,
      le_antisymm (blsub_le fun i hi => lsub_le_iff.1 hf.le _) ?_⟩