l3lab/ntp-mathlib huggingface dataset:
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · 

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

Next tactic:
exact (irrefl _ h).elim
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · 

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

Next tactic:
exact h
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · 

Proof state:
case neg
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h✝ : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
b' : β
a' : α
h : (b', a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
e : ¬b = b'
⊢ ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a}

Next tactic:
refine' Sum.inl (⟨b', _⟩, a')
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      

Proof state:
case neg
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h✝ : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
b' : β
a' : α
h : (b', a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
e : ¬b = b'
⊢ b' ∈ {b_1 | s b_1 b}

Next tactic:
cases' h with _ _ _ _ h _ _ _ h
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · 

Proof state:
case neg.left
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h✝ : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
b' : β
a' : α
e : ¬b = b'
h : s b' b
⊢ b' ∈ {b_1 | s b_1 b}

Next tactic:
exact h
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · exact h
      · 

Proof state:
case neg.right
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h✝ : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
a' : α
e : ¬b = b
h : r a' a
⊢ b ∈ {b_1 | s b_1 b}

Next tactic:
exact (e rfl).elim
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · exact h
      · exact (e rfl).elim
  · 

Proof state:
case refine'_2
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a✝ : α
b✝ : β
this✝ : type r * typein s b✝ + type r ≤ c
this : type r * typein s b✝ + typein r a✝ < c
a b : ↑{b | Prod.Lex s r b (b✝, a✝)}
⊢ Subrel (Prod.Lex s r) {b | Prod.Lex s r b (b✝, a✝)} a b →
    Sum.Lex (Prod.Lex (Subrel s {b | s b b✝}) r) (Subrel r {b | r b a✝})
      ((fun a =>
          Subtype.casesOn a fun val h =>
            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a✝)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a✝}) val
              (fun b' a' h =>
                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a✝}) }
                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))
              h)
        a)
      ((fun a =>
          Subtype.casesOn a fun val h =>
            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a✝)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a✝}) val
              (fun b' a' h =>
                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a✝}) }
                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))
              h)
        b)

Next tactic:
rcases a with ⟨⟨b₁, a₁⟩, h₁⟩
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · exact h
      · exact (e rfl).elim
  · rcases a with ⟨⟨b₁, a₁⟩, h₁⟩
    

Proof state:
case refine'_2.mk.mk
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b✝ : β
this✝ : type r * typein s b✝ + type r ≤ c
this : type r * typein s b✝ + typein r a < c
b : ↑{b | Prod.Lex s r b (b✝, a)}
b₁ : β
a₁ : α
h₁ : (b₁, a₁) ∈ {b | Prod.Lex s r b (b✝, a)}
⊢ Subrel (Prod.Lex s r) {b | Prod.Lex s r b (b✝, a)} { val := (b₁, a₁), property := h₁ } b →
    Sum.Lex (Prod.Lex (Subrel s {b | s b b✝}) r) (Subrel r {b | r b a})
      ((fun a_2 =>
          Subtype.casesOn a_2 fun val h =>
            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a}) val
              (fun b' a' h =>
                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))
              h)
        { val := (b₁, a₁), property := h₁ })
      ((fun a_2 =>
          Subtype.casesOn a_2 fun val h =>
            Prod.casesOn (motive := fun x => x ∈ {b | Prod.Lex s r b (b✝, a)} → ↑{b | s b b✝} × α ⊕ ↑{b | r b a}) val
              (fun b' a' h =>
                if e : b✝ = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
                else Sum.inl ({ val := b', property := (_ : b' ∈ {b | s b b✝}) }, a'))
              h)
        b)

Next tactic:
rcases b with ⟨⟨b₂, a₂⟩, h₂⟩
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · exact h
      · exact (e rfl).elim
  · rcases a with ⟨⟨b₁, a₁⟩, h₁⟩
    rcases b with ⟨⟨b₂, a₂⟩, h₂⟩
    

Proof state:
case refine'_2.mk.mk.mk.mk
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
b₁ : β
a₁ : α
h₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
b₂ : β
a₂ : α
h₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
⊢ Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }
      { val := (b₂, a₂), property := h₂ } →
    Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})
      ((fun a_2 =>
          Subtype.casesOn a_2 fun val h =>
            Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
              val
              (fun b' a' h =>
                if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
                else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
              h)
        { val := (b₁, a₁), property := h₁ })
      ((fun a_2 =>
          Subtype.casesOn a_2 fun val h =>
            Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
              val
              (fun b' a' h =>
                if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
                else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
              h)
        { val := (b₂, a₂), property := h₂ })

Next tactic:
intro h
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · exact h
      · exact (e rfl).elim
  · rcases a with ⟨⟨b₁, a₁⟩, h₁⟩
    rcases b with ⟨⟨b₂, a₂⟩, h₂⟩
    intro h
    

Proof state:
case refine'_2.mk.mk.mk.mk
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h✝ : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
b₁ : β
a₁ : α
h₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
b₂ : β
a₂ : α
h₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
h :
  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }
    { val := (b₂, a₂), property := h₂ }
⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})
    ((fun a_1 =>
        Subtype.casesOn a_1 fun val h =>
          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
            val
            (fun b' a' h =>
              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
            h)
      { val := (b₁, a₁), property := h₁ })
    ((fun a_1 =>
        Subtype.casesOn a_1 fun val h =>
          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
            val
            (fun b' a' h =>
              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
            h)
      { val := (b₂, a₂), property := h₂ })

Next tactic:
by_cases e₁ : b = b₁
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · exact h
      · exact (e rfl).elim
  · rcases a with ⟨⟨b₁, a₁⟩, h₁⟩
    rcases b with ⟨⟨b₂, a₂⟩, h₂⟩
    intro h
    by_cases e₁ : b = b₁ <;> 

Proof state:
case pos
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h✝ : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
b₁ : β
a₁ : α
h₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
b₂ : β
a₂ : α
h₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
h :
  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }
    { val := (b₂, a₂), property := h₂ }
e₁ : b = b₁
⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})
    ((fun a_1 =>
        Subtype.casesOn a_1 fun val h =>
          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
            val
            (fun b' a' h =>
              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
            h)
      { val := (b₁, a₁), property := h₁ })
    ((fun a_1 =>
        Subtype.casesOn a_1 fun val h =>
          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
            val
            (fun b' a' h =>
              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
            h)
      { val := (b₂, a₂), property := h₂ })

Next tactic:
by_cases e₂ : b = b₂
private theorem mul_le_of_limit_aux {α β r s} [IsWellOrder α r] [IsWellOrder β s] {c}
    (h : IsLimit (type s)) (H : ∀ b' < type s, type r * b' ≤ c) (l : c < type r * type s) :
    False := by
  suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
    cases' enum _ _ l with b a
    exact irrefl _ (this _ _)
  intro a b
  rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
  have := H _ (h.2 _ (typein_lt_type s b))
  rw [mul_succ] at this
  have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
  refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
  · rcases a with ⟨⟨b', a'⟩, h⟩
    by_cases e : b = b'
    · refine' Sum.inr ⟨a', _⟩
      subst e
      cases' h with _ _ _ _ h _ _ _ h
      · exact (irrefl _ h).elim
      · exact h
    · refine' Sum.inl (⟨b', _⟩, a')
      cases' h with _ _ _ _ h _ _ _ h
      · exact h
      · exact (e rfl).elim
  · rcases a with ⟨⟨b₁, a₁⟩, h₁⟩
    rcases b with ⟨⟨b₂, a₂⟩, h₂⟩
    intro h
    by_cases e₁ : b = b₁ <;> 

Proof state:
case neg
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_4
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal.{u_4}
h✝ : IsLimit (type s)
H : ∀ b' < type s, type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this✝ : type r * typein s b + type r ≤ c
this : type r * typein s b + typein r a < c
b₁ : β
a₁ : α
h₁ : (b₁, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
b₂ : β
a₂ : α
h₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
h :
  Subrel (Prod.Lex s r) {b_1 | Prod.Lex s r b_1 (b, a)} { val := (b₁, a₁), property := h₁ }
    { val := (b₂, a₂), property := h₂ }
e₁ : ¬b = b₁
⊢ Sum.Lex (Prod.Lex (Subrel s {b_1 | s b_1 b}) r) (Subrel r {b | r b a})
    ((fun a_1 =>
        Subtype.casesOn a_1 fun val h =>
          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
            val
            (fun b' a' h =>
              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
            h)
      { val := (b₁, a₁), property := h₁ })
    ((fun a_1 =>
        Subtype.casesOn a_1 fun val h =>
          Prod.casesOn (motive := fun x => x ∈ {b_1 | Prod.Lex s r b_1 (b, a)} → ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a})
            val
            (fun b' a' h =>
              if e : b = b' then Sum.inr { val := a', property := (_ : a' ∈ {b | r b a}) }
              else Sum.inl ({ val := b', property := (_ : b' ∈ {b_1 | s b_1 b}) }, a'))
            h)
      { val := (b₂, a₂), property := h₂ })

Next tactic:
by_cases e₂ : b = b₂