Theorems · Theorem · combinatorics
Finset.fold_ite
∀ {α : Type u_1} {β : Type u_2} {op : β → β → β} [hc : Std.Commutative op] [ha : Std.Associative op] {f : α → β} {b : β}
{s : Finset α} [Std.IdempotentOp op] {g : α → β} (p : α → Prop) [inst : DecidablePred p],
Finset.fold op b (fun i => if p i then f i else g i) s =
op (Finset.fold op b f (Finset.filter p s)) (Finset.fold op b g ({i ∈ s | ¬p i}))A weaker version of Finset.fold_ite',
relying on typeclass idempotency over the whole type,
instead of solely on the seed element.
However, this is easier to use because it does not generate side goals.
- Defined in
- Mathlib.Data.Finset.Fold
- Cited by
- 3 results in Mathlib
- Foundations
- Depth 62 from the axioms · uses propext, Classical.choice, Quot.sound
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites4
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- Finsetstatement and proof · cited by 13,712
- Finset.filterstatement · cited by 949
- Finset.foldstatement · cited by 46
- Finset.fold_ite'proof · cited by 1
Cited by3
Results whose statement or proof uses this declaration.
- Finset.inf_iteproof · cited by 2
- Polynomial.natDegree_hasseDeriv_leproof · cited by 1
- Finset.sup_iteproof · cited by 1