Skip to content

Commit 3ec545d

Browse files
committed
refactor(Logic/Equiv): rename image_eq_preimage to image_symm_eq_preimage/image_eq_preimage_symm (#31130)
The current name was ambiguous on whether the `symm` came on the LHS or RHS.
1 parent c92d338 commit 3ec545d

File tree

81 files changed

+172
-159
lines changed

Some content is hidden

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

81 files changed

+172
-159
lines changed

Counterexamples/SorgenfreyLine.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ theorem exists_Ico_disjoint_closed {a : ℝₗ} {s : Set ℝₗ} (hs : IsClosed
120120
@[simp]
121121
theorem map_toReal_nhds (a : ℝₗ) : map toReal (𝓝 a) = 𝓝[≥] toReal a := by
122122
refine ((nhds_basis_Ico a).map _).eq_of_same_basis ?_
123-
simpa only [toReal.image_eq_preimage] using nhdsGE_basis_Ico (toReal a)
123+
simpa only [toReal.image_eq_preimage_symm] using nhdsGE_basis_Ico (toReal a)
124124

125125
theorem nhds_eq_map (a : ℝₗ) : 𝓝 a = map toReal.symm (𝓝[≥] (toReal a)) := by
126126
simp_rw [← map_toReal_nhds, map_map, Function.comp_def, toReal.symm_apply_apply, map_id']

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ theorem finprod_eq_prod_of_mulSupport_subset (f : α → M) {s : Finset α} (h :
341341
∏ᶠ i, f i = ∏ i ∈ s, f i := by
342342
have A : mulSupport (f ∘ PLift.down) = Equiv.plift.symm '' mulSupport f := by
343343
rw [mulSupport_comp_eq_preimage]
344-
exact (Equiv.plift.symm.image_eq_preimage _).symm
344+
exact (Equiv.plift.symm.image_eq_preimage_symm _).symm
345345
have : mulSupport (f ∘ PLift.down) ⊆ s.map Equiv.plift.symm.toEmbedding := by
346346
rw [A, Finset.coe_map]
347347
exact image_mono h

Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ lemma mem_smul_set_inv {s : Set α} : a ∈ b • s⁻¹ ↔ b ∈ a • s := by
202202

203203
@[to_additive]
204204
theorem preimage_smul (a : α) (t : Set β) : (fun x ↦ a • x) ⁻¹' t = a⁻¹ • t :=
205-
((MulAction.toPerm a).symm.image_eq_preimage _).symm
205+
((MulAction.toPerm a).image_symm_eq_preimage _).symm
206206

207207
@[to_additive]
208208
theorem preimage_smul_inv (a : α) (t : Set β) : (fun x ↦ a⁻¹ • x) ⁻¹' t = a • t :=
@@ -213,15 +213,15 @@ theorem smul_set_subset_smul_set_iff : a • A ⊆ a • B ↔ A ⊆ B :=
213213
image_subset_image_iff <| MulAction.injective _
214214

215215
@[to_additive]
216-
theorem smul_set_subset_iff_subset_inv_smul_set : a • A ⊆ B ↔ A ⊆ a⁻¹ • B :=
217-
image_subset_iff.trans <|
218-
iff_of_eq <| congr_arg _ <| preimage_equiv_eq_image_symm _ <| MulAction.toPerm _
216+
theorem smul_set_subset_iff_subset_inv_smul_set : a • A ⊆ B ↔ A ⊆ a⁻¹ • B := by
217+
refine image_subset_iff.trans ?_
218+
congr! 1
219+
exact ((MulAction.toPerm _).image_symm_eq_preimage _).symm
219220

220221
@[to_additive]
221-
theorem subset_smul_set_iff : A ⊆ a • B ↔ a⁻¹ • A ⊆ B :=
222-
Iff.symm <|
223-
image_subset_iff.trans <|
224-
Iff.symm <| iff_of_eq <| congr_arg _ <| image_equiv_eq_preimage_symm _ <| MulAction.toPerm _
222+
theorem subset_smul_set_iff : A ⊆ a • B ↔ a⁻¹ • A ⊆ B := by
223+
refine (image_subset_iff.trans ?_ ).symm; congr! 1;
224+
exact ((MulAction.toPerm _).image_eq_preimage_symm _).symm
225225

226226
@[to_additive]
227227
theorem smul_set_inter : a • (s ∩ t) = a • s ∩ a • t :=

Mathlib/Algebra/Group/Subgroup/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ theorem map_normalClosure (s : Set G) (f : G →* N) (hf : Surjective f) :
767767

768768
theorem comap_normalClosure (s : Set N) (f : G ≃* N) :
769769
normalClosure (f ⁻¹' s) = (normalClosure s).comap f := by
770-
have := Set.preimage_equiv_eq_image_symm s f.toEquiv
770+
have := f.toEquiv.image_symm_eq_preimage s
771771
simp_all [comap_equiv_eq_map_symm, map_normalClosure s (f.symm : N →* G) f.symm.surjective]
772772

773773
lemma Normal.of_map_injective {G H : Type*} [Group G] [Group H] {φ : G →* H}

Mathlib/Algebra/Group/Subgroup/Map.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ theorem mem_map_iff_mem {f : G →* N} (hf : Function.Injective f) {K : Subgroup
166166
@[to_additive]
167167
theorem map_equiv_eq_comap_symm' (f : G ≃* N) (K : Subgroup G) :
168168
K.map f.toMonoidHom = K.comap f.symm.toMonoidHom :=
169-
SetLike.coe_injective (f.toEquiv.image_eq_preimage K)
169+
SetLike.coe_injective (f.toEquiv.image_eq_preimage_symm K)
170170

171171
@[to_additive]
172172
theorem map_equiv_eq_comap_symm (f : G ≃* N) (K : Subgroup G) :

Mathlib/Algebra/Group/Submonoid/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ theorem mem_map_equiv {f : M ≃* N} {K : Submonoid M} {x : N} :
533533
@[to_additive]
534534
theorem map_equiv_eq_comap_symm (f : M ≃* N) (K : Submonoid M) :
535535
K.map f = K.comap f.symm :=
536-
SetLike.coe_injective (f.toEquiv.image_eq_preimage K)
536+
SetLike.coe_injective (f.toEquiv.image_eq_preimage_symm K)
537537

538538
@[to_additive]
539539
theorem comap_equiv_eq_map_symm (f : N ≃* M) (K : Submonoid M) :

Mathlib/Algebra/Group/Subsemigroup/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ theorem mem_map_equiv {f : M ≃* N} {K : Subsemigroup M} {x : N} :
502502
@[to_additive]
503503
theorem map_equiv_eq_comap_symm (f : M ≃* N) (K : Subsemigroup M) :
504504
K.map (f : M →ₙ* N) = K.comap (f.symm : N →ₙ* M) :=
505-
SetLike.coe_injective (f.toEquiv.image_eq_preimage K)
505+
SetLike.coe_injective (f.toEquiv.image_eq_preimage_symm K)
506506

507507
@[to_additive]
508508
theorem comap_equiv_eq_map_symm (f : N ≃* M) (K : Subsemigroup M) :

Mathlib/Algebra/Module/Equiv/Defs.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,11 @@ protected theorem injective : Function.Injective e :=
546546
protected theorem surjective : Function.Surjective e :=
547547
e.toEquiv.surjective
548548

549-
protected theorem image_eq_preimage (s : Set M) : e '' s = e.symm ⁻¹' s :=
550-
e.toEquiv.image_eq_preimage s
549+
protected theorem image_eq_preimage_symm (s : Set M) : e '' s = e.symm ⁻¹' s :=
550+
e.toEquiv.image_eq_preimage_symm s
551551

552552
protected theorem image_symm_eq_preimage (s : Set M₂) : e.symm '' s = e ⁻¹' s :=
553-
e.toEquiv.symm.image_eq_preimage s
553+
e.toEquiv.symm.image_eq_preimage_symm s
554554

555555
end
556556

Mathlib/Algebra/Module/ZLattice/Covolume.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ alias covolume_div_covolume_eq_relindex' := covolume_div_covolume_eq_relIndex'
181181
theorem volume_image_eq_volume_div_covolume {ι : Type*} [Fintype ι] (L : Submodule ℤ (ι → ℝ))
182182
[DiscreteTopology L] [IsZLattice ℝ L] (b : Basis ι ℤ L) {s : Set (ι → ℝ)} :
183183
volume ((b.ofZLatticeBasis ℝ L).equivFun '' s) = volume s / ENNReal.ofReal (covolume L) := by
184-
rw [LinearEquiv.image_eq_preimage, Measure.addHaar_preimage_linearEquiv, LinearEquiv.symm_symm,
185-
covolume_eq_det_inv L b, ENNReal.div_eq_inv_mul, ENNReal.ofReal_inv_of_pos
186-
(abs_pos.mpr (LinearEquiv.det _).ne_zero), inv_inv, LinearEquiv.coe_det]
184+
rw [LinearEquiv.image_eq_preimage_symm, Measure.addHaar_preimage_linearEquiv,
185+
LinearEquiv.symm_symm, covolume_eq_det_inv L b, ENNReal.div_eq_inv_mul,
186+
ENNReal.ofReal_inv_of_pos (abs_pos.2 (LinearEquiv.det _).ne_zero), inv_inv, LinearEquiv.coe_det]
187187

188188
/-- A more general version of `ZLattice.volume_image_eq_volume_div_covolume`;
189189
see the `Naming conventions` section in the introduction. -/
@@ -299,7 +299,7 @@ private theorem frontier_equivFun {E : Type*} [AddCommGroup E] [Module ℝ E] {
299299
[TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E] [T2Space E]
300300
(b : Basis ι ℝ E) (s : Set E) :
301301
frontier (b.equivFun '' s) = b.equivFun '' (frontier s) := by
302-
rw [LinearEquiv.image_eq_preimage, LinearEquiv.image_eq_preimage]
302+
rw [LinearEquiv.image_eq_preimage_symm, LinearEquiv.image_eq_preimage_symm]
303303
exact (Homeomorph.preimage_frontier b.equivFunL.toHomeomorph.symm s).symm
304304

305305
variable {ι : Type*} [Fintype ι]

Mathlib/Algebra/Order/Group/Pointwise/Interval.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ theorem image_mul_const_uIcc (a b c : α) : (· * a) '' [[b, c]] = [[b * a, c *
850850
if ha : a = 0 then by simp [ha]
851851
else calc
852852
(fun x => x * a) '' [[b, c]] = (· * a⁻¹) ⁻¹' [[b, c]] :=
853-
(Units.mk0 a ha).mulRight.image_eq_preimage _
853+
(Units.mk0 a ha).mulRight.image_eq_preimage_symm _
854854
_ = (fun x => x / a) ⁻¹' [[b, c]] := by simp only [div_eq_mul_inv]
855855
_ = [[b * a, c * a]] := preimage_div_const_uIcc ha _ _
856856

0 commit comments

Comments
 (0)