Skip to content

Commit 88d330e

Browse files
committed
feat: characterise when Set.rangeFactorization is injective (#30126)
1 parent 540c589 commit 88d330e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Mathlib/Data/Set/Image.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,6 @@ theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f
880880
@[simp]
881881
theorem coe_comp_rangeFactorization (f : ι → β) : (↑) ∘ rangeFactorization f = f := rfl
882882

883-
theorem rangeFactorization_surjective : Surjective (rangeFactorization f) :=
884-
fun ⟨_, ⟨i, rfl⟩⟩ => ⟨i, rfl⟩
885-
886883
@[deprecated (since := "2025-08-18")] alias surjective_onto_range := rangeFactorization_surjective
887884

888885
theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s => f x := by

Mathlib/Data/Set/Operations.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ def range (f : ι → α) : Set α := {x | ∃ y, f y = x}
156156
/-- Any map `f : ι → α` factors through a map `rangeFactorization f : ι → range f`. -/
157157
def rangeFactorization (f : ι → α) : ι → range f := fun i => ⟨f i, mem_range_self i⟩
158158

159+
@[simp] lemma rangeFactorization_injective :
160+
(Set.rangeFactorization f).Injective ↔ f.Injective := by
161+
simp [Function.Injective, rangeFactorization]
162+
163+
@[simp] lemma rangeFactorization_surjective : (rangeFactorization f).Surjective :=
164+
fun ⟨_, i, rfl⟩ ↦ ⟨i, rfl⟩
165+
166+
@[simp] lemma rangeFactorization_bijective :
167+
(Set.rangeFactorization f).Bijective ↔ f.Injective := by simp [Function.Bijective]
168+
159169
end Range
160170

161171
/-- We can use the axiom of choice to pick a preimage for every element of `range f`. -/

0 commit comments

Comments
 (0)