Theorem: WithZero.covariantClass_add_le
File: Mathlib/Algebra/Order/GroupWithZero/Canonical.lean

tactic: refine ⟨fun a b c hbc => ?_⟩
state_before: α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
⊢ CovariantClass (WithZero α) (WithZero α) (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
state_after: α : Type u_1
inst✝² : Preorder α
a✝ b✝ : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a b c : WithZero α
hbc : b ≤ c
⊢ a + b ≤ a + c

tactic: induction a
state_before: α : Type u_1
inst✝² : Preorder α
a✝ b✝ : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a b c : WithZero α
hbc : b ≤ c
⊢ a + b ≤ a + c
state_after: case h₁
α : Type u_1
inst✝² : Preorder α
a b✝ : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
b c : WithZero α
hbc : b ≤ c
⊢ 0 + b ≤ 0 + c

case h₂
α : Type u_1
inst✝² : Preorder α
a b✝ : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
b c : WithZero α
hbc : b ≤ c
a✝ : α
⊢ ↑a✝ + b ≤ ↑a✝ + c

tactic: induction b
state_before: case h₂
α : Type u_1
inst✝² : Preorder α
a b✝ : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
b c : WithZero α
hbc : b ≤ c
a✝ : α
⊢ ↑a✝ + b ≤ ↑a✝ + c
state_after: case h₂.h₁
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
c : WithZero α
a✝ : α
hbc : 0 ≤ c
⊢ ↑a✝ + 0 ≤ ↑a✝ + c

case h₂.h₂
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
c : WithZero α
a✝¹ a✝ : α
hbc : ↑a✝ ≤ c
⊢ ↑a✝¹ + ↑a✝ ≤ ↑a✝¹ + c

tactic: rwa [zero_add, zero_add]
state_before: case h₁
α : Type u_1
inst✝² : Preorder α
a b✝ : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
b c : WithZero α
hbc : b ≤ c
⊢ 0 + b ≤ 0 + c
state_after: no goals

tactic: rw [add_zero]
state_before: case h₂.h₁
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
c : WithZero α
a✝ : α
hbc : 0 ≤ c
⊢ ↑a✝ + 0 ≤ ↑a✝ + c
state_after: case h₂.h₁
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
c : WithZero α
a✝ : α
hbc : 0 ≤ c
⊢ ↑a✝ ≤ ↑a✝ + c

tactic: induction c
state_before: case h₂.h₁
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
c : WithZero α
a✝ : α
hbc : 0 ≤ c
⊢ ↑a✝ ≤ ↑a✝ + c
state_after: case h₂.h₁.h₁
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝ : α
hbc : 0 ≤ 0
⊢ ↑a✝ ≤ ↑a✝ + 0

case h₂.h₁.h₂
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ : α
hbc : 0 ≤ ↑a✝
⊢ ↑a✝¹ ≤ ↑a✝¹ + ↑a✝

tactic: rw [add_zero]
state_before: case h₂.h₁.h₁
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝ : α
hbc : 0 ≤ 0
⊢ ↑a✝ ≤ ↑a✝ + 0
state_after: no goals

tactic: rw [← coe_add, coe_le_coe]
state_before: case h₂.h₁.h₂
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ : α
hbc : 0 ≤ ↑a✝
⊢ ↑a✝¹ ≤ ↑a✝¹ + ↑a✝
state_after: case h₂.h₁.h₂
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ : α
hbc : 0 ≤ ↑a✝
⊢ a✝¹ ≤ a✝¹ + a✝

tactic: exact le_add_of_nonneg_right (h _)
state_before: case h₂.h₁.h₂
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ : α
hbc : 0 ≤ ↑a✝
⊢ a✝¹ ≤ a✝¹ + a✝
state_after: no goals

tactic: rcases WithBot.coe_le_iff.1 hbc with ⟨c, rfl, hbc'⟩
state_before: case h₂.h₂
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
c : WithZero α
a✝¹ a✝ : α
hbc : ↑a✝ ≤ c
⊢ ↑a✝¹ + ↑a✝ ≤ ↑a✝¹ + c
state_after: case h₂.h₂.intro.intro
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ c : α
hbc' : a✝ ≤ c
hbc : ↑a✝ ≤ ↑c
⊢ ↑a✝¹ + ↑a✝ ≤ ↑a✝¹ + ↑c

tactic: refine le_trans ?_ (le_of_eq <| coe_add _ _)
state_before: case h₂.h₂.intro.intro
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ c : α
hbc' : a✝ ≤ c
hbc : ↑a✝ ≤ ↑c
⊢ ↑a✝¹ + ↑a✝ ≤ ↑a✝¹ + ↑c
state_after: case h₂.h₂.intro.intro
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ c : α
hbc' : a✝ ≤ c
hbc : ↑a✝ ≤ ↑c
⊢ ↑a✝¹ + ↑a✝ ≤ ↑(a✝¹ + c)

tactic: rw [← coe_add, coe_le_coe]
state_before: case h₂.h₂.intro.intro
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ c : α
hbc' : a✝ ≤ c
hbc : ↑a✝ ≤ ↑c
⊢ ↑a✝¹ + ↑a✝ ≤ ↑(a✝¹ + c)
state_after: case h₂.h₂.intro.intro
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ c : α
hbc' : a✝ ≤ c
hbc : ↑a✝ ≤ ↑c
⊢ a✝¹ + a✝ ≤ a✝¹ + c

tactic: exact add_le_add_left hbc' _
state_before: case h₂.h₂.intro.intro
α : Type u_1
inst✝² : Preorder α
a b : α
inst✝¹ : AddZeroClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : ∀ (a : α), 0 ≤ a
a✝¹ a✝ c : α
hbc' : a✝ ≤ c
hbc : ↑a✝ ≤ ↑c
⊢ a✝¹ + a✝ ≤ a✝¹ + c
state_after: no goals