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

tactic: suffices H : Tendsto (fun x : ℂ => Real.arcsin ((-x).im / abs x) - π)
    (𝓝[{ z : ℂ | z.im < 0 }] z) (𝓝 (-π)) by
  refine H.congr' ?_
  have : ∀ᶠ x : ℂ in 𝓝 z, x.re < 0 := continuous_re.tendsto z (gt_mem_nhds hre)
  filter_upwards [self_mem_nhdsWithin (s := { z : ℂ | z.im < 0 }),
    mem_nhdsWithin_of_mem_nhds this] with _ him hre
  rw [arg, if_neg hre.not_le, if_neg him.not_le]
state_before: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
⊢ Tendsto arg (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
state_after: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
⊢ Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))

tactic: convert (Real.continuousAt_arcsin.comp_continuousWithinAt
        ((continuous_im.continuousAt.comp_continuousWithinAt continuousWithinAt_neg).div
          continuous_abs.continuousWithinAt (s := { z : ℂ | z.im < 0 }) (_ : abs z ≠ 0))
        ).sub_const π using 1
state_before: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
⊢ Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
state_after: case h.e'_5
a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
⊢ 𝓝 (-π) = 𝓝 ((Real.arcsin ∘ (im ∘ Neg.neg / ⇑abs)) z - π)

a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
⊢ abs z ≠ 0

tactic: refine H.congr' ?_
state_before: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
H : Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
⊢ Tendsto arg (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
state_after: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
H : Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
⊢ (fun x => Real.arcsin ((-x).im / abs x) - π) =ᶠ[𝓝[{z | z.im < 0}] z] arg

tactic: have : ∀ᶠ x : ℂ in 𝓝 z, x.re < 0 := continuous_re.tendsto z (gt_mem_nhds hre)
state_before: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
H : Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
⊢ (fun x => Real.arcsin ((-x).im / abs x) - π) =ᶠ[𝓝[{z | z.im < 0}] z] arg
state_after: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
H : Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
this : ∀ᶠ (x : ℂ) in 𝓝 z, x.re < 0
⊢ (fun x => Real.arcsin ((-x).im / abs x) - π) =ᶠ[𝓝[{z | z.im < 0}] z] arg

tactic: filter_upwards [self_mem_nhdsWithin (s := { z : ℂ | z.im < 0 }),
  mem_nhdsWithin_of_mem_nhds this] with _ him hre
state_before: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
H : Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
this : ∀ᶠ (x : ℂ) in 𝓝 z, x.re < 0
⊢ (fun x => Real.arcsin ((-x).im / abs x) - π) =ᶠ[𝓝[{z | z.im < 0}] z] arg
state_after: case h
a x z✝ z : ℂ
hre✝ : z.re < 0
him✝ : z.im = 0
H : Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
this : ∀ᶠ (x : ℂ) in 𝓝 z, x.re < 0
a✝ : ℂ
him : a✝.im < 0
hre : a✝.re < 0
⊢ Real.arcsin ((-a✝).im / abs a✝) - π = a✝.arg

tactic: rw [arg, if_neg hre.not_le, if_neg him.not_le]
state_before: case h
a x z✝ z : ℂ
hre✝ : z.re < 0
him✝ : z.im = 0
H : Tendsto (fun x => Real.arcsin ((-x).im / abs x) - π) (𝓝[{z | z.im < 0}] z) (𝓝 (-π))
this : ∀ᶠ (x : ℂ) in 𝓝 z, x.re < 0
a✝ : ℂ
him : a✝.im < 0
hre : a✝.re < 0
⊢ Real.arcsin ((-a✝).im / abs a✝) - π = a✝.arg
state_after: no goals

tactic: simp [him]
state_before: case h.e'_5
a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
⊢ 𝓝 (-π) = 𝓝 ((Real.arcsin ∘ (im ∘ Neg.neg / ⇑abs)) z - π)
state_after: no goals

tactic: lift z to ℝ using him
state_before: a x z✝ z : ℂ
hre : z.re < 0
him : z.im = 0
⊢ abs z ≠ 0
state_after: case intro
a x z✝ : ℂ
z : ℝ
hre : (↑z).re < 0
⊢ abs ↑z ≠ 0

tactic: simpa using hre.ne
state_before: case intro
a x z✝ : ℂ
z : ℝ
hre : (↑z).re < 0
⊢ abs ↑z ≠ 0
state_after: no goals