Skip to content

Commit 24f6628

Browse files
committed
chore: rename Set.surjective_onto_image (leanprover-community#28627)
Rename `Set.surjective_onto_image` to `Set.imageFactorization_surjective`. This matches better with other theorems like `Set.restrictPreimage_surjective`. Also rename `Set.surjective_onto_range` similarly. I was looking on loogle today and noticed this one again, which doesn't fit any of the naming conventions. I decided to fix it this time.
1 parent 157be93 commit 24f6628

File tree

16 files changed

+30
-22
lines changed

16 files changed

+30
-22
lines changed

Mathlib/Algebra/Group/Subgroup/ZPowers/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Subgroup
2525
theorem range_zpowersHom (g : G) : (zpowersHom G g).range = zpowers g := rfl
2626

2727
@[to_additive]
28-
instance (a : G) : Countable (zpowers a) := Set.surjective_onto_range.countable
28+
instance (a : G) : Countable (zpowers a) := Set.rangeFactorization_surjective.countable
2929

3030
end Subgroup
3131

Mathlib/Data/Finite/Card.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ theorem card_sum [Finite α] [Finite β] : Nat.card (α ⊕ β) = Nat.card α +
146146
simp only [Nat.card_eq_fintype_card, Fintype.card_sum]
147147

148148
theorem card_image_le {s : Set α} [Finite s] (f : α → β) : Nat.card (f '' s) ≤ Nat.card s :=
149-
card_le_of_surjective _ Set.surjective_onto_image
149+
card_le_of_surjective _ Set.imageFactorization_surjective
150150

151151
theorem card_range_le [Finite α] (f : α → β) : Nat.card (Set.range f) ≤ Nat.card α :=
152-
card_le_of_surjective _ Set.surjective_onto_range
152+
card_le_of_surjective _ Set.rangeFactorization_surjective
153153

154154
theorem card_subtype_le [Finite α] (p : α → Prop) : Nat.card { x // p x } ≤ Nat.card α := by
155155
classical

Mathlib/Data/Set/Countable.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ theorem Countable.mono {s₁ s₂ : Set α} (h : s₁ ⊆ s₂) (hs : s₂.Count
111111
have := hs.to_subtype; (inclusion_injective h).countable
112112

113113
theorem countable_range [Countable ι] (f : ι → β) : (range f).Countable :=
114-
surjective_onto_range.countable.to_set
114+
rangeFactorization_surjective.countable.to_set
115115

116116
theorem countable_iff_exists_subset_range [Nonempty α] {s : Set α} :
117117
s.Countable ↔ ∃ f : ℕ → α, s ⊆ range f :=

Mathlib/Data/Set/Image.lean

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,12 @@ theorem imageFactorization_eq {f : α → β} {s : Set α} :
514514
Subtype.val ∘ imageFactorization f s = f ∘ Subtype.val :=
515515
funext fun _ => rfl
516516

517-
theorem surjective_onto_image {f : α → β} {s : Set α} : Surjective (imageFactorization f s) :=
517+
theorem imageFactorization_surjective {f : α → β} {s : Set α} :
518+
Surjective (imageFactorization f s) :=
518519
fun ⟨_, ⟨a, ha, rfl⟩⟩ => ⟨⟨a, ha⟩, rfl⟩
519520

521+
@[deprecated (since := "2025-08-18")] alias surjective_onto_image := imageFactorization_surjective
522+
520523
/-- If the only elements outside `s` are those left fixed by `σ`, then mapping by `σ` has no effect.
521524
-/
522525
theorem image_perm {s : Set α} {σ : Equiv.Perm α} (hs : { a : α | σ a ≠ a } ⊆ s) : σ '' s = s := by
@@ -879,7 +882,10 @@ theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f
879882
@[simp]
880883
theorem coe_comp_rangeFactorization (f : ι → β) : (↑) ∘ rangeFactorization f = f := rfl
881884

882-
theorem surjective_onto_range : Surjective (rangeFactorization f) := fun ⟨_, ⟨i, rfl⟩⟩ => ⟨i, rfl⟩
885+
theorem rangeFactorization_surjective : Surjective (rangeFactorization f) :=
886+
fun ⟨_, ⟨i, rfl⟩⟩ => ⟨i, rfl⟩
887+
888+
@[deprecated (since := "2025-08-18")] alias surjective_onto_range := rangeFactorization_surjective
883889

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

Mathlib/Logic/Small/Set.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ instance small_setPi {β : α → Type u2} (s : (a : α) → Set (β a))
3030

3131
instance small_range (f : α → β) [Small.{u} α] :
3232
Small.{u} (Set.range f) :=
33-
small_of_surjective Set.surjective_onto_range
33+
small_of_surjective Set.rangeFactorization_surjective
3434

3535
instance small_image (f : α → β) (s : Set α) [Small.{u} s] :
3636
Small.{u} (f '' s) :=
37-
small_of_surjective Set.surjective_onto_image
37+
small_of_surjective Set.imageFactorization_surjective
3838

3939
instance small_image2 (f : α → β → γ) (s : Set α) (t : Set β) [Small.{u} s] [Small.{u} t] :
4040
Small.{u} (Set.image2 f s t) := by

Mathlib/MeasureTheory/Constructions/Polish/Basic.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ theorem measurableSet_preimage_iff_preimage_val {f : X → Z} [CountablySeparate
567567
(hf : Measurable f) {s : Set Z} :
568568
MeasurableSet (f ⁻¹' s) ↔ MeasurableSet ((↑) ⁻¹' s : Set (range f)) :=
569569
have hf' : Measurable (rangeFactorization f) := hf.subtype_mk
570-
hf'.measurableSet_preimage_iff_of_surjective (s := Subtype.val ⁻¹' s) surjective_onto_range
570+
hf'.measurableSet_preimage_iff_of_surjective (s := Subtype.val ⁻¹' s)
571+
rangeFactorization_surjective
571572

572573
/-- If `f : X → Z` is a Borel measurable map from a standard Borel space to a
573574
countably separated measurable space and the range of `f` is measurable,

Mathlib/MeasureTheory/Function/StronglyMeasurable/AEStronglyMeasurable.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ theorem _root_.Topology.IsEmbedding.aestronglyMeasurable_comp_iff [PseudoMetriza
629629
· let G : β → range g := rangeFactorization g
630630
have hG : IsClosedEmbedding G :=
631631
{ hg.codRestrict _ _ with
632-
isClosed_range := by rw [surjective_onto_range.range_eq]; exact isClosed_univ }
632+
isClosed_range := by rw [rangeFactorization_surjective.range_eq]; exact isClosed_univ }
633633
have : AEMeasurable (G ∘ f) μ := AEMeasurable.subtype_mk H.aemeasurable
634634
exact hG.measurableEmbedding.aemeasurable_comp_iff.1 this
635635
· rcases (aestronglyMeasurable_iff_aemeasurable_separable.1 H).2 with ⟨t, ht, h't⟩

Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ theorem _root_.Embedding.comp_stronglyMeasurable_iff {m : MeasurableSpace α} [T
742742
have hG : IsClosedEmbedding G :=
743743
{ hg.codRestrict _ _ with
744744
isClosed_range := by
745-
rw [surjective_onto_range.range_eq]
745+
rw [rangeFactorization_surjective.range_eq]
746746
exact isClosed_univ }
747747
have : Measurable (G ∘ f) := Measurable.subtype_mk H.measurable
748748
exact hG.measurableEmbedding.measurable_comp_iff.1 this

Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ theorem of_measurable_inverse_on_range {g : range f → α} (hf₁ : Measurable
683683
(hf₂ : MeasurableSet (range f)) (hg : Measurable g) (H : LeftInverse g (rangeFactorization f)) :
684684
MeasurableEmbedding f := by
685685
set e : α ≃ᵐ range f :=
686-
⟨⟨rangeFactorization f, g, H, H.rightInverse_of_surjective surjective_onto_range⟩,
686+
⟨⟨rangeFactorization f, g, H, H.rightInverse_of_surjective rangeFactorization_surjective⟩,
687687
hf₁.subtype_mk, hg⟩
688688
exact (MeasurableEmbedding.subtype_coe hf₂).comp e.measurableEmbedding
689689

Mathlib/Order/Filter/Finite.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ theorem exists_iInter_of_mem_iInf {ι : Sort*} {α : Type*} {f : ι → Filter
120120
rw [← iInf_range' (g := (·))] at hs
121121
let ⟨_, _, V, hVs, _, _, hVU'⟩ := mem_iInf'.1 hs
122122
use V ∘ rangeFactorization f, fun i ↦ hVs (rangeFactorization f i)
123-
rw [hVU', ← surjective_onto_range.iInter_comp, comp_def]
123+
rw [hVU', ← rangeFactorization_surjective.iInter_comp, comp_def]
124124

125125
theorem mem_iInf_of_finite {ι : Sort*} [Finite ι] {α : Type*} {f : ι → Filter α} (s) :
126126
(s ∈ ⨅ i, f i) ↔ ∃ t : ι → Set α, (∀ i, t i ∈ f i) ∧ s = ⋂ i, t i := by

0 commit comments

Comments
 (0)