l3lab/ntp-mathlib huggingface dataset:
theorem add_le_of_limit {a b c : Ordinal} (h : IsLimit b) : a + b ≤ c ↔ ∀ b' < b, a + b' ≤ c :=
  ⟨fun h b' l => (add_le_add_left l.le _).trans h, fun H =>
    le_of_not_lt <| by
      -- Porting note: `induction` tactics are required because of the parser bug.
      induction a using inductionOn with
      | H α r =>
        induction b using inductionOn with
        | H β s =>
          intro l
          suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by
            -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace
            --               `enum _ _ l` in `this`.
            revert this; cases' enum _ _ l with x x <;> intro this
            · cases this (enum s 0 h.pos)
            · exact irrefl _ (this _)
          intro x
          rw [← typein_lt_typein (Sum.Lex r s), typein_enum]
          have := H _ (h.2 _ (typein_lt_type s x))
          rw [add_succ, succ_le_iff] at this
          refine'
            (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
          · rcases a with ⟨a | b, h⟩
            · exact Sum.inl a
            · exact Sum.inr ⟨b, by cases h; assumption⟩
          · rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;>
              rintro ⟨⟩ <;> constructor <;> 

Proof state:
case H.H.refine'_2.mk.inl.mk.inl.sep.sep.inl.h
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
c : Ordinal.{u_4}
α : Type u_4
r : α → α → Prop
inst✝¹ : IsWellOrder α r
β : Type u_4
s : β → β → Prop
inst✝ : IsWellOrder β s
h : IsLimit (type s)
H : ∀ b' < type s, type r + b' ≤ c
l : c < type r + type s
x : β
this : type r + typein s x < c
a b : α
h✝ : r a b
⊢ r a b

Next tactic:
assumption
theorem add_le_of_limit {a b c : Ordinal} (h : IsLimit b) : a + b ≤ c ↔ ∀ b' < b, a + b' ≤ c :=
  ⟨fun h b' l => (add_le_add_left l.le _).trans h, fun H =>
    le_of_not_lt <| by
      -- Porting note: `induction` tactics are required because of the parser bug.
      induction a using inductionOn with
      | H α r =>
        induction b using inductionOn with
        | H β s =>
          intro l
          suffices ∀ x : β, Sum.Lex r s (Sum.inr x) (enum _ _ l) by
            -- Porting note: `revert` & `intro` is required because `cases'` doesn't replace
            --               `enum _ _ l` in `this`.
            revert this; cases' enum _ _ l with x x <;> intro this
            · cases this (enum s 0 h.pos)
            · exact irrefl _ (this _)
          intro x
          rw [← typein_lt_typein (Sum.Lex r s), typein_enum]
          have := H _ (h.2 _ (typein_lt_type s x))
          rw [add_succ, succ_le_iff] at this
          refine'
            (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
          · rcases a with ⟨a | b, h⟩
            · exact Sum.inl a
            · exact Sum.inr ⟨b, by cases h; assumption⟩
          · rcases a with ⟨a | a, h₁⟩ <;> rcases b with ⟨b | b, h₂⟩ <;> cases h₁ <;> cases h₂ <;>
              rintro ⟨⟩ <;> constructor <;> 

Proof state:
case H.H.refine'_2.mk.inr.mk.inr.inr.inr.inr.h
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
c : Ordinal.{u_4}
α : Type u_4
r : α → α → Prop
inst✝¹ : IsWellOrder α r
β : Type u_4
s : β → β → Prop
inst✝ : IsWellOrder β s
h : IsLimit (type s)
H : ∀ b' < type s, type r + b' ≤ c
l : c < type r + type s
x : β
this : type r + typein s x < c
a b : β
h✝² : s a x
h✝¹ : s b x
h✝ : s a b
⊢ Subrel s {b | s b x} { val := a, property := (_ : a ∈ {b | s b x}) } { val := b, property := (_ : b ∈ {b | s b x}) }

Next tactic:
assumption
protected theorem add_sub_cancel_of_le {a b : Ordinal} (h : b ≤ a) : b + (a - b) = a :=
  (le_add_sub a b).antisymm'
    (by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
⊢ b + (a - b) ≤ a

Next tactic:
rcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)
protected theorem add_sub_cancel_of_le {a b : Ordinal} (h : b ≤ a) : b + (a - b) = a :=
  (le_add_sub a b).antisymm'
    (by
      rcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)
      · 

Proof state:
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
e : a - b = 0
⊢ b + (a - b) ≤ a

Next tactic:
simp only [e, add_zero, h]
protected theorem add_sub_cancel_of_le {a b : Ordinal} (h : b ≤ a) : b + (a - b) = a :=
  (le_add_sub a b).antisymm'
    (by
      rcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)
      · simp only [e, add_zero, h]
      · 

Proof state:
case inr.inl.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
c : Ordinal.{u_4}
e : a - b = succ c
⊢ b + (a - b) ≤ a

Next tactic:
rw [e, add_succ, succ_le_iff, ← lt_sub, e]
protected theorem add_sub_cancel_of_le {a b : Ordinal} (h : b ≤ a) : b + (a - b) = a :=
  (le_add_sub a b).antisymm'
    (by
      rcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)
      · simp only [e, add_zero, h]
      · rw [e, add_succ, succ_le_iff, ← lt_sub, e]
        

Proof state:
case inr.inl.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
c : Ordinal.{u_4}
e : a - b = succ c
⊢ c < succ c

Next tactic:
exact lt_succ c
protected theorem add_sub_cancel_of_le {a b : Ordinal} (h : b ≤ a) : b + (a - b) = a :=
  (le_add_sub a b).antisymm'
    (by
      rcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)
      · simp only [e, add_zero, h]
      · rw [e, add_succ, succ_le_iff, ← lt_sub, e]
        exact lt_succ c
      · 

Proof state:
case inr.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
l : IsLimit (a - b)
⊢ b + (a - b) ≤ a

Next tactic:
exact (add_le_of_limit l).2 fun c l => (lt_sub.1 l).le
theorem le_sub_of_le {a b c : Ordinal} (h : b ≤ a) : c ≤ a - b ↔ b + c ≤ a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal.{u_4}
h : b ≤ a
⊢ c ≤ a - b ↔ b + c ≤ a

Next tactic:
rw [← add_le_add_iff_left b, Ordinal.add_sub_cancel_of_le h]
@[simp]
theorem sub_zero (a : Ordinal) : a - 0 = a := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal.{u_4}
⊢ a - 0 = a

Next tactic:
simpa only [zero_add] using add_sub_cancel 0 a
@[simp]
theorem zero_sub (a : Ordinal) : 0 - a = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal.{u_4}
⊢ 0 - a = 0

Next tactic:
rw [← Ordinal.le_zero]
@[simp]
theorem zero_sub (a : Ordinal) : 0 - a = 0 := by rw [← Ordinal.le_zero]; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal.{u_4}
⊢ 0 - a ≤ 0

Next tactic:
apply sub_le_self
@[simp]
theorem sub_self (a : Ordinal) : a - a = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal.{u_4}
⊢ a - a = 0

Next tactic:
simpa only [add_zero] using add_sub_cancel a 0
protected theorem sub_eq_zero_iff_le {a b : Ordinal} : a - b = 0 ↔ a ≤ b :=
  ⟨fun h => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : a - b = 0
⊢ a ≤ b

Next tactic:
simpa only [h, add_zero] using le_add_sub a b
protected theorem sub_eq_zero_iff_le {a b : Ordinal} : a - b = 0 ↔ a ≤ b :=
  ⟨fun h => by simpa only [h, add_zero] using le_add_sub a b, fun h => by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : a ≤ b
⊢ a - b = 0

Next tactic:
rwa [← Ordinal.le_zero, sub_le, add_zero]
theorem sub_sub (a b c : Ordinal) : a - b - c = a - (b + c) :=
  eq_of_forall_ge_iff fun d => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c d : Ordinal.{u_4}
⊢ a - b - c ≤ d ↔ a - (b + c) ≤ d

Next tactic:
rw [sub_le, sub_le, sub_le, add_assoc]
@[simp]
theorem add_sub_add_cancel (a b c : Ordinal) : a + b - (a + c) = b - c := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal.{u_4}
⊢ a + b - (a + c) = b - c

Next tactic:
rw [← sub_sub, add_sub_cancel]
theorem sub_isLimit {a b} (l : IsLimit a) (h : b < a) : IsLimit (a - b) :=
  ⟨ne_of_gt <| lt_sub.2 <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
l : IsLimit a
h : b < a
⊢ b + 0 < a

Next tactic:
rwa [add_zero]
theorem sub_isLimit {a b} (l : IsLimit a) (h : b < a) : IsLimit (a - b) :=
  ⟨ne_of_gt <| lt_sub.2 <| by rwa [add_zero], fun c h => by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
l : IsLimit a
h✝ : b < a
c : Ordinal.{u_4}
h : c < a - b
⊢ succ c < a - b

Next tactic:
rw [lt_sub, add_succ]
theorem sub_isLimit {a b} (l : IsLimit a) (h : b < a) : IsLimit (a - b) :=
  ⟨ne_of_gt <| lt_sub.2 <| by rwa [add_zero], fun c h => by
    rw [lt_sub, add_succ]; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
l : IsLimit a
h✝ : b < a
c : Ordinal.{u_4}
h : c < a - b
⊢ succ (b + c) < a

Next tactic:
exact l.2 _ (lt_sub.1 h)
theorem one_add_omega : 1 + ω = ω := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ 1 + ω = ω

Next tactic:
refine' le_antisymm _ (le_add_left _ _)
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ 1 + ω ≤ ω

Next tactic:
rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ type (Sum.Lex EmptyRelation fun x x_1 => x < x_1) ≤ type fun x x_1 => x < x_1

Next tactic:
refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ Unit ⊕ ℕ → ℕ

Next tactic:
apply Sum.rec
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    

Proof state:
case refine'_1.inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ Unit → ℕ
case refine'_1.inr α : Type u_1 β : Type u_2 γ : Type u_3 r : α → α → Prop s : β → β → Prop t : γ → γ → Prop ⊢ ℕ → ℕ

Next tactic:
exact fun _ => 0
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    

Proof state:
case refine'_1.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ ℕ → ℕ

Next tactic:
exact Nat.succ
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
⊢ ∀ (a b : Unit ⊕ ℕ),
    Sum.Lex EmptyRelation (fun x x_1 => x < x_1) a b → Sum.rec (fun x => 0) Nat.succ a < Sum.rec (fun x => 0) Nat.succ b

Next tactic:
intro a b
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Unit ⊕ ℕ
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) a b → Sum.rec (fun x => 0) Nat.succ a < Sum.rec (fun x => 0) Nat.succ b

Next tactic:
cases a <;> cases b <;> intro H <;> cases' H with _ _ H _ _ H <;>
      [exact H.elim; exact Nat.succ_pos _; exact Nat.succ_lt_succ H]
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Unit ⊕ ℕ
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) a b → Sum.rec (fun x => 0) Nat.succ a < Sum.rec (fun x => 0) Nat.succ b

Next tactic:
cases a
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> 

Proof state:
case refine'_2.inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
b : Unit ⊕ ℕ
val✝ : Unit
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝) b →
    Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝) < Sum.rec (fun x => 0) Nat.succ b

Next tactic:
cases b
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> 

Proof state:
case refine'_2.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
b : Unit ⊕ ℕ
val✝ : ℕ
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝) b →
    Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝) < Sum.rec (fun x => 0) Nat.succ b

Next tactic:
cases b
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> 

Proof state:
case refine'_2.inl.inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ val✝ : Unit
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inl val✝) →
    Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)

Next tactic:
intro H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> 

Proof state:
case refine'_2.inl.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ : Unit
val✝ : ℕ
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inr val✝) →
    Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)

Next tactic:
intro H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> 

Proof state:
case refine'_2.inr.inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ : ℕ
val✝ : Unit
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inl val✝) →
    Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)

Next tactic:
intro H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> 

Proof state:
case refine'_2.inr.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ val✝ : ℕ
⊢ Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inr val✝) →
    Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)

Next tactic:
intro H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> intro H <;> 

Proof state:
case refine'_2.inl.inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ val✝ : Unit
H : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inl val✝)
⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)

Next tactic:
cases' H with _ _ H _ _ H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> intro H <;> 

Proof state:
case refine'_2.inl.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ : Unit
val✝ : ℕ
H : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inl val✝¹) (Sum.inr val✝)
⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)

Next tactic:
cases' H with _ _ H _ _ H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> intro H <;> 

Proof state:
case refine'_2.inr.inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ : ℕ
val✝ : Unit
H : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inl val✝)
⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)

Next tactic:
cases' H with _ _ H _ _ H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> intro H <;> 

Proof state:
case refine'_2.inr.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ val✝ : ℕ
H : Sum.Lex EmptyRelation (fun x x_1 => x < x_1) (Sum.inr val✝¹) (Sum.inr val✝)
⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)

Next tactic:
cases' H with _ _ H _ _ H
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> intro H <;> cases' H with _ _ H _ _ H <;>
      [

Proof state:
case refine'_2.inl.inl.inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ val✝ a₁✝ a₂✝ : Unit
H : EmptyRelation a₁✝ a₂✝
⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝)

Next tactic:
exact H.elim
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> intro H <;> cases' H with _ _ H _ _ H <;>
      [exact H.elim; 

Proof state:
case refine'_2.inl.inr.sep
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ : Unit
val✝ : ℕ
a✝ : Unit
⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inl val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)

Next tactic:
exact Nat.succ_pos _
theorem one_add_omega : 1 + ω = ω := by
  refine' le_antisymm _ (le_add_left _ _)
  rw [omega, ← lift_one.{_, 0}, ← lift_add, lift_le, ← type_unit, ← type_sum_lex]
  refine' ⟨RelEmbedding.collapse (RelEmbedding.ofMonotone _ _)⟩
  · apply Sum.rec
    exact fun _ => 0
    exact Nat.succ
  · intro a b
    cases a <;> cases b <;> intro H <;> cases' H with _ _ H _ _ H <;>
      [exact H.elim; exact Nat.succ_pos _; 

Proof state:
case refine'_2.inr.inr.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
val✝¹ val✝ : ℕ
H : val✝¹ < val✝
⊢ Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝¹) < Sum.rec (fun x => 0) Nat.succ (Sum.inr val✝)

Next tactic:
exact Nat.succ_lt_succ H
@[simp]
theorem one_add_of_omega_le {o} (h : ω ≤ o) : 1 + o = o := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u_4}
h : ω ≤ o
⊢ 1 + o = o

Next tactic:
rw [← Ordinal.add_sub_cancel_of_le h, ← add_assoc, one_add_omega]
/-- The multiplication of ordinals `o₁` and `o₂` is the (well founded) lexicographic order on
`o₂ × o₁`. -/
instance monoid : Monoid Ordinal.{u}
    where
  mul a b :=
    Quotient.liftOn₂ a b
      (fun ⟨α, r, wo⟩ ⟨β, s, wo'⟩ => ⟦⟨β × α, Prod.Lex s r, inferInstance⟩⟧ :
        WellOrder → WellOrder → Ordinal)
      fun ⟨α₁, r₁, o₁⟩ ⟨α₂, r₂, o₂⟩ ⟨β₁, s₁, p₁⟩ ⟨β₂, s₂, p₂⟩ ⟨f⟩ ⟨g⟩ =>
      Quot.sound ⟨RelIso.prodLexCongr g f⟩
  one := 1
  mul_assoc a b c :=
    Quotient.inductionOn₃ a b c fun ⟨α, r, _⟩ ⟨β, s, _⟩ ⟨γ, t, _⟩ =>
      Eq.symm <|
        Quotient.sound
          ⟨⟨prodAssoc _ _ _, @fun a b => by
              

Proof state:
α✝ : Type u_1
β✝ : Type u_2
γ✝ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t✝ : γ✝ → γ✝ → Prop
a✝ b✝ c : Ordinal.{u}
x✝² x✝¹ x✝ : WellOrder
α : Type u
r : α → α → Prop
wo✝² : IsWellOrder α r
β : Type u
s : β → β → Prop
wo✝¹ : IsWellOrder β s
γ : Type u
t : γ → γ → Prop
wo✝ : IsWellOrder γ t
a b : (γ × β) × α
⊢ Prod.Lex t (Prod.Lex s r) ((prodAssoc γ β α) a) ((prodAssoc γ β α) b) ↔ Prod.Lex (Prod.Lex t s) r a b

Next tactic:
rcases a with ⟨⟨a₁, a₂⟩, a₃⟩