/-- Riemann zeta functional equation, formulated for `ζ`: if `1 - s ∉ ℕ`, then we have
`ζ (1 - s) = 2 ^ (1 - s) * π ^ (-s) * Γ s * sin (π * (1 - s) / 2) * ζ s`. -/
theorem riemannZeta_one_sub {s : ℂ} (hs : ∀ n : ℕ, s ≠ -n) (hs' : s ≠ 1) :
    riemannZeta (1 - s) =
      (2 : ℂ) ^ (1 - s) * (π : ℂ) ^ (-s) * Gamma s * sin (π * (1 - s) / 2) * riemannZeta s := by
  -- Deducing this from the previous formulations is quite involved. The proof uses two
  -- nontrivial facts (the doubling formula and reflection formula for Gamma) and a lot of careful
  -- rearrangement, requiring several non-vanishing statements as input to `field_simp`.
  have hs_ne : s ≠ 0 := by contrapose! hs; rw [hs]; exact ⟨0, by rw [Nat.cast_zero, neg_zero]⟩
  have h_sqrt : (sqrt π : ℂ) ≠ 0 := ofReal_ne_zero.mpr (sqrt_ne_zero'.mpr pi_pos)
  have h_pow : (2 : ℂ) ^ (s - 1) ≠ 0 := by
    rw [Ne.def, cpow_eq_zero_iff, not_and_or]
    exact Or.inl two_ne_zero
  have h_Ga_ne1 : Gamma (s / 2) ≠ 0 := by
    rw [Ne.def, Complex.Gamma_eq_zero_iff]
    contrapose! hs
    obtain ⟨m, hm⟩ := hs
    rw [div_eq_iff (two_ne_zero' ℂ), ← Nat.cast_two, neg_mul, ← Nat.cast_mul] at hm
    exact ⟨m * 2, by rw [hm]⟩
  have h_Ga_eq : Gamma s = Gamma (s / 2) * Gamma ((s + 1) / 2) * (2 : ℂ) ^ (s - 1) / sqrt π := by
    rw [add_div, Complex.Gamma_mul_Gamma_add_half, mul_div_cancel' _ (two_ne_zero' ℂ),
      (by ring : 1 - s = -(s - 1)), cpow_neg, ← div_eq_mul_inv, eq_div_iff h_sqrt,
      div_mul_eq_mul_div₀, div_mul_cancel _ h_pow]
  have h_Ga_ne3 : Gamma ((s + 1) / 2) ≠ 0 := by
    have h_Ga_aux : Gamma s ≠ 0 := Complex.Gamma_ne_zero hs
    contrapose! h_Ga_aux
    rw [h_Ga_eq, h_Ga_aux, mul_zero, zero_mul, zero_div]
  rw [riemannZeta, Function.update_noteq (by rwa [sub_ne_zero, ne_comm] : 1 - s ≠ 0),
    Function.update_noteq hs_ne, riemannCompletedZeta_one_sub, mul_div, eq_div_iff h_Ga_ne1,
    mul_comm, ← mul_div_assoc]
  -- Now rule out case of s = positive odd integer & deduce further non-vanishing statements
  by_cases hs_pos_odd : ∃ n : ℕ, s = 1 + 2 * n
  · -- Note the case n = 0 (i.e. s = 1) works OK here, but only because we have used
    -- `Function.update_noteq` to change the goal; the original goal is genuinely false for s = 1.
    obtain ⟨n, rfl⟩ := hs_pos_odd
    have : (1 - (1 + 2 * (n : ℂ))) / 2 = -↑n := by
      rw [← sub_sub, sub_self, zero_sub, neg_div, mul_div_cancel_left _ (two_ne_zero' ℂ)]
    

Proof state:
case pos.intro
h_sqrt : ↑(sqrt π) ≠ 0
n : ℕ
hs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1
hs' : 1 + 2 * ↑n ≠ 1
hs_ne : 1 + 2 * ↑n ≠ 0
h_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0
h_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0
h_Ga_eq :
  Complex.Gamma (1 + 2 * ↑n) =
    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)
h_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0
this : (1 - (1 + 2 * ↑n)) / 2 = -↑n
⊢ Complex.Gamma ((1 + 2 * ↑n) / 2) * (↑π ^ ((1 - (1 + 2 * ↑n)) / 2) * riemannCompletedZeta (1 + 2 * ↑n)) /
      Complex.Gamma ((1 - (1 + 2 * ↑n)) / 2) =
    2 ^ (1 - (1 + 2 * ↑n)) * ↑π ^ (-(1 + 2 * ↑n)) * Complex.Gamma (1 + 2 * ↑n) *
        Complex.sin (↑π * (1 - (1 + 2 * ↑n)) / 2) *
      (↑π ^ ((1 + 2 * ↑n) / 2) * riemannCompletedZeta (1 + 2 * ↑n))

Next tactic:
rw [this, Complex.Gamma_neg_nat_eq_zero, div_zero]