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

tactic: have hπ : 0 < π := Real.pi_pos
state_before: a x z✝ z : ℂ
⊢ z.arg ∈ Ioc (-π) π
state_after: a x z✝ z : ℂ
hπ : 0 < π
⊢ z.arg ∈ Ioc (-π) π

tactic: rcases eq_or_ne z 0 with (rfl | hz)
state_before: a x z✝ z : ℂ
hπ : 0 < π
⊢ z.arg ∈ Ioc (-π) π
state_after: case inl
a x z : ℂ
hπ : 0 < π
⊢ arg 0 ∈ Ioc (-π) π

case inr
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
⊢ z.arg ∈ Ioc (-π) π

tactic: rcases existsUnique_add_zsmul_mem_Ioc Real.two_pi_pos (arg z) (-π) with ⟨N, hN, -⟩
state_before: case inr
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
⊢ z.arg ∈ Ioc (-π) π
state_after: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + N • (2 * π) ∈ Ioc (-π) (-π + 2 * π)
⊢ z.arg ∈ Ioc (-π) π

tactic: rw [two_mul, neg_add_cancel_left, ← two_mul, zsmul_eq_mul] at hN
state_before: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + N • (2 * π) ∈ Ioc (-π) (-π + 2 * π)
⊢ z.arg ∈ Ioc (-π) π
state_after: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
⊢ z.arg ∈ Ioc (-π) π

tactic: rw [← abs_mul_cos_add_sin_mul_I z, ← cos_add_int_mul_two_pi _ N, ← sin_add_int_mul_two_pi _ N]
state_before: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
⊢ z.arg ∈ Ioc (-π) π
state_after: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
⊢ (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg ∈ Ioc (-π) π

tactic: have := arg_mul_cos_add_sin_mul_I (abs.pos hz) hN
state_before: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
⊢ (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg ∈ Ioc (-π) π
state_after: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
this : (↑(abs z) * (cos ↑(z.arg + ↑N * (2 * π)) + sin ↑(z.arg + ↑N * (2 * π)) * I)).arg = z.arg + ↑N * (2 * π)
⊢ (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg ∈ Ioc (-π) π

tactic: push_cast at this
state_before: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
this : (↑(abs z) * (cos ↑(z.arg + ↑N * (2 * π)) + sin ↑(z.arg + ↑N * (2 * π)) * I)).arg = z.arg + ↑N * (2 * π)
⊢ (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg ∈ Ioc (-π) π
state_after: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
this : (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg = z.arg + ↑N * (2 * π)
⊢ (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg ∈ Ioc (-π) π

tactic: rwa [this]
state_before: case inr.intro.intro
a x z✝ z : ℂ
hπ : 0 < π
hz : z ≠ 0
N : ℤ
hN : z.arg + ↑N * (2 * π) ∈ Ioc (-π) π
this : (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg = z.arg + ↑N * (2 * π)
⊢ (↑(abs z) * (cos (↑z.arg + ↑N * (2 * ↑π)) + sin (↑z.arg + ↑N * (2 * ↑π)) * I)).arg ∈ Ioc (-π) π
state_after: no goals

tactic: simp [hπ, hπ.le]
state_before: case inl
a x z : ℂ
hπ : 0 < π
⊢ arg 0 ∈ Ioc (-π) π
state_after: no goals