Indicator function #
This file defines the indicator function of a set. More lemmas can be found in
Mathlib/Algebra/Group/Indicator.lean.
Main declarations #
Set.indicator (s : Set α) (f : α → β) (a : α)isf aifa ∈ sand is0otherwise.Set.mulIndicator (s : Set α) (f : α → β) (a : α)isf aifa ∈ sand is1otherwise.
Implementation note #
In mathematics, an indicator function or a characteristic function is a function
used to indicate membership of an element in a set s,
having the value 1 for all elements of s and the value 0 otherwise.
But since it is usually used to restrict a function to a certain set s,
we let the indicator function take the value f x for some function f, instead of 1.
If the usual indicator function is needed, just set f to be the constant function fun _ ↦ 1.
The indicator function is implemented non-computably, to avoid having to pass around Decidable
arguments. This is in contrast with the design of Pi.single or Set.piecewise.
Tags #
indicator, characteristic
Set.mulIndicator s f a is f a if a ∈ s, 1 otherwise.
Instances For
Alias of Set.indicator_of_notMem.
Alias of Set.mulIndicator_of_notMem.
If a multiplicative indicator function is not equal to 1 at a point, then that point is in the
set.
See Set.eqOn_mulIndicator' for the version with sᶜ.
See Set.eqOn_indicator' for the version with sᶜ.
See Set.eqOn_mulIndicator for the version with s.
See Set.eqOn_indicator for the version with s.
Alias of Set.mulIndicator_preimage_of_notMem.