Documentation

CslibFrontier.Foundations.Data.Fintype.AgreeOn

Functions that agree with a fixed function on a set #

The functions b : ι → β that agree with a fixed y on a finite set P of coordinates number #β ^ #Pᶜ, since the coordinates outside P are free. Mathlib fixes a single coordinate (Fintype.card_filter_piFinset_eq); this file fixes a set of them.

Main results #

theorem Fintype.card_filter_forall_mem_eq {ι : Type u_1} {β : Type u_2} [Fintype ι] [DecidableEq ι] [Fintype β] (P : Finset ι) (y : ι → β) [DecidablePred fun (b : ι → β) => ∀ i ∈ P, b i = y i] :
{b : ι → β | ∀ i ∈ P, b i = y i}.card = card β ^ Pᶜ.card

The functions that agree with y on P number #β ^ #Pᶜ. The filter's decidability is an instance argument, so the lemma rewrites whichever instance elaborated the filter (on Fin n, Nat.decidableForallFin).