Theorem: WithTop.distrib'
File: Mathlib/Algebra/Order/Ring/WithTop.lean

tactic: induction' c using WithTop.recTopCoe with c
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b c : WithTop α
⊢ (a + b) * c = a * c + b * c

tactic: by_cases ha : a = 0 <;> simp [ha]
state_before: case top
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
⊢ (a + b) * ⊤ = a * ⊤ + b * ⊤

tactic: by_cases hc : c = 0
state_before: case coe
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
⊢ (a + b) * ↑c = a * ↑c + b * ↑c

tactic: simp [mul_coe hc]
state_before: case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
hc : ¬c = 0
⊢ (a + b) * ↑c = a * ↑c + b * ↑c

tactic: cases a <;> cases b
state_before: case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
hc : ¬c = 0
⊢ (Option.bind (a + b) fun a => Option.some (a * c)) =
    (Option.bind a fun a => Option.some (a * c)) + Option.bind b fun a => Option.some (a * c)

tactic: repeat' first | rfl |exact congr_arg some (add_mul _ _ _)
state_before: case neg.none.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
⊢ (Option.bind (none + none) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)

case neg.none.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (none + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind none fun a => Option.some (a * c)) + Option.bind (Option.some val✝) fun a => Option.some (a * c)

case neg.some.none
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝ : α
⊢ (Option.bind (Option.some val✝ + none) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝) fun a => Option.some (a * c)) + Option.bind none fun a => Option.some (a * c)

case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)

tactic: simp [hc]
state_before: case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
a b : WithTop α
c : α
hc : c = 0
⊢ (a + b) * ↑c = a * ↑c + b * ↑c

tactic: first | rfl |exact congr_arg some (add_mul _ _ _)
state_before: case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)

tactic: rfl
state_before: case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)

tactic: exact congr_arg some (add_mul _ _ _)
state_before: case neg.some.some
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CanonicallyOrderedCommSemiring α
c : α
hc : ¬c = 0
val✝¹ val✝ : α
⊢ (Option.bind (Option.some val✝¹ + Option.some val✝) fun a => Option.some (a * c)) =
    (Option.bind (Option.some val✝¹) fun a => Option.some (a * c)) +
      Option.bind (Option.some val✝) fun a => Option.some (a * c)