Theorem: Ordinal.mul_le_of_limit_aux
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: suffices ∀ a b, Prod.Lex s r (b, a) (enum _ _ l) by
  cases' enum _ _ l with b a
  exact irrefl _ (this _ _)
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
⊢ False

tactic: intro a b
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
⊢ ∀ (a : α) (b : β), Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)

tactic: rw [← typein_lt_typein (Prod.Lex s r), typein_enum]
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
a : α
b : β
⊢ Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)

tactic: have := H _ (h.2 _ (typein_lt_type s b))
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
a : α
b : β
⊢ typein (Prod.Lex s r) (b, a) < c

tactic: rw [mul_succ] at this
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this : type r * succ (typein s b) ≤ c
⊢ typein (Prod.Lex s r) (b, a) < c

tactic: have := ((add_lt_add_iff_left _).2 (typein_lt_type _ a)).trans_le this
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
a : α
b : β
this : type r * typein s b + type r ≤ c
⊢ typein (Prod.Lex s r) (b, a) < c

tactic: refine' (RelEmbedding.ofMonotone (fun a => _) fun a b => _).ordinal_type_le.trans_lt this
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), 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
⊢ typein (Prod.Lex s r) (b, a) < c

tactic: cases' enum _ _ l with b a
state_before: α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
this : ∀ (a : α) (b : β), Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)
⊢ False

tactic: exact irrefl _ (this _ _)
state_before: case mk
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), b' < type s → type r * b' ≤ c
l : c < type r * type s
this : ∀ (a : α) (b : β), Prod.Lex s r (b, a) (enum (Prod.Lex s r) c l)
b : β
a : α
⊢ False

tactic: rcases a with ⟨⟨b', a'⟩, h⟩
state_before: case refine'_1
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), 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_1 | Prod.Lex s r b_1 (b, a✝)}
⊢ ↑{b_1 | s b_1 b} × α ⊕ ↑{b | r b a✝}

tactic: by_cases e : b = b'
state_before: case refine'_1.mk.mk
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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_1 | s b_1 b} × α ⊕ ↑{b | r b a}

tactic: refine' Sum.inr ⟨a', _⟩
state_before: case pos
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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}

tactic: subst e
state_before: case pos
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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'
⊢ a' ∈ {b | r b a}

tactic: cases' h with _ _ _ _ h _ _ _ h
state_before: case pos
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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 : (b, a') ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
⊢ a' ∈ {b | r b a}

tactic: exact (irrefl _ h).elim
state_before: case pos.left
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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}

tactic: exact h
state_before: case pos.right
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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}

tactic: refine' Sum.inl (⟨b', _⟩, a')
state_before: case neg
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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}

tactic: cases' h with _ _ _ _ h _ _ _ h
state_before: case neg
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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}

tactic: exact h
state_before: case neg.left
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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}

tactic: exact (e rfl).elim
state_before: case neg.right
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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}

tactic: rcases a with ⟨⟨b₁, a₁⟩, h₁⟩
state_before: case refine'_2
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), 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)

tactic: rcases b with ⟨⟨b₂, a₂⟩, h₂⟩
state_before: case refine'_2.mk.mk
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), 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)

tactic: intro h
state_before: case refine'_2.mk.mk.mk.mk
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₂ })

tactic: by_cases e₁ : b = b₁ <;> by_cases e₂ : b = b₂
state_before: case refine'_2.mk.mk.mk.mk
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₂ })

tactic: substs b₁ b₂
state_before: case pos
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₁
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₂ })

tactic: simpa only [subrel_val, Prod.lex_def, @irrefl _ s _ b, true_and_iff, false_or_iff,
  eq_self_iff_true, dif_pos, Sum.lex_inr_inr] using h
state_before: case pos
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₁ a₂ : α
h₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (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₂ })

tactic: subst b₁
state_before: case neg
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₁
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₂ })

tactic: simp only [subrel_val, Prod.lex_def, e₂, Prod.lex_def, dif_pos, subrel_val, eq_self_iff_true,
  or_false_iff, dif_neg, not_false_iff, Sum.lex_inr_inl, false_and_iff] at h ⊢
state_before: case neg
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₂ : β
a₂ : α
h₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
e₂ : ¬b = b₂
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₂ })

tactic: cases' h₂ with _ _ _ _ h₂_h h₂_h <;> [exact asymm h h₂_h; exact e₂ rfl]
state_before: case neg
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₂ : β
a₂ : α
h₂ : (b₂, a₂) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
e₂ : ¬b = b₂
h₁ : (b, a₁) ∈ {b_1 | Prod.Lex s r b_1 (b, a)}
h : s b b₂
⊢ False

tactic: simp [e₂, dif_neg e₁, show b₂ ≠ b₁ from e₂ ▸ e₁]
state_before: case pos
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₁
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₂ })

tactic: simpa only [dif_neg e₁, dif_neg e₂, Prod.lex_def, subrel_val, Subtype.mk_eq_mk,
  Sum.lex_inl_inl] using h
state_before: case neg
α✝ : Type ?u.196573
β✝ : Type ?u.196576
γ : Type ?u.196579
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_1
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
c : Ordinal
h✝ : IsLimit (type s)
H : ∀ (b' : Ordinal), 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₁
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₂ })