-- Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean
theorem Gamma_ne_zero {s : ℂ} (hs : ∀ m : ℕ, s ≠ -m) : Gamma s ≠ 0

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

Tactic:
apply_fun im

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

Proof state:
case pos
s : ℂ
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
hs : s ≠ -↑n
⊢ s.re ≠ -↑n

Tactic:
contrapose! hs

Result:
case pos
s : ℂ
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
hs : s.re = -↑n
⊢ s = -↑n

Proof state:
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]

Result:
case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
⊢ Real.Gamma s.re ≠ 0

Proof state:
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
⊢ s = ↑s.re

Tactic:
conv_lhs => rw [← Complex.re_add_im s]

Result:
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
⊢ ↑s.re + ↑s.im * I = ↑s.re

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

Tactic:
specialize hs n

Result:
case pos
s : ℂ
h_im : s.im = 0
this : s = ↑s.re
n : ℕ
hs : s ≠ -↑n
⊢ s.re ≠ -↑n

Proof state:
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

Result:
no goals

Proof state:
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]

Result:
no goals

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

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

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

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

Tactic:
intro k

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

Proof state:
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
⊢ Gamma s ≠ 0

Tactic:
by_cases h_im : s.im = 0

Result:
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

Proof state:
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 => ?_

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

Proof state:
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

Result:
no goals

Proof state:
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]

Result:
no goals

Proof state:
case pos
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]

Result:
case pos
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : s.im = 0
this : s = ↑s.re
⊢ Gamma s ≠ 0

Proof state:
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

Result:
case neg
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
this : sin (↑π * s) ≠ 0
A : ↑π / sin (↑π * s) ≠ 0
⊢ Gamma s ≠ 0

Proof state:
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]

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

Proof state:
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

Result:
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

Proof state:
s : ℂ
hs : ∀ (m : ℕ), s ≠ -↑m
h_im : ¬s.im = 0
⊢ sin (↑π * s) ≠ 0

Tactic:
rw [Complex.sin_ne_zero_iff]

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