Skip to content

Commit

Permalink
feat(Data/Set/Image): add preimage_subset_of_surjOn
Browse files Browse the repository at this point in the history
Cherry-picked from #11143 and renamed.

Co-authored-by: @YaelDillies
  • Loading branch information
urkud committed Jul 4, 2024
1 parent 4d0428b commit a9d837b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Mathlib/Data/Set/Image.lean
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ theorem _root_.Function.Injective.mem_set_image {f : α → β} (hf : Injective
fun ⟨_, hb, Eq⟩ => hf Eq ▸ hb, mem_image_of_mem f⟩
#align function.injective.mem_set_image Function.Injective.mem_set_image

lemma preimage_subset_of_surjOn {t : Set β} (hf : Injective f) (h : SurjOn f s t) :
f ⁻¹' t ⊆ s := fun _ hx ↦
hf.mem_set_image.1 $ h hx

theorem forall_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
(∀ y ∈ f '' s, p y) ↔ ∀ ⦃x⦄, x ∈ s → p (f x) := by simp
#align set.ball_image_iff Set.forall_mem_image
Expand Down

0 comments on commit a9d837b

Please sign in to comment.