Skip to content

Commit f0b4174

Browse files
committed
chore: deprecate Set.image_subset (leanprover-community#27287)
`Set.image_subset` is a duplicate of `Set.image_mono`. It is also a confusing name because it is very different from `Set.preimage_subset`. The difference with `Set.image_mono` is that it has `f` as an explicit argument. However, in 99% of cases this argument can be inferred, so this is not needed. The main change is in Mathlib/Data/Set/Image.lean
1 parent f1ac36d commit f0b4174

100 files changed

Lines changed: 162 additions & 164 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def map (f : F) (S : NonUnitalSubalgebra R A) : NonUnitalSubalgebra R B :=
351351

352352
theorem map_mono {S₁ S₂ : NonUnitalSubalgebra R A} {f : F} :
353353
S₁ ≤ S₂ → (map f S₁ : NonUnitalSubalgebra R B) ≤ map f S₂ :=
354-
Set.image_subset f
354+
Set.image_mono
355355

356356
theorem map_injective {f : F} (hf : Function.Injective f) :
357357
Function.Injective (map f : NonUnitalSubalgebra R A → NonUnitalSubalgebra R B) :=

Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def map (f : A →ₐ[R] B) (S : Subalgebra R A) : Subalgebra R B :=
385385
algebraMap_mem' := fun r => f.commutes r ▸ Set.mem_image_of_mem _ (S.algebraMap_mem r) }
386386

387387
theorem map_mono {S₁ S₂ : Subalgebra R A} {f : A →ₐ[R] B} : S₁ ≤ S₂ → S₁.map f ≤ S₂.map f :=
388-
Set.image_subset f
388+
Set.image_mono
389389

390390
theorem map_injective {f : A →ₐ[R] B} (hf : Function.Injective f) : Function.Injective (map f) :=
391391
fun _S₁ _S₂ ih =>

Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ theorem adjoin_span {s : Set A} : adjoin R (Submodule.span R s : Set A) = adjoin
607607
le_antisymm (adjoin_le (span_le_adjoin _ _)) (adjoin_mono Submodule.subset_span)
608608

609609
theorem adjoin_image (f : A →ₐ[R] B) (s : Set A) : adjoin R (f '' s) = (adjoin R s).map f :=
610-
le_antisymm (adjoin_le <| Set.image_subset _ subset_adjoin) <|
610+
le_antisymm (adjoin_le <| Set.image_mono subset_adjoin) <|
611611
Subalgebra.map_le.2 <| adjoin_le <| Set.image_subset_iff.1 <| by
612612
-- Porting note: I don't understand how this worked in Lean 3 with just `subset_adjoin`
613613
simp only [Set.image_id', coe_carrier_toSubmonoid, Subalgebra.coe_toSubsemiring,

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ theorem finprod_eq_prod_of_mulSupport_subset (f : α → M) {s : Finset α} (h :
346346
exact (Equiv.plift.symm.image_eq_preimage _).symm
347347
have : mulSupport (f ∘ PLift.down) ⊆ s.map Equiv.plift.symm.toEmbedding := by
348348
rw [A, Finset.coe_map]
349-
exact image_subset _ h
349+
exact image_mono h
350350
rw [finprod_eq_prod_plift_of_mulSupport_subset this]
351351
simp only [Finset.prod_map, Equiv.coe_toEmbedding]
352352
congr

Mathlib/Algebra/Field/Periodic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ theorem Periodic.image_Ioc [AddCommGroup α] [LinearOrder α] [IsOrderedAddMonoi
104104
theorem Periodic.image_Icc [AddCommGroup α] [LinearOrder α] [IsOrderedAddMonoid α]
105105
[Archimedean α] (h : Periodic f c)
106106
(hc : 0 < c) (a : α) : f '' Icc a (a + c) = range f :=
107-
(image_subset_range _ _).antisymm <| h.image_Ioc hc a ▸ image_subset _ Ioc_subset_Icc_self
107+
(image_subset_range _ _).antisymm <| h.image_Ioc hc a ▸ image_mono Ioc_subset_Icc_self
108108

109109
theorem Periodic.image_uIcc [AddCommGroup α] [LinearOrder α] [IsOrderedAddMonoid α]
110110
[Archimedean α] (h : Periodic f c)

Mathlib/Algebra/Group/Pointwise/Set/Scalar.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ lemma smul_set_nonempty : (a • s).Nonempty ↔ s.Nonempty := image_nonempty
175175
@[to_additive (attr := simp)]
176176
lemma smul_set_singleton : a • ({b} : Set β) = {a • b} := image_singleton
177177

178-
@[to_additive (attr := gcongr)] lemma smul_set_mono : s ⊆ t → a • s ⊆ a • t := image_subset _
178+
@[to_additive (attr := gcongr)] lemma smul_set_mono : s ⊆ t → a • s ⊆ a • t := image_mono
179179

180180
@[to_additive]
181181
lemma smul_set_subset_iff : a • s ⊆ t ↔ ∀ ⦃b⦄, b ∈ s → a • b ∈ t :=

Mathlib/Algebra/Group/Subgroup/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ theorem map_normalClosure (s : Set G) (f : G →* N) (hf : Surjective f) :
813813
apply le_antisymm
814814
· simp [map_le_iff_le_comap, normalClosure_le_normal, coe_comap,
815815
← Set.image_subset_iff, subset_normalClosure]
816-
· exact normalClosure_le_normal (Set.image_subset f subset_normalClosure)
816+
· exact normalClosure_le_normal (Set.image_mono subset_normalClosure)
817817

818818
theorem comap_normalClosure (s : Set N) (f : G ≃* N) :
819819
normalClosure (f ⁻¹' s) = (normalClosure s).comap f := by

Mathlib/Algebra/Group/Subgroup/Map.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ theorem mem_map_of_mem (f : G →* N) {K : Subgroup G} {x : G} (hx : x ∈ K) :
131131
theorem apply_coe_mem_map (f : G →* N) (K : Subgroup G) (x : K) : f x ∈ K.map f :=
132132
mem_map_of_mem f x.prop
133133

134-
@[to_additive]
134+
@[to_additive (attr := gcongr)]
135135
theorem map_mono {f : G →* N} {K K' : Subgroup G} : K ≤ K' → map f K ≤ map f K' :=
136-
image_subset _
136+
image_mono
137137

138138
@[to_additive (attr := simp)]
139139
theorem map_id : K.map (MonoidHom.id G) = K :=

Mathlib/Algebra/Group/Subgroup/Pointwise.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ theorem smul_mem_pointwise_smul (m : G) (a : α) (S : Subgroup G) : m ∈ S →
376376
(Set.smul_mem_smul_set : _ → _ ∈ a • (S : Set G))
377377

378378
instance : CovariantClass α (Subgroup G) HSMul.hSMul LE.le :=
379-
fun _ _ => image_subset _
379+
fun _ _ => image_mono
380380

381381
theorem mem_smul_pointwise_iff_exists (m : G) (a : α) (S : Subgroup G) :
382382
m ∈ a • S ↔ ∃ s : G, s ∈ S ∧ a • s = m :=

Mathlib/Algebra/Group/Submonoid/Pointwise.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ theorem smul_mem_pointwise_smul (m : M) (a : α) (S : Submonoid M) : m ∈ S →
223223
(Set.smul_mem_smul_set : _ → _ ∈ a • (S : Set M))
224224

225225
instance : CovariantClass α (Submonoid M) HSMul.hSMul LE.le :=
226-
fun _ _ => image_subset _
226+
fun _ _ => image_mono
227227

228228
theorem mem_smul_pointwise_iff_exists (m : M) (a : α) (S : Submonoid M) :
229229
m ∈ a • S ↔ ∃ s : M, s ∈ S ∧ a • s = m :=

0 commit comments

Comments
 (0)