Theorem: Complex.log_inv_eq_ite
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: by_cases hx : x = 0
state_before: x : ℂ
⊢ log x⁻¹ = if x.arg = π then -(starRingEnd ℂ) (log x) else -log x
state_after: case pos
x : ℂ
hx : x = 0
⊢ log x⁻¹ = if x.arg = π then -(starRingEnd ℂ) (log x) else -log x

case neg
x : ℂ
hx : ¬x = 0
⊢ log x⁻¹ = if x.arg = π then -(starRingEnd ℂ) (log x) else -log x

tactic: rw [inv_def, log_mul_ofReal, Real.log_inv, ofReal_neg, ← sub_eq_neg_add, log_conj_eq_ite]
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ log x⁻¹ = if x.arg = π then -(starRingEnd ℂ) (log x) else -log x
state_after: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then log x else (starRingEnd ℂ) (log x)) - ↑(Real.log (normSq x)) =
    if x.arg = π then -(starRingEnd ℂ) (log x) else -log x

case neg.hr
x : ℂ
hx : ¬x = 0
⊢ 0 < (normSq x)⁻¹

case neg.hx
x : ℂ
hx : ¬x = 0
⊢ (starRingEnd ℂ) x ≠ 0

tactic: simp [hx]
state_before: case pos
x : ℂ
hx : x = 0
⊢ log x⁻¹ = if x.arg = π then -(starRingEnd ℂ) (log x) else -log x
state_after: no goals

tactic: simp_rw [log, map_add, map_mul, conj_ofReal, conj_I, normSq_eq_abs, Real.log_pow,
  Nat.cast_two, ofReal_mul, neg_add, mul_neg, neg_neg]
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then log x else (starRingEnd ℂ) (log x)) - ↑(Real.log (normSq x)) =
    if x.arg = π then -(starRingEnd ℂ) (log x) else -log x
state_after: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then ↑(Real.log (abs x)) + ↑x.arg * I else ↑(Real.log (abs x)) + -(↑x.arg * I)) -
      ↑2 * ↑(Real.log (abs x)) =
    if x.arg = π then -↑(Real.log (abs x)) + ↑x.arg * I else -↑(Real.log (abs x)) + -(↑x.arg * I)

tactic: norm_num
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then ↑(Real.log (abs x)) + ↑x.arg * I else ↑(Real.log (abs x)) + -(↑x.arg * I)) -
      ↑2 * ↑(Real.log (abs x)) =
    if x.arg = π then -↑(Real.log (abs x)) + ↑x.arg * I else -↑(Real.log (abs x)) + -(↑x.arg * I)
state_after: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then ↑(Real.log (abs x)) + ↑x.arg * I else ↑(Real.log (abs x)) + -(↑x.arg * I)) -
      2 * ↑(Real.log (abs x)) =
    if x.arg = π then -↑(Real.log (abs x)) + ↑x.arg * I else -↑(Real.log (abs x)) + -(↑x.arg * I)

tactic: rw [two_mul]
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then ↑(Real.log (abs x)) + ↑x.arg * I else ↑(Real.log (abs x)) + -(↑x.arg * I)) -
      2 * ↑(Real.log (abs x)) =
    if x.arg = π then -↑(Real.log (abs x)) + ↑x.arg * I else -↑(Real.log (abs x)) + -(↑x.arg * I)
state_after: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then ↑(Real.log (abs x)) + ↑x.arg * I else ↑(Real.log (abs x)) + -(↑x.arg * I)) -
      (↑(Real.log (abs x)) + ↑(Real.log (abs x))) =
    if x.arg = π then -↑(Real.log (abs x)) + ↑x.arg * I else -↑(Real.log (abs x)) + -(↑x.arg * I)

tactic: split_ifs
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if x.arg = π then ↑(Real.log (abs x)) + ↑x.arg * I else ↑(Real.log (abs x)) + -(↑x.arg * I)) -
      (↑(Real.log (abs x)) + ↑(Real.log (abs x))) =
    if x.arg = π then -↑(Real.log (abs x)) + ↑x.arg * I else -↑(Real.log (abs x)) + -(↑x.arg * I)
state_after: case pos
x : ℂ
hx : ¬x = 0
h✝ : x.arg = π
⊢ ↑(Real.log (abs x)) + ↑x.arg * I - (↑(Real.log (abs x)) + ↑(Real.log (abs x))) = -↑(Real.log (abs x)) + ↑x.arg * I

case neg
x : ℂ
hx : ¬x = 0
h✝ : ¬x.arg = π
⊢ ↑(Real.log (abs x)) + -(↑x.arg * I) - (↑(Real.log (abs x)) + ↑(Real.log (abs x))) =
    -↑(Real.log (abs x)) + -(↑x.arg * I)

tactic: rw [add_sub_right_comm, sub_add_cancel_left]
state_before: case pos
x : ℂ
hx : ¬x = 0
h✝ : x.arg = π
⊢ ↑(Real.log (abs x)) + ↑x.arg * I - (↑(Real.log (abs x)) + ↑(Real.log (abs x))) = -↑(Real.log (abs x)) + ↑x.arg * I
state_after: no goals

tactic: rw [add_sub_right_comm, sub_add_cancel_left]
state_before: case neg
x : ℂ
hx : ¬x = 0
h✝ : ¬x.arg = π
⊢ ↑(Real.log (abs x)) + -(↑x.arg * I) - (↑(Real.log (abs x)) + ↑(Real.log (abs x))) =
    -↑(Real.log (abs x)) + -(↑x.arg * I)
state_after: no goals

tactic: rwa [inv_pos, Complex.normSq_pos]
state_before: case neg.hr
x : ℂ
hx : ¬x = 0
⊢ 0 < (normSq x)⁻¹
state_after: no goals

tactic: rwa [map_ne_zero]
state_before: case neg.hx
x : ℂ
hx : ¬x = 0
⊢ (starRingEnd ℂ) x ≠ 0
state_after: no goals