File: Mathlib/Data/Fintype/Pi.lean

full_name: Fintype.piFinset
code: /-- Given for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `Fintype.piFinset t` of all functions taking values in `t a` for all `a`. This is the
analogue of `Finset.pi` where the base finset is `univ` (but formally they are not the same, as
there is an additional condition `i ∈ Finset.univ` in the `Finset.pi` definition). -/
def piFinset (t : ∀ a, Finset (δ a)) : Finset (∀ a, δ a) 
goal: Finset ((a : α) → δ a)

full_name: Fintype.mem_piFinset
code: @[simp]
theorem mem_piFinset {t : ∀ a, Finset (δ a)} {f : ∀ a, δ a} : f ∈ piFinset t ↔ ∀ a, f a ∈ t a 
goal: f ∈ Fintype.piFinset t ↔ ∀ (a : α), f a ∈ t a

full_name: Fintype.coe_piFinset
code: @[simp]
theorem coe_piFinset (t : ∀ a, Finset (δ a)) :
    (piFinset t : Set (∀ a, δ a)) = Set.pi Set.univ fun a => t a 
goal: ↑(Fintype.piFinset t) = Set.univ.pi fun a => ↑(t a)

full_name: Fintype.piFinset_subset
code: theorem piFinset_subset (t₁ t₂ : ∀ a, Finset (δ a)) (h : ∀ a, t₁ a ⊆ t₂ a) :
    piFinset t₁ ⊆ piFinset t₂ 
goal: Fintype.piFinset t₁ ⊆ Fintype.piFinset t₂

full_name: Fintype.piFinset_empty
code: @[simp]
theorem piFinset_empty [Nonempty α] : piFinset (fun _ => ∅ : ∀ i, Finset (δ i)) = ∅ 
goal: (Fintype.piFinset fun x => ∅) = ∅

full_name: Fintype.piFinset_nonempty
code: @[simp, aesop safe apply (rule_sets := [finsetNonempty])]
lemma piFinset_nonempty : (piFinset s).Nonempty ↔ ∀ a, (s a).Nonempty 
goal: (Fintype.piFinset s).Nonempty ↔ ∀ (a : α), (s a).Nonempty

full_name: Finset.Nonempty.piFinset_const
code: lemma _root_.Finset.Nonempty.piFinset_const {ι : Type*} [Fintype ι] [DecidableEq ι] {s : Finset α}
    (hs : s.Nonempty) : (piFinset fun _ : ι ↦ s).Nonempty 
goal: (Fintype.piFinset fun x => s).Nonempty

full_name: Fintype.piFinset_of_isEmpty
code: @[simp]
lemma piFinset_of_isEmpty [IsEmpty α] (s : ∀ a, Finset (γ a)) : piFinset s = univ 
goal: Fintype.piFinset s = Finset.univ

full_name: Fintype.piFinset_singleton
code: @[simp]
theorem piFinset_singleton (f : ∀ i, δ i) : piFinset (fun i => {f i} : ∀ i, Finset (δ i)) = {f} 
goal: (Fintype.piFinset fun i => {f i}) = {f}

full_name: Fintype.piFinset_subsingleton
code: theorem piFinset_subsingleton {f : ∀ i, Finset (δ i)} (hf : ∀ i, (f i : Set (δ i)).Subsingleton) :
    (Fintype.piFinset f : Set (∀ i, δ i)).Subsingleton 
goal: (↑(Fintype.piFinset f)).Subsingleton

full_name: Fintype.piFinset_disjoint_of_disjoint
code: theorem piFinset_disjoint_of_disjoint (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
    (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (piFinset t₁) (piFinset t₂) 
goal: Disjoint (Fintype.piFinset t₁) (Fintype.piFinset t₂)

full_name: Fintype.piFinset_image
code: lemma piFinset_image [∀ a, DecidableEq (δ a)] (f : ∀ a, γ a → δ a) (s : ∀ a, Finset (γ a)) :
    piFinset (fun a ↦ (s a).image (f a)) = (piFinset s).image fun b a ↦ f _ (b a) 
goal: (Fintype.piFinset fun a => Finset.image (f a) (s a)) = Finset.image (fun b a => f a (b a)) (Fintype.piFinset s)

full_name: Fintype.eval_image_piFinset_subset
code: lemma eval_image_piFinset_subset (t : ∀ a, Finset (δ a)) (a : α) [DecidableEq (δ a)] :
    ((piFinset t).image fun f ↦ f a) ⊆ t a 
goal: Finset.image (fun f => f a) (Fintype.piFinset t) ⊆ t a

full_name: Fintype.eval_image_piFinset
code: lemma eval_image_piFinset (t : ∀ a, Finset (δ a)) (a : α) [DecidableEq (δ a)]
    (ht : ∀ b, a ≠ b → (t b).Nonempty) : ((piFinset t).image fun f ↦ f a) = t a 
goal: Finset.image (fun f => f a) (Fintype.piFinset t) = t a

full_name: Fintype.eval_image_piFinset_const
code: lemma eval_image_piFinset_const {β} [DecidableEq β] (t : Finset β) (a : α) :
    ((piFinset fun _i : α ↦ t).image fun f ↦ f a) = t 
goal: Finset.image (fun f => f a) (Fintype.piFinset fun _i => t) = t

full_name: Fintype.filter_piFinset_of_not_mem
code: lemma filter_piFinset_of_not_mem (t : ∀ a, Finset (δ a)) (a : α) (x : δ a) (hx : x ∉ t a) :
    (piFinset t).filter (· a = x) = ∅ 
goal: Finset.filter (fun x_1 => x_1 a = x) (Fintype.piFinset t) = ∅

full_name: Fintype.piFinset_update_eq_filter_piFinset_mem
code: lemma piFinset_update_eq_filter_piFinset_mem (s : ∀ i, Finset (δ i)) (i : α) {t : Finset (δ i)}
    (hts : t ⊆ s i) : piFinset (Function.update s i t) = (piFinset s).filter (fun f ↦ f i ∈ t) 
goal: Fintype.piFinset (Function.update s i t) = Finset.filter (fun f => f i ∈ t) (Fintype.piFinset s)

full_name: Fintype.piFinset_update_singleton_eq_filter_piFinset_eq
code: lemma piFinset_update_singleton_eq_filter_piFinset_eq (s : ∀ i, Finset (δ i)) (i : α) {a : δ i}
    (ha : a ∈ s i) :
    piFinset (Function.update s i {a}) = (piFinset s).filter (fun f ↦ f i = a) 
goal: Fintype.piFinset (Function.update s i {a}) = Finset.filter (fun f => f i = a) (Fintype.piFinset s)

full_name: Pi.fintype
code: /-- A dependent product of fintypes, indexed by a fintype, is a fintype. -/
instance Pi.fintype {α : Type*} {β : α → Type*} [DecidableEq α] [Fintype α]
    [∀ a, Fintype (β a)] : Fintype (∀ a, β a) 
goal: Fintype ((a : α) → β a)

full_name: Fintype.piFinset_univ
code: @[simp]
theorem Fintype.piFinset_univ {α : Type*} {β : α → Type*} [DecidableEq α] [Fintype α]
    [∀ a, Fintype (β a)] :
    (Fintype.piFinset fun a : α => (Finset.univ : Finset (β a))) =
      (Finset.univ : Finset (∀ a, β a)) 
goal: (Fintype.piFinset fun a => Finset.univ) = Finset.univ

full_name: Function.Embedding.fintype
code: noncomputable instance _root_.Function.Embedding.fintype {α β} [Fintype α] [Fintype β] :
  Fintype (α ↪ β) 
goal: Fintype (α ↪ β)

full_name: Finset.univ_pi_univ
code: @[simp]
theorem Finset.univ_pi_univ {α : Type*} {β : α → Type*} [DecidableEq α] [Fintype α]
    [∀ a, Fintype (β a)] :
    (Finset.univ.pi fun a : α => (Finset.univ : Finset (β a))) = Finset.univ 
goal: (Finset.univ.pi fun a => Finset.univ) = Finset.univ

full_name: Finset.piFinset_filter_const
code: lemma piFinset_filter_const [DecidableEq ι] [Fintype ι] :
    (Fintype.piFinset fun _ ↦ s).filter (∃ a ∈ s, const ι a = ·) = s.piDiag ι 
goal: Finset.filter (fun x => ∃ a ∈ s, Function.const ι a = x) (Fintype.piFinset fun x => s) = s.piDiag ι

full_name: Finset.piDiag_subset_piFinset
code: lemma piDiag_subset_piFinset [DecidableEq ι] [Fintype ι] :
    s.piDiag ι ⊆ Fintype.piFinset fun _ ↦ s 
goal: s.piDiag ι ⊆ Fintype.piFinset fun x => s