mathlib documentation

data.finset.pimage

Image of a finset α under a partially defined function #

In this file we define part.to_finset and finset.pimage. We also prove some trivial lemmas about these definitions.

Tags #

finite set, image, partial function

def part.to_finset {α : Type u_1} (o : part α) [decidable o.dom] :

Convert a o : part α with decidable part.dom o to finset α.

Equations
@[simp]
theorem part.mem_to_finset {α : Type u_1} {o : part α} [decidable o.dom] {x : α} :
@[simp]
@[simp]
theorem part.to_finset_some {α : Type u_1} {a : α} [decidable (part.some a).dom] :
@[simp]
theorem part.coe_to_finset {α : Type u_1} (o : part α) [decidable o.dom] :
(o.to_finset) = {x : α | x o}
def finset.pimage {α : Type u_1} {β : Type u_2} [decidable_eq β] (f : α →. β) [Π (x : α), decidable (f x).dom] (s : finset α) :

Image of s : finset α under a partially defined function f : α →. β.

Equations
@[simp]
theorem finset.mem_pimage {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] {s : finset α} {b : β} :
b finset.pimage f s ∃ (a : α) (H : a s), b f a
@[simp]
theorem finset.coe_pimage {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] {s : finset α} :
@[simp]
theorem finset.pimage_some {α : Type u_1} {β : Type u_2} [decidable_eq β] (s : finset α) (f : α → β) [Π (x : α), decidable (part.some (f x)).dom] :
finset.pimage (λ (x : α), part.some (f x)) s = finset.image f s
theorem finset.pimage_congr {α : Type u_1} {β : Type u_2} [decidable_eq β] {f g : α →. β} [Π (x : α), decidable (f x).dom] [Π (x : α), decidable (g x).dom] {s t : finset α} (h₁ : s = t) (h₂ : ∀ (x : α), x tf x = g x) :
theorem finset.pimage_eq_image_filter {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] {s : finset α} :
finset.pimage f s = finset.image (λ (x : {x // x finset.filter (λ (x : α), (f x).dom) s}), (f x).get _) (finset.filter (λ (x : α), (f x).dom) s).attach

Rewrite s.pimage f in terms of finset.filter, finset.attach, and finset.image.

theorem finset.pimage_union {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] {s t : finset α} [decidable_eq α] :
@[simp]
theorem finset.pimage_empty {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] :
theorem finset.pimage_subset {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] {s : finset α} {t : finset β} :
finset.pimage f s t ∀ (x : α), x s∀ (y : β), y f xy t
theorem finset.pimage_mono {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] {s t : finset α} (h : s t) :
theorem finset.pimage_inter {α : Type u_1} {β : Type u_2} [decidable_eq β] {f : α →. β} [Π (x : α), decidable (f x).dom] {s t : finset α} [decidable_eq α] :