The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Data.Finset.Preimage

37 declarations. Mathlib docs · Source

theorem Finset.preimage.congr_simp E1 #

∀ {α : Type u} {β : Type v} (s s_1 : Finset β) (e_s : s = s_1) (f f_1 : α → β) (e_f : f = f_1)
  (hf : Set.InjOn f (f ⁻¹' ↑s)), s.preimage f hf = s_1.preimage f_1 ⋯

def Finset.preimage E1 #

{α : Type u} → {β : Type v} → (s : Finset β) → (f : α → β) → Set.InjOn f (f ⁻¹' ↑s) → Finset α

Preimage of s : Finset β under a map f injective on f ⁻¹' s as a Finset.

theorem Finset.mem_preimage E0 #

∀ {α : Type u} {β : Type v} {f : α → β} {s : Finset β} {hf : Set.InjOn f (f ⁻¹' ↑s)} {x : α},
  x ∈ s.preimage f hf ↔ f x ∈ s

theorem Finset.coe_preimage E0 #

∀ {α : Type u} {β : Type v} {f : α → β} (s : Finset β) (hf : Set.InjOn f (f ⁻¹' ↑s)), ↑(s.preimage f hf) = f ⁻¹' ↑s

theorem Finset.preimage_empty E0 #

∀ {α : Type u} {β : Type v} {f : α → β}, ∅.preimage f ⋯ = ∅

theorem Finset.preimage_univ E0 #

∀ {α : Type u} {β : Type v} {f : α → β} [inst : Fintype α] [inst_1 : Fintype β] (hf : Set.InjOn f (f ⁻¹' ↑Finset.univ)),
  Finset.univ.preimage f hf = Finset.univ

theorem Finset.disjoint_preimage E0 #

∀ {α : Type u} {β : Type v} {f : α → β} {s t : Finset β} {hs : Set.InjOn f (f ⁻¹' ↑s)} {ht : Set.InjOn f (f ⁻¹' ↑t)},
  Disjoint s t → Disjoint (s.preimage f hs) (t.preimage f ht)

theorem Finset.preimage_inter E0 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq α] [inst_1 : DecidableEq β] {f : α → β} {s t : Finset β}
  (hs : Set.InjOn f (f ⁻¹' ↑s)) (ht : Set.InjOn f (f ⁻¹' ↑t)), (s ∩ t).preimage f ⋯ = s.preimage f hs ∩ t.preimage f ht

theorem Finset.preimage_union E0 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq α] [inst_1 : DecidableEq β] {f : α → β} {s t : Finset β}
  (hst : Set.InjOn f (f ⁻¹' ↑(s ∪ t))), (s ∪ t).preimage f hst = s.preimage f ⋯ ∪ t.preimage f ⋯

theorem Finset.preimage_compl' E0 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq α] [inst_1 : DecidableEq β] [inst_2 : Fintype α] [inst_3 : Fintype β]
  {f : α → β} (s : Finset β) (hfc : Set.InjOn f (f ⁻¹' ↑sᶜ)) (hf : Set.InjOn f (f ⁻¹' ↑s)),
  sᶜ.preimage f hfc = (s.preimage f hf)ᶜ

theorem Finset.preimage_compl E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq α] [inst_1 : DecidableEq β] [inst_2 : Fintype α] [inst_3 : Fintype β]
  {f : α → β} (s : Finset β) (hf : Function.Injective f), sᶜ.preimage f ⋯ = (s.preimage f ⋯)ᶜ

theorem Finset.preimage_map E0 #

∀ {α : Type u} {β : Type v} (f : α ↪ β) (s : Finset α), (Finset.map f s).preimage ⇑f ⋯ = s

theorem Finset.monotone_preimage E1 #

∀ {α : Type u} {β : Type v} {f : α → β} (h : Function.Injective f), Monotone fun s ↦ s.preimage f ⋯

theorem Finset.image_subset_iff_subset_preimage E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq β] {f : α → β} {s : Finset α} {t : Finset β}
  (hf : Set.InjOn f (f ⁻¹' ↑t)), Finset.image f s ⊆ t ↔ s ⊆ t.preimage f hf

theorem Finset.map_subset_iff_subset_preimage E0 #

∀ {α : Type u} {β : Type v} {f : α ↪ β} {s : Finset α} {t : Finset β}, Finset.map f s ⊆ t ↔ s ⊆ t.preimage ⇑f ⋯

theorem Finset.card_preimage E1 #

∀ {α : Type u} {β : Type v} (s : Finset β) (f : α → β) (hf : Set.InjOn f (f ⁻¹' ↑s))
  [inst : DecidablePred fun x ↦ x ∈ Set.range f], (s.preimage f hf).card = {x ∈ s | x ∈ Set.range f}.card

theorem Finset.image_preimage E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq β] (f : α → β) (s : Finset β)
  [inst_1 : (x : β) → Decidable (x ∈ Set.range f)] (hf : Set.InjOn f (f ⁻¹' ↑s)),
  Finset.image f (s.preimage f hf) = {x ∈ s | x ∈ Set.range f}

theorem Finset.image_eq_preimage_of_leftInvOn_injOn E1 #

∀ {α : Type u_1} {β : Type u_2} [inst : DecidableEq β] {f : α → β} {g : β → α} {s : Finset α},
  Set.LeftInvOn g f ↑s → ∀ (ginj : Set.InjOn g (g ⁻¹' ↑s)), Finset.image f s = s.preimage g ginj

theorem Finset.image_preimage_of_bij E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq β] (f : α → β) (s : Finset β) (hf : Set.BijOn f (f ⁻¹' ↑s) ↑s),
  Finset.image f (s.preimage f ⋯) = s

theorem Finset.image_preimage_of_bijective E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq β] {f : α → β} (s : Finset β) (hf : Function.Bijective f),
  Finset.image f (s.preimage f ⋯) = s

theorem Finset.preimage_subset_of_subset_image E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq β] {f : α → β} {s : Finset β} {t : Finset α},
  s ⊆ Finset.image f t → ∀ {hf : Set.InjOn f (f ⁻¹' ↑s)}, s.preimage f hf ⊆ t

theorem Finset.preimage_subset E1 #

∀ {α : Type u} {β : Type v} {f : α ↪ β} {s : Finset β} {t : Finset α}, s ⊆ Finset.map f t → s.preimage ⇑f ⋯ ⊆ t

theorem Finset.subset_map_iff E0 #

∀ {α : Type u} {β : Type v} {f : α ↪ β} {s : Finset β} {t : Finset α}, s ⊆ Finset.map f t ↔ ∃ u ⊆ t, s = Finset.map f u

theorem Finset.image_eq_iff_eq_preimage E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq β] {s : Finset α} {t : Finset β} {f : α → β}
  (hf : Function.Bijective f), Finset.image f s = t ↔ s = t.preimage f ⋯

theorem Finset.sup_preimage_self E0 #

∀ {α : Type u_1} {β : Type u_2} [Nonempty α] [inst : SemilatticeSup β] [inst_1 : OrderBot β] {s : Finset β} {f : α → β}
  (hf : Set.BijOn f (f ⁻¹' ↑s) ↑s), (s.preimage f ⋯).sup f = s.sup id

theorem Finset.sup_preimage_val_id E1 #

∀ {α : Type u} [inst : Lattice α] [inst_1 : OrderBot α] {P : α → Prop} (Psup : ∀ ⦃s t : α⦄, P s → P t → P (s ⊔ t))
  (Pbot : P ⊥) {t : Finset α} (ht : ∀ x ∈ t, P x), (t.preimage Subtype.val ⋯).sup id = ⟨t.sup id, ⋯⟩

theorem Finset.sigma_preimage_mk E0 #

∀ {α : Type u} {β : α → Type u_1} [inst : DecidableEq α] (s : Finset ((a : α) × β a)) (t : Finset α),
  (t.sigma fun a ↦ s.preimage (Sigma.mk a) ⋯) = {a ∈ s | a.fst ∈ t}

theorem Finset.sigma_preimage_mk_of_subset E1 #

∀ {α : Type u} {β : α → Type u_1} [inst : DecidableEq α] (s : Finset ((a : α) × β a)) {t : Finset α},
  Finset.image Sigma.fst s ⊆ t → (t.sigma fun a ↦ s.preimage (Sigma.mk a) ⋯) = s

theorem Finset.sigma_image_fst_preimage_mk E0 #

∀ {α : Type u} {β : α → Type u_1} [inst : DecidableEq α] (s : Finset ((a : α) × β a)),
  ((Finset.image Sigma.fst s).sigma fun a ↦ s.preimage (Sigma.mk a) ⋯) = s

theorem Finset.preimage_inl E0 #

∀ {α : Type u} {β : Type v} (s : Finset (α ⊕ β)), s.preimage Sum.inl ⋯ = s.toLeft

theorem Finset.preimage_inr E0 #

∀ {α : Type u} {β : Type v} (s : Finset (α ⊕ β)), s.preimage Sum.inr ⋯ = s.toRight

def Equiv.restrictPreimageFinset E1 #

{α : Type u} → {β : Type v} → (e : α ≃ β) → (s : Finset β) → ↥(s.preimage ⇑e ⋯) ≃ ↥s

Given an equivalence e : α ≃ β and s : Finset β, restrict e to an equivalence from e ⁻¹' s to s.

theorem Equiv.restrictPreimageFinset_symm_apply_coe E0 #

∀ {α : Type u} {β : Type v} (e : α ≃ β) (s : Finset β) (b : ↥s), ↑((e.restrictPreimageFinset s).symm b) = e.symm ↑b

theorem Equiv.restrictPreimageFinset_apply_coe E0 #

∀ {α : Type u} {β : Type v} (e : α ≃ β) (s : Finset β) (a : ↥(s.preimage ⇑e ⋯)),
  ↑((e.restrictPreimageFinset s) a) = e ↑a

theorem Equiv.image_symm_eq_preimage_of_finset E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq α] (e : α ≃ β) (s : Finset β),
  Finset.image (⇑e.symm) s = s.preimage ⇑e ⋯

theorem Equiv.image_eq_preimage_symm_of_finset E1 #

∀ {α : Type u} {β : Type v} [inst : DecidableEq β] (e : α ≃ β) (s : Finset α),
  Finset.image (⇑e) s = s.preimage ⇑e.symm ⋯

theorem Finset.restrict_comp_piCongrLeft E1 #

∀ {α : Type u} {β : Type v} {π : β → Type u_1} (s : Finset β) (e : α ≃ β),
  s.restrict ∘ ⇑(Equiv.piCongrLeft π e) =
    ⇑(Equiv.piCongrLeft (fun b ↦ π ↑b) (e.restrictPreimageFinset s)) ∘ (s.preimage ⇑e ⋯).restrict

Reindexing and then restricting to a Finset is the same as first restricting to the preimage of this Finset and then reindexing.