Theorem: Complex.arg_neg_eq_arg_sub_pi_iff
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: rcases lt_trichotomy x.im 0 with (hi | hi | hi)
state_before: a x✝ z x : ℂ
⊢ (-x).arg = x.arg - π ↔ 0 < x.im ∨ x.im = 0 ∧ x.re < 0
state_after: case inl
a x✝ z x : ℂ
hi : x.im < 0
⊢ (-x).arg = x.arg - π ↔ 0 < x.im ∨ x.im = 0 ∧ x.re < 0

case inr.inl
a x✝ z x : ℂ
hi : x.im = 0
⊢ (-x).arg = x.arg - π ↔ 0 < x.im ∨ x.im = 0 ∧ x.re < 0

case inr.inr
a x✝ z x : ℂ
hi : 0 < x.im
⊢ (-x).arg = x.arg - π ↔ 0 < x.im ∨ x.im = 0 ∧ x.re < 0

tactic: simp [hi, hi.ne, hi.not_lt, arg_neg_eq_arg_add_pi_of_im_neg, sub_eq_add_neg, ←
  add_eq_zero_iff_eq_neg, Real.pi_ne_zero]
state_before: case inl
a x✝ z x : ℂ
hi : x.im < 0
⊢ (-x).arg = x.arg - π ↔ 0 < x.im ∨ x.im = 0 ∧ x.re < 0
state_after: no goals

tactic: rw [(ext rfl hi : x = x.re)]
state_before: case inr.inl
a x✝ z x : ℂ
hi : x.im = 0
⊢ (-x).arg = x.arg - π ↔ 0 < x.im ∨ x.im = 0 ∧ x.re < 0
state_after: case inr.inl
a x✝ z x : ℂ
hi : x.im = 0
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0

tactic: rcases lt_trichotomy x.re 0 with (hr | hr | hr)
state_before: case inr.inl
a x✝ z x : ℂ
hi : x.im = 0
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0
state_after: case inr.inl.inl
a x✝ z x : ℂ
hi : x.im = 0
hr : x.re < 0
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0

case inr.inl.inr.inl
a x✝ z x : ℂ
hi : x.im = 0
hr : x.re = 0
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0

case inr.inl.inr.inr
a x✝ z x : ℂ
hi : x.im = 0
hr : 0 < x.re
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0

tactic: rw [arg_ofReal_of_neg hr, ← ofReal_neg, arg_ofReal_of_nonneg (Left.neg_pos_iff.2 hr).le]
state_before: case inr.inl.inl
a x✝ z x : ℂ
hi : x.im = 0
hr : x.re < 0
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0
state_after: case inr.inl.inl
a x✝ z x : ℂ
hi : x.im = 0
hr : x.re < 0
⊢ 0 = π - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0

tactic: simp [hr]
state_before: case inr.inl.inl
a x✝ z x : ℂ
hi : x.im = 0
hr : x.re < 0
⊢ 0 = π - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0
state_after: no goals

tactic: simp [hr, hi, Real.pi_ne_zero]
state_before: case inr.inl.inr.inl
a x✝ z x : ℂ
hi : x.im = 0
hr : x.re = 0
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0
state_after: no goals

tactic: rw [arg_ofReal_of_nonneg hr.le, ← ofReal_neg, arg_ofReal_of_neg (Left.neg_neg_iff.2 hr)]
state_before: case inr.inl.inr.inr
a x✝ z x : ℂ
hi : x.im = 0
hr : 0 < x.re
⊢ (-↑x.re).arg = (↑x.re).arg - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0
state_after: case inr.inl.inr.inr
a x✝ z x : ℂ
hi : x.im = 0
hr : 0 < x.re
⊢ π = 0 - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0

tactic: simp [hr.not_lt, ← add_eq_zero_iff_eq_neg, Real.pi_ne_zero]
state_before: case inr.inl.inr.inr
a x✝ z x : ℂ
hi : x.im = 0
hr : 0 < x.re
⊢ π = 0 - π ↔ 0 < (↑x.re).im ∨ (↑x.re).im = 0 ∧ (↑x.re).re < 0
state_after: no goals

tactic: simp [hi, arg_neg_eq_arg_sub_pi_of_im_pos]
state_before: case inr.inr
a x✝ z x : ℂ
hi : 0 < x.im
⊢ (-x).arg = x.arg - π ↔ 0 < x.im ∨ x.im = 0 ∧ x.re < 0
state_after: no goals