Zulip Chat Archive

Stream: new members

Topic: How to use negative numbers?


tsuki hao (May 27 2024 at 09:59):

import Mathlib
import LeanCopilot

open Nat
open Finset
open BigOperators

example {m n k : } (hm : 1 < m) :
 k in range (n + 1), (choose (n + 1) k) * (-1) ^ k / (k + 1) ^ m = 1 / ((n + m) * (m - 1)!) := by
  sorry

What can I do to make the -1work?Maybe I should open some space?

Yaël Dillies (May 27 2024 at 10:00):

Replace (-1) by (-1 : ℤ)

Kevin Buzzard (May 27 2024 at 10:42):

You might want to consider removing the m-1 completely by replacing the variable m with m'+1 everywhere

Kevin Buzzard (May 27 2024 at 10:44):

If you do this then every occurrence of n will be of the form n+1 and you might then ask whether the equation is still true for n=-1. If it is then you'd be better off replacing n with n'-1 and proving the more general statement


Last updated: May 02 2025 at 03:31 UTC