File: Mathlib/Data/Finset/Pi.lean

full_name: Finset.Pi.empty
code: /-- The empty dependent product function, defined on the empty set. The assumption `a ∈ ∅` is never
satisfied. -/
def Pi.empty (β : α → Sort*) (a : α) (h : a ∈ (∅ : Finset α)) : β a 
goal: β a

full_name: Finset.pi
code: /-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
def pi (s : Finset α) (t : ∀ a, Finset (β a)) : Finset (∀ a ∈ s, β a) 
goal: Finset ((a : α) → a ∈ s → β a)

full_name: Finset.pi_val
code: @[simp]
theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 
goal: (s.pi t).val = s.val.pi fun a => (t a).val

full_name: Finset.mem_pi
code: @[simp]
theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a} :
    f ∈ s.pi t ↔ ∀ (a) (h : a ∈ s), f a h ∈ t a 
goal: f ∈ s.pi t ↔ ∀ (a : α) (h : a ∈ s), f a h ∈ t a

full_name: Finset.Pi.cons
code: /-- Given a function `f` defined on a finset `s`, define a new function on the finset `s ∪ {a}`,
equal to `f` on `s` and sending `a` to a given value `b`. This function is denoted
`s.Pi.cons a b f`. If `a` already belongs to `s`, the new function takes the value `b` at `a`
anyway. -/
def Pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a' : α) (h : a' ∈ insert a s) :
    δ a' 
goal: δ a'

full_name: Finset.Pi.cons_same
code: @[simp]
theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
    Pi.cons s a b f a h = b 
goal: Finset.Pi.cons s a b f a h = b

full_name: Finset.Pi.cons_ne
code: theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
    (ha : a ≠ a') : Pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) 
goal: Finset.Pi.cons s a b f a' h = f a' ⋯

full_name: Finset.Pi.cons_injective
code: theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
    Function.Injective (Pi.cons s a b) 
goal: Function.Injective (Finset.Pi.cons s a b)

full_name: Finset.pi_empty
code: @[simp]
theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = singleton (Pi.empty β) 
goal: ∅.pi t = {Finset.Pi.empty β}

full_name: Finset.pi_nonempty
code: @[simp, aesop safe apply (rule_sets := [finsetNonempty])]
lemma pi_nonempty : (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty 
goal: (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty

full_name: Finset.pi_insert
code: @[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
    (ha : a ∉ s) : pi (insert a s) t = (t a).biUnion fun b => (pi s t).image (Pi.cons s a b) 
goal: (insert a s).pi t = (t a).biUnion fun b => Finset.image (Finset.Pi.cons s a b) (s.pi t)

full_name: Finset.pi_singletons
code: theorem pi_singletons {β : Type*} (s : Finset α) (f : α → β) :
    (s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} 
goal: (s.pi fun a => {f a}) = {fun a x => f a}

full_name: Finset.pi_const_singleton
code: theorem pi_const_singleton {β : Type*} (s : Finset α) (i : β) :
    (s.pi fun _ => ({i} : Finset β)) = {fun _ _ => i} 
goal: (s.pi fun x => {i}) = {fun x x => i}

full_name: Finset.pi_subset
code: theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
    s.pi t₁ ⊆ s.pi t₂ 
goal: s.pi t₁ ⊆ s.pi t₂

full_name: Finset.pi_disjoint_of_disjoint
code: theorem pi_disjoint_of_disjoint {δ : α → Type*} {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
    (ha : a ∈ s) (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (s.pi t₁) (s.pi t₂) 
goal: Disjoint (s.pi t₁) (s.pi t₂)

full_name: Finset.piDiag
code: /-- The diagonal of a finset `s : Finset α` as a finset of functions `ι → α`, namely the set of
constant functions valued in `s`. -/
def piDiag (s : Finset α) (ι : Type*) [DecidableEq (ι → α)] : Finset (ι → α) 
goal: Finset (ι → α)

full_name: Finset.mem_piDiag
code: @[simp] lemma mem_piDiag : f ∈ s.piDiag ι ↔ ∃ a ∈ s, const ι a = f 
goal: f ∈ s.piDiag ι ↔ ∃ a ∈ s, Function.const ι a = f

full_name: Finset.card_piDiag
code: @[simp] lemma card_piDiag (s : Finset α) (ι : Type*) [DecidableEq (ι → α)] [Nonempty ι] :
    (s.piDiag ι).card = s.card 
goal: (s.piDiag ι).card = s.card