Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit ad99529

Browse files
committed
feat(data/set/basic): Added range_eq_iff (#11044)
This serves as a convenient theorem for proving statements of the form `range f = S`.
1 parent 914250e commit ad99529

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/data/set/basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,6 +1735,10 @@ subset.antisymm
17351735
theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s :=
17361736
forall_range_iff
17371737

1738+
theorem range_eq_iff (f : α → β) (s : set β) :
1739+
range f = s ↔ (∀ a, f a ∈ s) ∧ ∀ b ∈ s, ∃ a, f a = b :=
1740+
by { rw ←range_subset_iff, exact le_antisymm_iff }
1741+
17381742
lemma range_comp_subset_range (f : α → β) (g : β → γ) : range (g ∘ f) ⊆ range g :=
17391743
by rw range_comp; apply image_subset_range
17401744

0 commit comments

Comments
 (0)