l3lab/ntp-mathlib huggingface dataset:
theorem add_right_cancel_iff [IsRightCancelAdd α] (ha : a ≠ ⊤) : b + a = c + a ↔ b = c := by
  lift a to α using ha
  obtain rfl | hb := (eq_or_ne b ⊤)
  · rw [top_add, eq_comm, WithTop.add_coe_eq_top_iff, eq_comm]
  lift b to α using hb
  

Proof state:
case intro.inr.intro
α : Type u
β : Type v
inst✝¹ : Add α
c d : WithTop α
x y : α
inst✝ : IsRightCancelAdd α
a b : α
⊢ ↑b + ↑a = c + ↑a ↔ ↑b = c

Next tactic:
simp_rw [← WithTop.coe_add, eq_comm, WithTop.add_eq_coe, coe_eq_coe, exists_and_left,
    exists_eq_left, add_left_inj, exists_eq_right, eq_comm]
theorem add_left_cancel_iff [IsLeftCancelAdd α] (ha : a ≠ ⊤) : a + b = a + c ↔ b = c := by
  

Proof state:
α : Type u
β : Type v
inst✝¹ : Add α
a b c d : WithTop α
x y : α
inst✝ : IsLeftCancelAdd α
ha : a ≠ ⊤
⊢ a + b = a + c ↔ b = c

Next tactic:
lift a to α using ha
theorem add_left_cancel_iff [IsLeftCancelAdd α] (ha : a ≠ ⊤) : a + b = a + c ↔ b = c := by
  lift a to α using ha
  

Proof state:
case intro
α : Type u
β : Type v
inst✝¹ : Add α
b c d : WithTop α
x y : α
inst✝ : IsLeftCancelAdd α
a : α
⊢ ↑a + b = ↑a + c ↔ b = c

Next tactic:
obtain rfl | hb := (eq_or_ne b ⊤)
theorem add_left_cancel_iff [IsLeftCancelAdd α] (ha : a ≠ ⊤) : a + b = a + c ↔ b = c := by
  lift a to α using ha
  obtain rfl | hb := (eq_or_ne b ⊤)
  · 

Proof state:
case intro.inl
α : Type u
β : Type v
inst✝¹ : Add α
c d : WithTop α
x y : α
inst✝ : IsLeftCancelAdd α
a : α
⊢ ↑a + ⊤ = ↑a + c ↔ ⊤ = c

Next tactic:
rw [add_top, eq_comm, WithTop.coe_add_eq_top_iff, eq_comm]
theorem add_left_cancel_iff [IsLeftCancelAdd α] (ha : a ≠ ⊤) : a + b = a + c ↔ b = c := by
  lift a to α using ha
  obtain rfl | hb := (eq_or_ne b ⊤)
  · rw [add_top, eq_comm, WithTop.coe_add_eq_top_iff, eq_comm]
  

Proof state:
case intro.inr
α : Type u
β : Type v
inst✝¹ : Add α
b c d : WithTop α
x y : α
inst✝ : IsLeftCancelAdd α
a : α
hb : b ≠ ⊤
⊢ ↑a + b = ↑a + c ↔ b = c

Next tactic:
lift b to α using hb
theorem add_left_cancel_iff [IsLeftCancelAdd α] (ha : a ≠ ⊤) : a + b = a + c ↔ b = c := by
  lift a to α using ha
  obtain rfl | hb := (eq_or_ne b ⊤)
  · rw [add_top, eq_comm, WithTop.coe_add_eq_top_iff, eq_comm]
  lift b to α using hb
  

Proof state:
case intro.inr.intro
α : Type u
β : Type v
inst✝¹ : Add α
c d : WithTop α
x y : α
inst✝ : IsLeftCancelAdd α
a b : α
⊢ ↑a + ↑b = ↑a + c ↔ ↑b = c

Next tactic:
simp_rw [← WithTop.coe_add, eq_comm, WithTop.add_eq_coe, eq_comm, coe_eq_coe,
    exists_and_left, exists_eq_left', add_right_inj, exists_eq_right']
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    

Proof state:
α : Type u
β : Type v
inst✝² : Add α
a✝ b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a b c : WithTop α
h : b ≤ c
⊢ a + b ≤ a + c

Next tactic:
cases a
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> 

Proof state:
case none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b c : WithTop α
h : b ≤ c
⊢ none + b ≤ none + c

Next tactic:
cases c
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> 

Proof state:
case some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b c : WithTop α
h : b ≤ c
val✝ : α
⊢ Option.some val✝ + b ≤ Option.some val✝ + c

Next tactic:
cases c
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case none.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
h : b ≤ none
⊢ none + b ≤ none + none

Next tactic:
try exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case none.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
h : b ≤ none
⊢ none + b ≤ none + none

Next tactic:
exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case none.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ Option.some val✝
⊢ none + b ≤ none + Option.some val✝

Next tactic:
try exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case none.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ Option.some val✝
⊢ none + b ≤ none + Option.some val✝

Next tactic:
exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case some.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ none
⊢ Option.some val✝ + b ≤ Option.some val✝ + none

Next tactic:
try exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case some.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ none
⊢ Option.some val✝ + b ≤ Option.some val✝ + none

Next tactic:
exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case some.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝¹ val✝ : α
h : b ≤ Option.some val✝
⊢ Option.some val✝¹ + b ≤ Option.some val✝¹ + Option.some val✝

Next tactic:
try exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case some.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝¹ val✝ : α
h : b ≤ Option.some val✝
⊢ Option.some val✝¹ + b ≤ Option.some val✝¹ + Option.some val✝

Next tactic:
exact le_top
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try exact le_top
    

Proof state:
case some.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝¹ val✝ : α
h : b ≤ Option.some val✝
⊢ Option.some val✝¹ + b ≤ Option.some val✝¹ + Option.some val✝

Next tactic:
rcases le_coe_iff.1 h with ⟨b, rfl, _⟩
instance covariantClass_add_le [LE α] [CovariantClass α α (· + ·) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (· + ·) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try exact le_top
    rcases le_coe_iff.1 h with ⟨b, rfl, _⟩
    

Proof state:
case some.some.intro.intro
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
val✝¹ val✝ b : α
right✝ : b ≤ val✝
h : ↑b ≤ Option.some val✝
⊢ Option.some val✝¹ + ↑b ≤ Option.some val✝¹ + Option.some val✝

Next tactic:
exact coe_le_coe.2 (add_le_add_left (coe_le_coe.1 h) _)
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    

Proof state:
α : Type u
β : Type v
inst✝² : Add α
a✝ b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a b c : WithTop α
h : b ≤ c
⊢ swap (fun x x_1 => x + x_1) a b ≤ swap (fun x x_1 => x + x_1) a c

Next tactic:
cases a
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> 

Proof state:
case none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b c : WithTop α
h : b ≤ c
⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none c

Next tactic:
cases c
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> 

Proof state:
case some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b c : WithTop α
h : b ≤ c
val✝ : α
⊢ swap (fun x x_1 => x + x_1) (Option.some val✝) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝) c

Next tactic:
cases c
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case none.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
h : b ≤ none
⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none none

Next tactic:
try exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case none.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
h : b ≤ none
⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none none

Next tactic:
exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case none.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ Option.some val✝
⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none (Option.some val✝)

Next tactic:
try exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case none.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ Option.some val✝
⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none (Option.some val✝)

Next tactic:
exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case some.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ none
⊢ swap (fun x x_1 => x + x_1) (Option.some val✝) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝) none

Next tactic:
try exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case some.none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝ : α
h : b ≤ none
⊢ swap (fun x x_1 => x + x_1) (Option.some val✝) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝) none

Next tactic:
exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> 

Proof state:
case some.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝¹ val✝ : α
h : b ≤ Option.some val✝
⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)

Next tactic:
try exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try 

Proof state:
case some.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝¹ val✝ : α
h : b ≤ Option.some val✝
⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)

Next tactic:
exact le_top
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try exact le_top
    

Proof state:
case some.some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b : WithTop α
val✝¹ val✝ : α
h : b ≤ Option.some val✝
⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)

Next tactic:
rcases le_coe_iff.1 h with ⟨b, rfl, _⟩
instance covariantClass_swap_add_le [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)] :
    CovariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· ≤ ·) :=
  ⟨fun a b c h => by
    cases a <;> cases c <;> try exact le_top
    rcases le_coe_iff.1 h with ⟨b, rfl, _⟩
    

Proof state:
case some.some.intro.intro
α : Type u
β : Type v
inst✝² : Add α
a b✝ c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
val✝¹ val✝ b : α
right✝ : b ≤ val✝
h : ↑b ≤ Option.some val✝
⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) ↑b ≤
    swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)

Next tactic:
exact coe_le_coe.2 (add_le_add_right (coe_le_coe.1 h) _)
instance contravariantClass_add_lt [LT α] [ContravariantClass α α (· + ·) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (· + ·) (· < ·) :=
  ⟨fun a b c h => by
    

Proof state:
α : Type u
β : Type v
inst✝² : Add α
a✝ b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1
a b c : WithTop α
h : a + b < a + c
⊢ b < c

Next tactic:
induction a using WithTop.recTopCoe
instance contravariantClass_add_lt [LT α] [ContravariantClass α α (· + ·) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (· + ·) (· < ·) :=
  ⟨fun a b c h => by
    induction a using WithTop.recTopCoe; · 

Proof state:
case top
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1
b c : WithTop α
h : ⊤ + b < ⊤ + c
⊢ b < c

Next tactic:
exact (not_none_lt _ h).elim
instance contravariantClass_add_lt [LT α] [ContravariantClass α α (· + ·) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (· + ·) (· < ·) :=
  ⟨fun a b c h => by
    induction a using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    

Proof state:
case coe
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1
b c : WithTop α
a✝ : α
h : ↑a✝ + b < ↑a✝ + c
⊢ b < c

Next tactic:
induction b using WithTop.recTopCoe
instance contravariantClass_add_lt [LT α] [ContravariantClass α α (· + ·) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (· + ·) (· < ·) :=
  ⟨fun a b c h => by
    induction a using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    induction b using WithTop.recTopCoe; · 

Proof state:
case coe.top
α : Type u
β : Type v
inst✝² : Add α
a b c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1
c : WithTop α
a✝ : α
h : ↑a✝ + ⊤ < ↑a✝ + c
⊢ ⊤ < c

Next tactic:
exact (not_none_lt _ h).elim
instance contravariantClass_add_lt [LT α] [ContravariantClass α α (· + ·) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (· + ·) (· < ·) :=
  ⟨fun a b c h => by
    induction a using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    induction b using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    

Proof state:
case coe.coe
α : Type u
β : Type v
inst✝² : Add α
a b c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1
c : WithTop α
a✝¹ a✝ : α
h : ↑a✝¹ + ↑a✝ < ↑a✝¹ + c
⊢ ↑a✝ < c

Next tactic:
induction c using WithTop.recTopCoe
instance contravariantClass_add_lt [LT α] [ContravariantClass α α (· + ·) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (· + ·) (· < ·) :=
  ⟨fun a b c h => by
    induction a using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    induction b using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    induction c using WithTop.recTopCoe
    · 

Proof state:
case coe.coe.top
α : Type u
β : Type v
inst✝² : Add α
a b c d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1
a✝¹ a✝ : α
h : ↑a✝¹ + ↑a✝ < ↑a✝¹ + ⊤
⊢ ↑a✝ < ⊤

Next tactic:
exact coe_lt_top _
instance contravariantClass_add_lt [LT α] [ContravariantClass α α (· + ·) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (· + ·) (· < ·) :=
  ⟨fun a b c h => by
    induction a using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    induction b using WithTop.recTopCoe; · exact (not_none_lt _ h).elim
    induction c using WithTop.recTopCoe
    · exact coe_lt_top _
    · 

Proof state:
case coe.coe.coe
α : Type u
β : Type v
inst✝² : Add α
a b c d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1
a✝² a✝¹ a✝ : α
h : ↑a✝² + ↑a✝¹ < ↑a✝² + ↑a✝
⊢ ↑a✝¹ < ↑a✝

Next tactic:
exact coe_lt_coe.2 (lt_of_add_lt_add_left <| coe_lt_coe.1 h)
instance contravariantClass_swap_add_lt [LT α] [ContravariantClass α α (swap (· + ·)) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· < ·) :=
  ⟨fun a b c h => by
    

Proof state:
α : Type u
β : Type v
inst✝² : Add α
a✝ b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
a b c : WithTop α
h : swap (fun x x_1 => x + x_1) a b < swap (fun x x_1 => x + x_1) a c
⊢ b < c

Next tactic:
cases a
instance contravariantClass_swap_add_lt [LT α] [ContravariantClass α α (swap (· + ·)) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· < ·) :=
  ⟨fun a b c h => by
    cases a <;> 

Proof state:
case none
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
b c : WithTop α
h : swap (fun x x_1 => x + x_1) none b < swap (fun x x_1 => x + x_1) none c
⊢ b < c

Next tactic:
cases b
instance contravariantClass_swap_add_lt [LT α] [ContravariantClass α α (swap (· + ·)) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· < ·) :=
  ⟨fun a b c h => by
    cases a <;> 

Proof state:
case some
α : Type u
β : Type v
inst✝² : Add α
a b✝ c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
b c : WithTop α
val✝ : α
h : swap (fun x x_1 => x + x_1) (Option.some val✝) b < swap (fun x x_1 => x + x_1) (Option.some val✝) c
⊢ b < c

Next tactic:
cases b
instance contravariantClass_swap_add_lt [LT α] [ContravariantClass α α (swap (· + ·)) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· < ·) :=
  ⟨fun a b c h => by
    cases a <;> cases b <;> 

Proof state:
case none.none
α : Type u
β : Type v
inst✝² : Add α
a b c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
c : WithTop α
h : swap (fun x x_1 => x + x_1) none none < swap (fun x x_1 => x + x_1) none c
⊢ none < c

Next tactic:
try exact (not_none_lt _ h).elim
instance contravariantClass_swap_add_lt [LT α] [ContravariantClass α α (swap (· + ·)) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· < ·) :=
  ⟨fun a b c h => by
    cases a <;> cases b <;> try 

Proof state:
case none.none
α : Type u
β : Type v
inst✝² : Add α
a b c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
c : WithTop α
h : swap (fun x x_1 => x + x_1) none none < swap (fun x x_1 => x + x_1) none c
⊢ none < c

Next tactic:
exact (not_none_lt _ h).elim
instance contravariantClass_swap_add_lt [LT α] [ContravariantClass α α (swap (· + ·)) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· < ·) :=
  ⟨fun a b c h => by
    cases a <;> cases b <;> 

Proof state:
case none.some
α : Type u
β : Type v
inst✝² : Add α
a b c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
c : WithTop α
val✝ : α
h : swap (fun x x_1 => x + x_1) none (Option.some val✝) < swap (fun x x_1 => x + x_1) none c
⊢ Option.some val✝ < c

Next tactic:
try exact (not_none_lt _ h).elim
instance contravariantClass_swap_add_lt [LT α] [ContravariantClass α α (swap (· + ·)) (· < ·)] :
    ContravariantClass (WithTop α) (WithTop α) (swap (· + ·)) (· < ·) :=
  ⟨fun a b c h => by
    cases a <;> cases b <;> try 

Proof state:
case none.some
α : Type u
β : Type v
inst✝² : Add α
a b c✝ d : WithTop α
x y : α
inst✝¹ : LT α
inst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1
c : WithTop α
val✝ : α
h : swap (fun x x_1 => x + x_1) none (Option.some val✝) < swap (fun x x_1 => x + x_1) none c
⊢ Option.some val✝ < c

Next tactic:
exact (not_none_lt _ h).elim