Zulip Chat Archive

Stream: Is there code for X?

Topic: Shifting tsum index


Gareth Ma (Aug 15 2024 at 13:20):

Does the following not exist? ft. my somewhat hilarious proof:

example {f :   } {k : } : ∑' n, f n = ∑' n, f (n + k) := by
  let e :    := {
    toFun := fun x  x + k
    invFun := fun x  x - k
    left_inv := by intro; simp
    right_inv := by intro; simp
  }
  change ∑' n, f n = ∑' n, f (e n)
  rw [e.tsum_eq]

Seems like it would belong in Topology/Algebra/InfiniteSum/NatInt.lean if it exists, but I can't find it

Yaël Dillies (Aug 15 2024 at 13:20):

Your Equiv is just Equiv.addRight k

Gareth Ma (Aug 15 2024 at 13:21):

Ah so it's

theorem tsum_of_ {f :   } {k : } : ∑' n, f n = ∑' n, f (n + k) :=
  ((Equiv.addRight k).tsum_eq f).symm

Gareth Ma (Aug 15 2024 at 13:21):

Great thanks :D

Yaël Dillies (Aug 15 2024 at 13:23):

theorem tsum_of_ {f :   } {k : } : ∑' n, f n = ∑' n, f (n + k) :=
  (Equiv.subRight k).tsum_eq f

even

Gareth Ma (Aug 15 2024 at 13:24):

Doesn't seem to work for me

Gareth Ma (Aug 15 2024 at 13:25):

It proves ∑' n, f (n - k) = ∑' n, f n only

Yaël Dillies (Aug 15 2024 at 13:29):

Ah yeah whoops


Last updated: May 02 2025 at 03:31 UTC