Theorem: Complex.Gamma_ne_zero
File: Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean

tactic: by_cases h_im : s.im = 0
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
⊢ Gamma s ≠ 0
state_after: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
⊢ Gamma s ≠ 0

case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
⊢ Gamma s ≠ 0

tactic: have : s = ↑s.re := by
  conv_lhs => rw [← Complex.re_add_im s]
  rw [h_im, ofReal_zero, zero_mul, add_zero]
state_before: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
⊢ Gamma s ≠ 0
state_after: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
⊢ Gamma s ≠ 0

tactic: rw [this, Gamma_ofReal, ofReal_ne_zero]
state_before: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
⊢ Gamma s ≠ 0
state_after: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
⊢ Real.Gamma s.re ≠ 0

tactic: refine Real.Gamma_ne_zero fun n => ?_
state_before: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
⊢ Real.Gamma s.re ≠ 0
state_after: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
⊢ s.re ≠ -↑n

tactic: specialize hs n
state_before: case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
⊢ s.re ≠ -↑n
state_after: case pos
s : ℂ
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
hs : s ≠ -↑n
⊢ s.re ≠ -↑n

tactic: contrapose! hs
state_before: case pos
s : ℂ
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
hs : s ≠ -↑n
⊢ s.re ≠ -↑n
state_after: case pos
s : ℂ
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
hs : s.re = -↑n
⊢ s = -↑n

tactic: rwa [this, ← ofReal_natCast, ← ofReal_neg, ofReal_inj]
state_before: case pos
s : ℂ
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
hs : s.re = -↑n
⊢ s = -↑n
state_after: no goals

tactic: conv_lhs => rw [← Complex.re_add_im s]
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
⊢ s = ↑s.re
state_after: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
⊢ ↑s.re + ↑s.im * I = ↑s.re

tactic: rw [h_im, ofReal_zero, zero_mul, add_zero]
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
⊢ ↑s.re + ↑s.im * I = ↑s.re
state_after: no goals

tactic: have : sin (↑π * s) ≠ 0 := by
  rw [Complex.sin_ne_zero_iff]
  intro k
  apply_fun im
  rw [im_ofReal_mul, ← ofReal_intCast, ← ofReal_mul, ofReal_im]
  exact mul_ne_zero Real.pi_pos.ne' h_im
state_before: case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
⊢ Gamma s ≠ 0
state_after: case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
this : sin (↑π * s) ≠ 0
⊢ Gamma s ≠ 0

tactic: have A := div_ne_zero (ofReal_ne_zero.mpr Real.pi_pos.ne') this
state_before: case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
this : sin (↑π * s) ≠ 0
⊢ Gamma s ≠ 0
state_after: case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
this : sin (↑π * s) ≠ 0
A : ↑π / sin (↑π * s) ≠ 0
⊢ Gamma s ≠ 0

tactic: rw [← Complex.Gamma_mul_Gamma_one_sub s, mul_ne_zero_iff] at A
state_before: case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
this : sin (↑π * s) ≠ 0
A : ↑π / sin (↑π * s) ≠ 0
⊢ Gamma s ≠ 0
state_after: case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
this : sin (↑π * s) ≠ 0
A : Gamma s ≠ 0 ∧ Gamma (1 - s) ≠ 0
⊢ Gamma s ≠ 0

tactic: exact A.1
state_before: case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
this : sin (↑π * s) ≠ 0
A : Gamma s ≠ 0 ∧ Gamma (1 - s) ≠ 0
⊢ Gamma s ≠ 0
state_after: no goals

tactic: rw [Complex.sin_ne_zero_iff]
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
⊢ sin (↑π * s) ≠ 0
state_after: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
⊢ ∀ (k : ℤ), ↑π * s ≠ ↑k * ↑π

tactic: intro k
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
⊢ ∀ (k : ℤ), ↑π * s ≠ ↑k * ↑π
state_after: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
k : ℤ
⊢ ↑π * s ≠ ↑k * ↑π

tactic: apply_fun im
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
k : ℤ
⊢ ↑π * s ≠ ↑k * ↑π
state_after: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
k : ℤ
⊢ (↑π * s).im ≠ (↑k * ↑π).im

tactic: rw [im_ofReal_mul, ← ofReal_intCast, ← ofReal_mul, ofReal_im]
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
k : ℤ
⊢ (↑π * s).im ≠ (↑k * ↑π).im
state_after: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
k : ℤ
⊢ π * s.im ≠ 0

tactic: exact mul_ne_zero Real.pi_pos.ne' h_im
state_before: s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
k : ℤ
⊢ π * s.im ≠ 0
state_after: no goals