l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; 

Proof state:
case a
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
this : r x ↑a ∨ ∃ x_1, ↑a = x
⊢ (∃ a_1, Sum.rec Subtype.val (fun x => ↑a) a_1 = x) ↔ r x ↑a ∨ ∃ x_1, ↑a = x

Next tactic:
simp
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        

Proof state:
case this
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
⊢ r x ↑a ∨ ∃ x_1, ↑a = x

Next tactic:
rcases trichotomous_of r x a with (h | h | h)
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · 

Proof state:
case this.inl
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
h : r x ↑a
⊢ r x ↑a ∨ ∃ x_1, ↑a = x

Next tactic:
exact Or.inl h
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · 

Proof state:
case this.inr.inl
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
h : x = ↑a
⊢ r x ↑a ∨ ∃ x_1, ↑a = x

Next tactic:
exact Or.inr ⟨PUnit.unit, h.symm⟩
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · exact Or.inr ⟨PUnit.unit, h.symm⟩
        · 

Proof state:
case this.inr.inr
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
h : r (↑a) x
⊢ r x ↑a ∨ ∃ x_1, ↑a = x

Next tactic:
rcases hl x with ⟨a', aS, hn⟩
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · exact Or.inr ⟨PUnit.unit, h.symm⟩
        · rcases hl x with ⟨a', aS, hn⟩
          

Proof state:
case this.inr.inr.intro.intro
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
h : r (↑a) x
a' : α
aS : a' ∈ S
hn : ¬r a' x
⊢ r x ↑a ∨ ∃ x_1, ↑a = x

Next tactic:
rw [(_ : ↑a = a')] at h
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · exact Or.inr ⟨PUnit.unit, h.symm⟩
        · rcases hl x with ⟨a', aS, hn⟩
          rw [(_ : ↑a = a')] at h
          · 

Proof state:
case this.inr.inr.intro.intro
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x a' : α
h : r a' x
aS : a' ∈ S
hn : ¬r a' x
⊢ r x ↑a ∨ ∃ x_1, ↑a = x

Next tactic:
exact absurd h hn
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · exact Or.inr ⟨PUnit.unit, h.symm⟩
        · rcases hl x with ⟨a', aS, hn⟩
          rw [(_ : ↑a = a')] at h
          · exact absurd h hn
          

Proof state:
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
h : r (↑a) x
a' : α
aS : a' ∈ S
hn : ¬r a' x
⊢ ↑a = a'

Next tactic:
refine' congr_arg Subtype.val (_ : a = ⟨a', aS⟩)
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · exact Or.inr ⟨PUnit.unit, h.symm⟩
        · rcases hl x with ⟨a', aS, hn⟩
          rw [(_ : ↑a = a')] at h
          · exact absurd h hn
          refine' congr_arg Subtype.val (_ : a = ⟨a', aS⟩)
          

Proof state:
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
h : r (↑a) x
a' : α
aS : a' ∈ S
hn : ¬r a' x
⊢ a = { val := a', property := aS }

Next tactic:
haveI := le_one_iff_subsingleton.1 (le_of_eq e)
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · exact Or.inr ⟨PUnit.unit, h.symm⟩
        · rcases hl x with ⟨a', aS, hn⟩
          rw [(_ : ↑a = a')] at h
          · exact absurd h hn
          refine' congr_arg Subtype.val (_ : a = ⟨a', aS⟩)
          haveI := le_one_iff_subsingleton.1 (le_of_eq e)
          

Proof state:
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
o : Ordinal.{u}
α : Type u
r : α → α → Prop
x✝ : IsWellOrder α r
z : cof (type r) = 1
S : Set α
hl : Unbounded r S
e : #↑S = 1
a : ↑S
x : α
h : r (↑a) x
a' : α
aS : a' ∈ S
hn : ¬r a' x
this : Subsingleton ↑S
⊢ a = { val := a', property := aS }

Next tactic:
apply Subsingleton.elim
@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a :=
  ⟨inductionOn o fun α r _ z => by
      skip
      rcases cof_eq r with ⟨S, hl, e⟩; rw [z] at e
      cases' mk_ne_zero_iff.1 (by rw [e]; exact one_ne_zero) with a
      refine'
        ⟨typein r a,
          Eq.symm <|
            Quotient.sound
              ⟨RelIso.ofSurjective (RelEmbedding.ofMonotone _ fun x y => _) fun x => _⟩⟩
      · apply Sum.rec <;> [exact Subtype.val; exact fun _ => a]
      · rcases x with (x | ⟨⟨⟨⟩⟩⟩) <;> rcases y with (y | ⟨⟨⟨⟩⟩⟩) <;>
          simp [Subrel, Order.Preimage, EmptyRelation]
        exact x.2
      · suffices : r x a ∨ ∃ _ : PUnit.{u}, ↑a = x
        · convert this
          dsimp [RelEmbedding.ofMonotone]; simp
        rcases trichotomous_of r x a with (h | h | h)
        · exact Or.inl h
        · exact Or.inr ⟨PUnit.unit, h.symm⟩
        · rcases hl x with ⟨a', aS, hn⟩
          rw [(_ : ↑a = a')] at h
          · exact absurd h hn
          refine' congr_arg Subtype.val (_ : a = ⟨a', aS⟩)
          haveI := le_one_iff_subsingleton.1 (le_of_eq e)
          apply Subsingleton.elim,
    fun ⟨a, e⟩ => by 

Proof state:
α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
x✝ : ∃ a, o = succ a
a : Ordinal.{u}
e : o = succ a
⊢ cof o = 1

Next tactic:
simp [e]
protected theorem cof_eq (hf : IsFundamentalSequence a o f) : a.cof.ord = o :=
  hf.1.antisymm' <| by
    

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
⊢ ord (cof a) ≤ o

Next tactic:
rw [← hf.2.2]
protected theorem cof_eq (hf : IsFundamentalSequence a o f) : a.cof.ord = o :=
  hf.1.antisymm' <| by
    rw [← hf.2.2]
    

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
⊢ ord (cof (blsub o f)) ≤ o

Next tactic:
exact (ord_le_ord.2 (cof_blsub_le f)).trans (ord_card_le o)
theorem ord_cof (hf : IsFundamentalSequence a o f) :
    IsFundamentalSequence a a.cof.ord fun i hi => f i (hi.trans_le (by 

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
i : Ordinal.{u}
hi : i < ord (cof a)
⊢ ord (cof a) ≤ o

Next tactic:
rw [hf.cof_eq]
theorem ord_cof (hf : IsFundamentalSequence a o f) :
    IsFundamentalSequence a a.cof.ord fun i hi => f i (hi.trans_le (by rw [hf.cof_eq])) := by
  

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
⊢ IsFundamentalSequence a (ord (cof a)) fun i hi => f i (_ : i < o)

Next tactic:
have H := hf.cof_eq
theorem ord_cof (hf : IsFundamentalSequence a o f) :
    IsFundamentalSequence a a.cof.ord fun i hi => f i (hi.trans_le (by rw [hf.cof_eq])) := by
  have H := hf.cof_eq
  

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
H : ord (cof a) = o
⊢ IsFundamentalSequence a (ord (cof a)) fun i hi => f i (_ : i < o)

Next tactic:
subst H
theorem ord_cof (hf : IsFundamentalSequence a o f) :
    IsFundamentalSequence a a.cof.ord fun i hi => f i (hi.trans_le (by rw [hf.cof_eq])) := by
  have H := hf.cof_eq
  subst H
  

Proof state:
α : Type u_1
r : α → α → Prop
a : Ordinal.{u}
f : (b : Ordinal.{u}) → b < ord (cof a) → Ordinal.{u}
hf : IsFundamentalSequence a (ord (cof a)) f
⊢ IsFundamentalSequence a (ord (cof a)) fun i hi => f i (_ : i < ord (cof a))

Next tactic:
exact hf
protected theorem zero {f : ∀ b < (0 : Ordinal), Ordinal} : IsFundamentalSequence 0 0 f :=
  ⟨by 

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f✝ : (b : Ordinal.{u}) → b < o → Ordinal.{u}
f : (b : Ordinal.{u_2}) → b < 0 → Ordinal.{u_2}
⊢ 0 ≤ ord (cof 0)

Next tactic:
rw [cof_zero, ord_zero]
protected theorem succ : IsFundamentalSequence (succ o) 1 fun _ _ => o := by
  

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
⊢ IsFundamentalSequence (succ o) 1 fun x x => o

Next tactic:
refine' ⟨_, @fun i j hi hj h => _, blsub_const Ordinal.one_ne_zero o⟩
protected theorem succ : IsFundamentalSequence (succ o) 1 fun _ _ => o := by
  refine' ⟨_, @fun i j hi hj h => _, blsub_const Ordinal.one_ne_zero o⟩
  · 

Proof state:
case refine'_1
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
⊢ 1 ≤ ord (cof (succ o))

Next tactic:
rw [cof_succ, ord_one]
protected theorem succ : IsFundamentalSequence (succ o) 1 fun _ _ => o := by
  refine' ⟨_, @fun i j hi hj h => _, blsub_const Ordinal.one_ne_zero o⟩
  · rw [cof_succ, ord_one]
  · 

Proof state:
case refine'_2
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
i j : Ordinal.{u}
hi : i < 1
hj : j < 1
h : i < j
⊢ (fun x x => o) i hi < (fun x x => o) j hj

Next tactic:
rw [lt_one_iff_zero] at hi hj
protected theorem succ : IsFundamentalSequence (succ o) 1 fun _ _ => o := by
  refine' ⟨_, @fun i j hi hj h => _, blsub_const Ordinal.one_ne_zero o⟩
  · rw [cof_succ, ord_one]
  · rw [lt_one_iff_zero] at hi hj
    

Proof state:
case refine'_2
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
i j : Ordinal.{u}
hi✝ : i < 1
hi : i = 0
hj✝ : j < 1
hj : j = 0
h : i < j
⊢ (fun x x => o) i hi✝ < (fun x x => o) j hj✝

Next tactic:
rw [hi, hj] at h
protected theorem succ : IsFundamentalSequence (succ o) 1 fun _ _ => o := by
  refine' ⟨_, @fun i j hi hj h => _, blsub_const Ordinal.one_ne_zero o⟩
  · rw [cof_succ, ord_one]
  · rw [lt_one_iff_zero] at hi hj
    rw [hi, hj] at h
    

Proof state:
case refine'_2
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
i j : Ordinal.{u}
hi✝ : i < 1
hi : i = 0
hj✝ : j < 1
hj : j = 0
h : 0 < 0
⊢ (fun x x => o) i hi✝ < (fun x x => o) j hj✝

Next tactic:
exact h.false.elim
protected theorem monotone (hf : IsFundamentalSequence a o f) {i j : Ordinal} (hi : i < o)
    (hj : j < o) (hij : i ≤ j) : f i hi ≤ f j hj := by
  

Proof state:
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
i j : Ordinal.{u}
hi : i < o
hj : j < o
hij : i ≤ j
⊢ f i hi ≤ f j hj

Next tactic:
rcases lt_or_eq_of_le hij with (hij | rfl)
protected theorem monotone (hf : IsFundamentalSequence a o f) {i j : Ordinal} (hi : i < o)
    (hj : j < o) (hij : i ≤ j) : f i hi ≤ f j hj := by
  rcases lt_or_eq_of_le hij with (hij | rfl)
  · 

Proof state:
case inl
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
i j : Ordinal.{u}
hi : i < o
hj : j < o
hij✝ : i ≤ j
hij : i < j
⊢ f i hi ≤ f j hj

Next tactic:
exact (hf.2.1 hi hj hij).le
protected theorem monotone (hf : IsFundamentalSequence a o f) {i j : Ordinal} (hi : i < o)
    (hj : j < o) (hij : i ≤ j) : f i hi ≤ f j hj := by
  rcases lt_or_eq_of_le hij with (hij | rfl)
  · exact (hf.2.1 hi hj hij).le
  · 

Proof state:
case inr
α : Type u_1
r : α → α → Prop
a o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
i : Ordinal.{u}
hi hj : i < o
hij : i ≤ i
⊢ f i hi ≤ f i hj

Next tactic:
rfl
theorem trans {a o o' : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}} (hf : IsFundamentalSequence a o f)
    {g : ∀ b < o', Ordinal.{u}} (hg : IsFundamentalSequence o o' g) :
    IsFundamentalSequence a o' fun i hi =>
      f (g i hi) (by 

Proof state:
α : Type u_1
r : α → α → Prop
a✝ o✝ : Ordinal.{u}
f✝ : (b : Ordinal.{u}) → b < o✝ → Ordinal.{u}
a o o' : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
g : (b : Ordinal.{u}) → b < o' → Ordinal.{u}
hg : IsFundamentalSequence o o' g
i : Ordinal.{u}
hi : i < o'
⊢ g i hi < o

Next tactic:
rw [← hg.2.2]
theorem trans {a o o' : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}} (hf : IsFundamentalSequence a o f)
    {g : ∀ b < o', Ordinal.{u}} (hg : IsFundamentalSequence o o' g) :
    IsFundamentalSequence a o' fun i hi =>
      f (g i hi) (by rw [← hg.2.2]; 

Proof state:
α : Type u_1
r : α → α → Prop
a✝ o✝ : Ordinal.{u}
f✝ : (b : Ordinal.{u}) → b < o✝ → Ordinal.{u}
a o o' : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
g : (b : Ordinal.{u}) → b < o' → Ordinal.{u}
hg : IsFundamentalSequence o o' g
i : Ordinal.{u}
hi : i < o'
⊢ g i hi < blsub o' g

Next tactic:
apply lt_blsub
theorem trans {a o o' : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}} (hf : IsFundamentalSequence a o f)
    {g : ∀ b < o', Ordinal.{u}} (hg : IsFundamentalSequence o o' g) :
    IsFundamentalSequence a o' fun i hi =>
      f (g i hi) (by rw [← hg.2.2]; apply lt_blsub) := by
  

Proof state:
α : Type u_1
r : α → α → Prop
a✝ o✝ : Ordinal.{u}
f✝ : (b : Ordinal.{u}) → b < o✝ → Ordinal.{u}
a o o' : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
g : (b : Ordinal.{u}) → b < o' → Ordinal.{u}
hg : IsFundamentalSequence o o' g
⊢ IsFundamentalSequence a o' fun i hi => f (g i hi) (_ : g i hi < o)

Next tactic:
refine' ⟨_, @fun i j _ _ h => hf.2.1 _ _ (hg.2.1 _ _ h), _⟩
theorem trans {a o o' : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}} (hf : IsFundamentalSequence a o f)
    {g : ∀ b < o', Ordinal.{u}} (hg : IsFundamentalSequence o o' g) :
    IsFundamentalSequence a o' fun i hi =>
      f (g i hi) (by rw [← hg.2.2]; apply lt_blsub) := by
  refine' ⟨_, @fun i j _ _ h => hf.2.1 _ _ (hg.2.1 _ _ h), _⟩
  · 

Proof state:
case refine'_1
α : Type u_1
r : α → α → Prop
a✝ o✝ : Ordinal.{u}
f✝ : (b : Ordinal.{u}) → b < o✝ → Ordinal.{u}
a o o' : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
g : (b : Ordinal.{u}) → b < o' → Ordinal.{u}
hg : IsFundamentalSequence o o' g
⊢ o' ≤ ord (cof a)

Next tactic:
rw [hf.cof_eq]
theorem trans {a o o' : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}} (hf : IsFundamentalSequence a o f)
    {g : ∀ b < o', Ordinal.{u}} (hg : IsFundamentalSequence o o' g) :
    IsFundamentalSequence a o' fun i hi =>
      f (g i hi) (by rw [← hg.2.2]; apply lt_blsub) := by
  refine' ⟨_, @fun i j _ _ h => hf.2.1 _ _ (hg.2.1 _ _ h), _⟩
  · rw [hf.cof_eq]
    

Proof state:
case refine'_1
α : Type u_1
r : α → α → Prop
a✝ o✝ : Ordinal.{u}
f✝ : (b : Ordinal.{u}) → b < o✝ → Ordinal.{u}
a o o' : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
g : (b : Ordinal.{u}) → b < o' → Ordinal.{u}
hg : IsFundamentalSequence o o' g
⊢ o' ≤ o

Next tactic:
exact hg.1.trans (ord_cof_le o)
theorem trans {a o o' : Ordinal.{u}} {f : ∀ b < o, Ordinal.{u}} (hf : IsFundamentalSequence a o f)
    {g : ∀ b < o', Ordinal.{u}} (hg : IsFundamentalSequence o o' g) :
    IsFundamentalSequence a o' fun i hi =>
      f (g i hi) (by rw [← hg.2.2]; apply lt_blsub) := by
  refine' ⟨_, @fun i j _ _ h => hf.2.1 _ _ (hg.2.1 _ _ h), _⟩
  · rw [hf.cof_eq]
    exact hg.1.trans (ord_cof_le o)
  · 

Proof state:
case refine'_2
α : Type u_1
r : α → α → Prop
a✝ o✝ : Ordinal.{u}
f✝ : (b : Ordinal.{u}) → b < o✝ → Ordinal.{u}
a o o' : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{u}
hf : IsFundamentalSequence a o f
g : (b : Ordinal.{u}) → b < o' → Ordinal.{u}
hg : IsFundamentalSequence o o' g
⊢ (blsub o' fun i hi => f (g i hi) (_ : g i hi < o)) = a

Next tactic:
rw [@blsub_comp.{u, u, u} o _ f (@IsFundamentalSequence.monotone _ _ f hf)]