Functions with prescribed values
DefinitionFinite tuples with prescribed default values#✓fully proved
Finite tuples constrained on P and equal to a prescribed default elsewhere.
def piFinsetOn (P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ) :
Finset (ι → σ) :=
piFinset fun i => if P i then T i else {d}
Used by 17
TheoremMembership in default-padded finite tuples#✓fully proved
Membership gives the allowed values on the active indices and the default off them.
@[simp] theorem mem_piFinsetOn (P : ι → Prop) [DecidablePred P]
(T : ι → Finset σ) (d : σ) (t : ι → σ) :
t ∈ piFinsetOn P T d ↔ ∀ i, (P i → t i ∈ T i) ∧ (¬P i → t i = d)
def piFinsetOn (P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ) :
Finset (ι → σ) :=
piFinset fun i => if P i then T i else {d}
MathlibExt/Data/Fintype/PiFinsetOn.lean:35
Uses 1 · Used by 7
TheoremNumber of default-padded finite tuples#✓fully proved
Inactive coordinates contribute one choice, so only active coordinates enter the product.
theorem card_piFinsetOn (P : ι → Prop) [DecidablePred P]
(T : ι → Finset σ) (d : σ) :
(piFinsetOn P T d).card = ∏ i with P i, (T i).card
def piFinsetOn (P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ) :
Finset (ι → σ) :=
piFinset fun i => if P i then T i else {d}
MathlibExt/Data/Fintype/PiFinsetOn.lean:35
Uses 1 · Used by 2
TheoremProduct of sums over default-padded tuples#✓fully proved
Distribute a product of finite sums over the default-padded tuples of choices.
theorem sum_piFinsetOn_prod {R : Type*} [CommSemiring R]
(P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ) (H : ι → σ → R) :
∑ t ∈ piFinsetOn P T d, ∏ i with P i, H i (t i) =
∏ i with P i, ∑ x ∈ T i, H i x
def piFinsetOn (P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ) :
Finset (ι → σ) :=
piFinset fun i => if P i then T i else {d}
MathlibExt/Data/Fintype/PiFinsetOn.lean:35
Uses 1 · Used by 2
TheoremProducts of factorized functions over label tuples#✓fully proved
Products of factorized functions factor through the tuples of their labels.
theorem prod_sum_eq_sum_piFinsetOn_mul {R : Type*} [CommSemiring R]
(P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ)
(f g : ι → σ → R) :
∏ i with P i, ∑ x ∈ T i, f i x * g i x =
∑ t ∈ piFinsetOn P T d, (∏ i with P i, f i (t i)) * ∏ i with P i, g i (t i)
def piFinsetOn (P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ) :
Finset (ι → σ) :=
piFinset fun i => if P i then T i else {d}
MathlibExt/Data/Fintype/PiFinsetOn.lean:35
Uses 2 · Used by 1
TheoremUnique default completion of active coordinates#✓fully proved
Prescribed active coordinates have exactly one completion with the chosen default.
theorem existsUnique_piFinsetOn (P : ι → Prop) [DecidablePred P]
(T : ι → Finset σ) (d : σ) (t : ι → σ) (ht : ∀ i, P i → t i ∈ T i) :
∃! b : ι → σ, b ∈ piFinsetOn P T d ∧ ∀ i, P i → b i = t i
def piFinsetOn (P : ι → Prop) [DecidablePred P] (T : ι → Finset σ) (d : σ) :
Finset (ι → σ) :=
piFinset fun i => if P i then T i else {d}
MathlibExt/Data/Fintype/PiFinsetOn.lean:35
Uses 2
TheoremNumber of dependent functions with prescribed values#✓fully proved
The number of dependent functions in piFinset s with prescribed values on S is the
product of the numbers of choices outside S.
theorem card_filter_piFinset_eqOn_of_mem (s : (i : ι) → Finset (α i)) (S : Finset ι)
(f : (i : {i // i ∈ S}) → α i.1) (hf : ∀ i, f i ∈ s i.1) :
{g ∈ piFinset s | ∀ i, g i.1 = f i}.card =
∏ i ∈ Finset.univ \ S, (s i).card
Used by 1
TheoremNumber of functions agreeing with a given one on a set#✓fully proved
The number of functions agreeing with f on S is the number of unrestricted choices on
the remaining coordinates.
theorem card_filter_univ_eqOn (S : Finset ι) (f : {i // i ∈ S} → κ) :
(Finset.univ.filter fun g : ι → κ => ∀ i, g i.1 = f i).card =
Fintype.card κ ^ (Fintype.card ι - S.card)
TheoremDivision-free count of functions with prescribed values#✓fully proved
Division-free count of finite functions with prescribed values on a set of coordinates.
theorem card_filter_univ_eqOn_mul_pow_card (S : Finset ι) (f : {i // i ∈ S} → κ) :
(Finset.univ.filter fun g : ι → κ => ∀ i, g i.1 = f i).card *
Fintype.card κ ^ S.card =
Fintype.card κ ^ Fintype.card ι
Uses 1 · Used by 1
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.