l3lab/ntp-mathlib huggingface dataset:
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    

Proof state:
case intro.mk.mk
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a b : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
⊢ type s + type r₁ ≤ type s + type r₂

Next tactic:
refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · 

Proof state:
case intro.mk.mk.refine_1
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a b : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
⊢ ∀ {a b : β ⊕ α₁},
    Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
      Sum.Lex s r₁ a b

Next tactic:
intros a b
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      

Proof state:
case intro.mk.mk.refine_1
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝ b✝ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a b : β ⊕ α₁
⊢ Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
    Sum.Lex s r₁ a b

Next tactic:
match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> exact Sum.lex_inr_inl
      | Sum.inr a, Sum.inr b => exact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => 

Proof state:
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a b : β
⊢ Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) (Sum.inl a))
      ((Embedding.sumMap (Embedding.refl β) f) (Sum.inl b)) ↔
    Sum.Lex s r₁ (Sum.inl a) (Sum.inl b)

Next tactic:
exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => 

Proof state:
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a : β
b : α₁
⊢ Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) (Sum.inl a))
      ((Embedding.sumMap (Embedding.refl β) f) (Sum.inr b)) ↔
    Sum.Lex s r₁ (Sum.inl a) (Sum.inr b)

Next tactic:
apply iff_of_true
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> 

Proof state:
case ha
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a : β
b : α₁
⊢ Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) (Sum.inl a))
    ((Embedding.sumMap (Embedding.refl β) f) (Sum.inr b))

Next tactic:
apply Sum.Lex.sep
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> 

Proof state:
case hb
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a : β
b : α₁
⊢ Sum.Lex s r₁ (Sum.inl a) (Sum.inr b)

Next tactic:
apply Sum.Lex.sep
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => 

Proof state:
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a : α₁
b : β
⊢ Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) (Sum.inr a))
      ((Embedding.sumMap (Embedding.refl β) f) (Sum.inl b)) ↔
    Sum.Lex s r₁ (Sum.inr a) (Sum.inl b)

Next tactic:
apply iff_of_false
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> 

Proof state:
case ha
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a : α₁
b : β
⊢ ¬Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) (Sum.inr a))
      ((Embedding.sumMap (Embedding.refl β) f) (Sum.inl b))

Next tactic:
exact Sum.lex_inr_inl
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> 

Proof state:
case hb
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a : α₁
b : β
⊢ ¬Sum.Lex s r₁ (Sum.inr a) (Sum.inl b)

Next tactic:
exact Sum.lex_inr_inl
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> exact Sum.lex_inr_inl
      | Sum.inr a, Sum.inr b => 

Proof state:
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ b✝ : β ⊕ α₁
a b : α₁
⊢ Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) (Sum.inr a))
      ((Embedding.sumMap (Embedding.refl β) f) (Sum.inr b)) ↔
    Sum.Lex s r₁ (Sum.inr a) (Sum.inr b)

Next tactic:
exact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> exact Sum.lex_inr_inl
      | Sum.inr a, Sum.inr b => exact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm
    · 

Proof state:
case intro.mk.mk.refine_2
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a b : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
⊢ ∀ (a : β ⊕ α₁) (b : β ⊕ α₂),
    Sum.Lex s r₂ b
        ({ toEmbedding := Embedding.sumMap (Embedding.refl β) f,
            map_rel_iff' :=
              (_ :
                ∀ {a b : β ⊕ α₁},
                  Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                    Sum.Lex s r₁ a b) }
          a) →
      ∃ a',
        { toEmbedding := Embedding.sumMap (Embedding.refl β) f,
              map_rel_iff' :=
                (_ :
                  ∀ {a b : β ⊕ α₁},
                    Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a)
                        ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                      Sum.Lex s r₁ a b) }
            a' =
          b

Next tactic:
intros a b H
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> exact Sum.lex_inr_inl
      | Sum.inr a, Sum.inr b => exact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm
    · intros a b H
      

Proof state:
case intro.mk.mk.refine_2
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝ b✝ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a : β ⊕ α₁
b : β ⊕ α₂
H :
  Sum.Lex s r₂ b
    ({ toEmbedding := Embedding.sumMap (Embedding.refl β) f,
        map_rel_iff' :=
          (_ :
            ∀ {a b : β ⊕ α₁},
              Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                Sum.Lex s r₁ a b) }
      a)
⊢ ∃ a',
    { toEmbedding := Embedding.sumMap (Embedding.refl β) f,
          map_rel_iff' :=
            (_ :
              ∀ {a b : β ⊕ α₁},
                Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                  Sum.Lex s r₁ a b) }
        a' =
      b

Next tactic:
match a, b, H with
      | _, Sum.inl b, _ => exact ⟨Sum.inl b, rfl⟩
      | Sum.inl a, Sum.inr b, H => exact (Sum.lex_inr_inl H).elim
      | Sum.inr a, Sum.inr b, H =>
        let ⟨w, h⟩ := fi _ _ (Sum.lex_inr_inr.1 H)
        exact ⟨Sum.inr w, congr_arg Sum.inr h⟩
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> exact Sum.lex_inr_inl
      | Sum.inr a, Sum.inr b => exact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm
    · intros a b H
      match a, b, H with
      | _, Sum.inl b, _ => 

Proof state:
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝⁴ : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝³ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝² : IsWellOrder β s
a : β ⊕ α₁
b✝ : β ⊕ α₂
H :
  Sum.Lex s r₂ b✝
    ({ toEmbedding := Embedding.sumMap (Embedding.refl β) f,
        map_rel_iff' :=
          (_ :
            ∀ {a b : β ⊕ α₁},
              Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                Sum.Lex s r₁ a b) }
      a)
x✝¹ : β ⊕ α₁
b : β
x✝ :
  Sum.Lex s r₂ (Sum.inl b)
    ({ toEmbedding := Embedding.sumMap (Embedding.refl β) f,
        map_rel_iff' :=
          (_ :
            ∀ {a b : β ⊕ α₁},
              Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                Sum.Lex s r₁ a b) }
      x✝¹)
⊢ ∃ a',
    { toEmbedding := Embedding.sumMap (Embedding.refl β) f,
          map_rel_iff' :=
            (_ :
              ∀ {a b : β ⊕ α₁},
                Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                  Sum.Lex s r₁ a b) }
        a' =
      Sum.inl b

Next tactic:
exact ⟨Sum.inl b, rfl⟩
instance add_covariantClass_le : CovariantClass Ordinal.{u} Ordinal.{u} (· + ·) (· ≤ ·) where
  elim := fun c a b h => by
    revert h c
    refine inductionOn a (fun α₁ r₁ _ ↦ ?_)
    refine inductionOn b (fun α₂ r₂ _ ↦ ?_)
    rintro c ⟨⟨⟨f, fo⟩, fi⟩⟩
    refine inductionOn c (fun β s _ ↦ ?_)
    refine ⟨⟨⟨(Embedding.refl.{u+1} _).sumMap f, ?_⟩, ?_⟩⟩
    · intros a b
      match a, b with
      | Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm
      | Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep
      | Sum.inr a, Sum.inl b => apply iff_of_false <;> exact Sum.lex_inr_inl
      | Sum.inr a, Sum.inr b => exact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm
    · intros a b H
      match a, b, H with
      | _, Sum.inl b, _ => exact ⟨Sum.inl b, rfl⟩
      | Sum.inl a, Sum.inr b, H => 

Proof state:
α : Type u
β✝ : Type u_1
γ : Type u_2
r : α → α → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
a✝¹ b✝¹ : Ordinal.{u}
α₁ : Type u
r₁ : α₁ → α₁ → Prop
x✝² : IsWellOrder α₁ r₁
α₂ : Type u
r₂ : α₂ → α₂ → Prop
x✝¹ : IsWellOrder α₂ r₂
c : Ordinal.{u}
f : α₁ ↪ α₂
fo : ∀ {a b : α₁}, r₂ (f a) (f b) ↔ r₁ a b
fi :
  ∀ (a : α₁) (b : α₂),
    r₂ b ({ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', { toEmbedding := f, map_rel_iff' := fo } a' = b
β : Type u
s : β → β → Prop
x✝ : IsWellOrder β s
a✝ : β ⊕ α₁
b✝ : β ⊕ α₂
H✝ :
  Sum.Lex s r₂ b✝
    ({ toEmbedding := Embedding.sumMap (Embedding.refl β) f,
        map_rel_iff' :=
          (_ :
            ∀ {a b : β ⊕ α₁},
              Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                Sum.Lex s r₁ a b) }
      a✝)
a : β
b : α₂
H :
  Sum.Lex s r₂ (Sum.inr b)
    ({ toEmbedding := Embedding.sumMap (Embedding.refl β) f,
        map_rel_iff' :=
          (_ :
            ∀ {a b : β ⊕ α₁},
              Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                Sum.Lex s r₁ a b) }
      (Sum.inl a))
⊢ ∃ a',
    { toEmbedding := Embedding.sumMap (Embedding.refl β) f,
          map_rel_iff' :=
            (_ :
              ∀ {a b : β ⊕ α₁},
                Sum.Lex s r₂ ((Embedding.sumMap (Embedding.refl β) f) a) ((Embedding.sumMap (Embedding.refl β) f) b) ↔
                  Sum.Lex s r₁ a b) }
        a' =
      Sum.inr b

Next tactic:
exact (Sum.lex_inr_inl H).elim