Zulip Chat Archive

Stream: new members

Topic: fin_sum/fin_prod


Alex Zhang (Jul 03 2021 at 15:43):

Is there any lemma(s) that helps to close the goal

import algebra.big_operators.basic
import data.real.basic
import tactic

open_locale big_operators

variables {I : Type*} [fintype I] [decidable_eq I]
example (a : ) (i : I) : a =  (j : I), ite (j = i) a 0 := sorry

Ruben Van de Velde (Jul 03 2021 at 16:17):

import algebra.big_operators.basic
import data.real.basic
import tactic

open_locale big_operators

variables {I : Type*} [fintype I] [decidable_eq I]
example (a : ) (i : I) : a =  (j : I), ite (i = j) a 0 := begin
  rw finset.sum_ite_eq,
  simp,
end

with i = j instead of j = i

Notification Bot (Jul 15 2021 at 19:00):

Alex Zhang has marked this topic as resolved.

Notification Bot (Jul 15 2021 at 19:00):

Alex Zhang has marked this topic as unresolved.

Notification Bot (Jul 21 2021 at 08:34):

Alex Zhang has marked this topic as resolved.

Notification Bot (Jul 21 2021 at 08:34):

Alex Zhang has marked this topic as unresolved.

Alex Zhang (Jul 21 2021 at 08:36):

If I want to "reindex" the terms of a sum like the following e.g.:

import tactic
import algebra.big_operators
import data.fintype.card
import data.finset.basic
import field_theory.finite.basic

open_locale big_operators

variables {F : Type*} [field F] [fintype F] [decidable_eq F]
example (i : F) (f : F  F) :  (j : F), f (i - j) =  (k : F), f k :=  sorry

Is #check finset.sum_map the lemma I am supposed to use for showing this?

Yakov Pechersky (Jul 21 2021 at 08:44):

Can you show that (finset.univ : finset F).image ((-) i) = finset.univ?

Alex Zhang (Jul 21 2021 at 08:46):

Do you mean to use finset.sum_map is the right way?

Kevin Buzzard (Jul 21 2021 at 08:46):

I would use docs#finset.sum_congr (no, it's not strong enough)

Yakov Pechersky (Jul 21 2021 at 08:47):

docs#finset.sum_map

Alex Zhang (Jul 21 2021 at 08:51):

Yakov Pechersky said:

Can you show that (finset.univ : finset F).image ((-) i) = finset.univ?

It is true. I will try the proof.

Kevin Buzzard (Jul 21 2021 at 08:52):

I could imagine a specialisation of sum_map which deals with a sum over a permutation of a fintype

Kevin Buzzard (Jul 21 2021 at 08:53):

Ie proves that for a permutation sigma of a base fintype X, sum of f(x) equals sum of f(sigma(X))

Kevin Buzzard (Jul 21 2021 at 08:53):

Do we have that?

Kevin Buzzard (Jul 21 2021 at 08:54):

If you used finsum instead of all this constructivist nonsense you wouldn't even need the fintype :-)

Eric Wieser (Jul 21 2021 at 10:01):

Yes, it's docs#equiv.sum_congr I think? somewhere I can't find

Eric Wieser (Jul 21 2021 at 10:02):

docs#fintype.sum_equiv

Eric Wieser (Jul 21 2021 at 10:05):

import algebra.field
import data.fintype.basic
import algebra.big_operators.basic

open_locale big_operators

variables {F : Type*} [field F] [fintype F] [decidable_eq F]
example (i : F) (f : F  F) :  (j : F), f (i - j) =  (k : F), f k :=
begin
  refine fintype.sum_equiv ((equiv.add_left (-i)).trans (equiv.neg _)) _ _ _,
  simp[add_comm, sub_eq_add_neg],
end

Eric Wieser (Jul 21 2021 at 10:05):

We could do with an equiv.sub_left and equiv.sub_right to complement docs#equiv.add_left and docs#equiv.add_right, which would make the simp just refl

Eric Wieser (Jul 21 2021 at 10:32):

PR'd as #8385


Last updated: Dec 20 2023 at 11:08 UTC