Functions defined piecewise on a finset #
This file defines Finset.piecewise: Given two functions f, g, s.piecewise f g is a function
which is equal to f on s and g on the complement.
TODO #
Should we deduplicate this from Set.piecewise?
@[simp]
@[simp]
theorem
Finset.piecewise_insert
{ι : Type u_1}
{Ļ : ι ā Sort u_2}
(s : Finset ι)
(f g : (i : ι) ā Ļ i)
[(j : ι) ā Decidable (j ā s)]
[DecidableEq ι]
(j : ι)
[(i : ι) ā Decidable (i ā insert j s)]
:
theorem
Finset.piecewise_singleton
{ι : Type u_1}
{Ļ : ι ā Sort u_2}
(f g : (i : ι) ā Ļ i)
[DecidableEq ι]
(i : ι)
:
theorem
Finset.update_eq_piecewise
{ι : Type u_1}
{β : Type u_3}
[DecidableEq ι]
(f : ι ā β)
(i : ι)
(v : β)
:
theorem
Finset.update_piecewise
{ι : Type u_1}
{Ļ : ι ā Sort u_2}
(s : Finset ι)
(f g : (i : ι) ā Ļ i)
[(j : ι) ā Decidable (j ā s)]
[DecidableEq ι]
(i : ι)
(v : Ļ i)
:
theorem
Finset.update_piecewise_of_mem
{ι : Type u_1}
{Ļ : ι ā Sort u_2}
(s : Finset ι)
(f g : (i : ι) ā Ļ i)
[(j : ι) ā Decidable (j ā s)]
[DecidableEq ι]
{i : ι}
(hi : i ā s)
(v : Ļ i)
:
theorem
Finset.update_piecewise_of_notMem
{ι : Type u_1}
{Ļ : ι ā Sort u_2}
(s : Finset ι)
(f g : (i : ι) ā Ļ i)
[(j : ι) ā Decidable (j ā s)]
[DecidableEq ι]
{i : ι}
(hi : i ā s)
(v : Ļ i)
:
@[simp]
theorem
Finset.piecewise_erase_univ
{ι : Type u_1}
{Ļ : ι ā Sort u_2}
[Fintype ι]
[DecidableEq ι]
(i : ι)
(f g : (i : ι) ā Ļ i)
: