Skip to content

Commit 35a0435

Browse files
committed
feat: indicator of a product of sets (leanprover-community#31442)
1 parent cd3a2eb commit 35a0435

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Mathlib/Algebra/BigOperators/GroupWithZero/Finset.lean

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Authors: Johannes Hölzl
55
-/
66
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
77
import Mathlib.Algebra.GroupWithZero.Units.Basic
8-
import Mathlib.Algebra.Notation.Support
8+
import Mathlib.Algebra.Notation.Indicator
99
import Mathlib.Data.Set.Lattice
1010

1111
/-!
@@ -17,7 +17,7 @@ zero.
1717

1818
open Function
1919

20-
variable {ι κ G₀ M₀ : Type*}
20+
variable {ι κ G₀ M₀ : Type*} {α : ι → Type*}
2121

2222
namespace Finset
2323
variable [CommMonoidWithZero M₀] {p : ι → Prop} [DecidablePred p] {f : ι → M₀} {s : Finset ι}
@@ -41,6 +41,10 @@ lemma support_prod_subset (s : Finset ι) (f : ι → κ → M₀) :
4141
support (fun x ↦ ∏ i ∈ s, f i x) ⊆ ⋂ i ∈ s, support (f i) :=
4242
fun _ hx ↦ Set.mem_iInter₂.2 fun _ hi H ↦ hx <| prod_eq_zero hi H
4343

44+
@[simp] lemma _root_.Set.indicator_pi_one_apply (s : Finset ι) (t : ∀ i, Set (α i)) (f : ∀ i, α i) :
45+
((s : Set ι).pi t).indicator 1 f = ∏ i ∈ s, (t i).indicator (M := M₀) 1 (f i) := by
46+
classical simp [Set.indicator, prod_boole]
47+
4448
variable [Nontrivial M₀] [NoZeroDivisors M₀]
4549

4650
lemma prod_eq_zero_iff : ∏ x ∈ s, f x = 0 ↔ ∃ a ∈ s, f a = 0 := by

0 commit comments

Comments
 (0)