Theorem: ENNReal.log_mul_add
File: Mathlib/Analysis/SpecialFunctions/Log/ENNReal.lean

tactic: rcases ENNReal.trichotomy x with (rfl | rfl | x_real)
state_before: x y : ℝ≥0∞
⊢ (x * y).log = x.log + y.log
state_after: case inl
y : ℝ≥0∞
⊢ (0 * y).log = log 0 + y.log

case inr.inl
y : ℝ≥0∞
⊢ (⊤ * y).log = ⊤.log + y.log

case inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * y).log = x.log + y.log

tactic: simp
state_before: case inl
y : ℝ≥0∞
⊢ (0 * y).log = log 0 + y.log
state_after: no goals

tactic: rw [log_top]
state_before: case inr.inl
y : ℝ≥0∞
⊢ (⊤ * y).log = ⊤.log + y.log
state_after: case inr.inl
y : ℝ≥0∞
⊢ (⊤ * y).log = ⊤ + y.log

tactic: rcases ENNReal.trichotomy y with (rfl | rfl | y_real)
state_before: case inr.inl
y : ℝ≥0∞
⊢ (⊤ * y).log = ⊤ + y.log
state_after: case inr.inl.inl

⊢ (⊤ * 0).log = ⊤ + log 0

case inr.inl.inr.inl

⊢ (⊤ * ⊤).log = ⊤ + ⊤.log

case inr.inl.inr.inr
y : ℝ≥0∞
y_real : 0 < y.toReal
⊢ (⊤ * y).log = ⊤ + y.log

tactic: rw [mul_zero, log_zero, EReal.add_bot]
state_before: case inr.inl.inl

⊢ (⊤ * 0).log = ⊤ + log 0
state_after: no goals

tactic: simp
state_before: case inr.inl.inr.inl

⊢ (⊤ * ⊤).log = ⊤ + ⊤.log
state_after: no goals

tactic: rw [log_pos_real' y_real, ENNReal.top_mul', EReal.top_add_coe, log_eq_top_iff]
state_before: case inr.inl.inr.inr
y : ℝ≥0∞
y_real : 0 < y.toReal
⊢ (⊤ * y).log = ⊤ + y.log
state_after: case inr.inl.inr.inr
y : ℝ≥0∞
y_real : 0 < y.toReal
⊢ (if y = 0 then 0 else ⊤) = ⊤

tactic: simp only [ite_eq_right_iff, zero_ne_top, imp_false]
state_before: case inr.inl.inr.inr
y : ℝ≥0∞
y_real : 0 < y.toReal
⊢ (if y = 0 then 0 else ⊤) = ⊤
state_after: case inr.inl.inr.inr
y : ℝ≥0∞
y_real : 0 < y.toReal
⊢ ¬y = 0

tactic: exact Ne.symm (ne_of_lt (ENNReal.toReal_pos_iff.1 y_real).1)
state_before: case inr.inl.inr.inr
y : ℝ≥0∞
y_real : 0 < y.toReal
⊢ ¬y = 0
state_after: no goals

tactic: rw [log_pos_real' x_real]
state_before: case inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * y).log = x.log + y.log
state_after: case inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log

tactic: rcases ENNReal.trichotomy y with (rfl | rfl | y_real)
state_before: case inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log
state_after: case inr.inr.inl
x : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * 0).log = ↑(Real.log x.toReal) + log 0

case inr.inr.inr.inl
x : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * ⊤).log = ↑(Real.log x.toReal) + ⊤.log

case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log

tactic: simp
state_before: case inr.inr.inl
x : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * 0).log = ↑(Real.log x.toReal) + log 0
state_after: no goals

tactic: simp [Ne.symm (ne_of_lt (ENNReal.toReal_pos_iff.1 x_real).1)]
state_before: case inr.inr.inr.inl
x : ℝ≥0∞
x_real : 0 < x.toReal
⊢ (x * ⊤).log = ↑(Real.log x.toReal) + ⊤.log
state_after: no goals

tactic: have xy_real := Real.mul_pos x_real y_real
state_before: case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log
state_after: case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
xy_real : 0 < x.toReal * y.toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log

tactic: rw [← ENNReal.toReal_mul] at xy_real
state_before: case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
xy_real : 0 < x.toReal * y.toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log
state_after: case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
xy_real : 0 < (x * y).toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log

tactic: rw_mod_cast [log_pos_real' xy_real, log_pos_real' y_real, ENNReal.toReal_mul]
state_before: case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
xy_real : 0 < (x * y).toReal
⊢ (x * y).log = ↑(Real.log x.toReal) + y.log
state_after: case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
xy_real : 0 < (x * y).toReal
⊢ Real.log (x.toReal * y.toReal) = Real.log x.toReal + Real.log y.toReal

tactic: exact Real.log_mul (Ne.symm (ne_of_lt x_real)) (Ne.symm (ne_of_lt y_real))
state_before: case inr.inr.inr.inr
x y : ℝ≥0∞
x_real : 0 < x.toReal
y_real : 0 < y.toReal
xy_real : 0 < (x * y).toReal
⊢ Real.log (x.toReal * y.toReal) = Real.log x.toReal + Real.log y.toReal
state_after: no goals