Skip to content

Commit 9a28cbf

Browse files
committed
chore: cleanup another erw by generalizing Equiv.range_eq_univ to EquivLike (#21710)
1 parent ad2fc2b commit 9a28cbf

File tree

7 files changed

+18
-19
lines changed

7 files changed

+18
-19
lines changed

Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ theorem ofBijective.symm_eq {φ : P₁ →ᵃ[k] P₂} (hφ : Function.Bijective
206206
(ofBijective hφ).symm.toEquiv = (Equiv.ofBijective _ hφ).symm :=
207207
rfl
208208

209-
@[simp]
210-
theorem range_eq (e : P₁ ≃ᵃ[k] P₂) : range e = univ :=
211-
e.surjective.range_eq
209+
theorem range_eq (e : P₁ ≃ᵃ[k] P₂) : range e = univ := by simp
212210

213211
@[simp]
214212
theorem apply_symm_apply (e : P₁ ≃ᵃ[k] P₂) (p : P₂) : e (e.symm p) = p :=

Mathlib/Logic/Equiv/Set.lean

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,20 @@ universe u v w z
2929

3030
variable {α : Sort u} {β : Sort v} {γ : Sort w}
3131

32-
namespace Equiv
32+
namespace EquivLike
3333

3434
@[simp]
35-
theorem range_eq_univ {α : Type*} {β : Type*} (e : α ≃ β) : range e = univ :=
36-
eq_univ_of_forall e.surjective
35+
theorem range_eq_univ {α : Type*} {β : Type*} {E : Type*} [EquivLike E α β] (e : E) :
36+
range e = univ :=
37+
eq_univ_of_forall (EquivLike.toEquiv e).surjective
38+
39+
end EquivLike
40+
41+
namespace Equiv
42+
43+
theorem range_eq_univ {α : Type*} {β : Type*} (e : α ≃ β) :
44+
range e = univ :=
45+
EquivLike.range_eq_univ e
3746

3847
protected theorem image_eq_preimage {α β} (e : α ≃ β) (s : Set α) : e '' s = e.symm ⁻¹' s :=
3948
Set.ext fun _ => mem_image_iff_of_inverse e.left_inv e.right_inv

Mathlib/Order/RelIso/Set.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ end RelHomClass
4848

4949
namespace RelIso
5050

51-
@[simp]
52-
theorem range_eq (e : r ≃r s) : Set.range e = Set.univ :=
53-
e.surjective.range_eq
51+
theorem range_eq (e : r ≃r s) : Set.range e = Set.univ := by simp
5452

5553
end RelIso
5654

Mathlib/RingTheory/Adjoin/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ theorem Algebra.restrictScalars_adjoin_of_algEquiv
543543
(Algebra.adjoin L S).restrictScalars F = (Algebra.adjoin L' S).restrictScalars F := by
544544
apply_fun Subalgebra.toSubsemiring using fun K K' h ↦ by rwa [SetLike.ext'_iff] at h ⊢
545545
change Subsemiring.closure _ = Subsemiring.closure _
546-
erw [hi, Set.range_comp, i.toEquiv.range_eq_univ, Set.image_univ]
546+
rw [hi, Set.range_comp, EquivLike.range_eq_univ, Set.image_univ]
547547

548548
end
549549

Mathlib/Topology/Homeomorph.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ theorem symm_comp_self (h : X ≃ₜ Y) : h.symm ∘ h = id :=
181181
theorem self_comp_symm (h : X ≃ₜ Y) : h ∘ h.symm = id :=
182182
funext h.apply_symm_apply
183183

184-
@[simp]
185-
theorem range_coe (h : X ≃ₜ Y) : range h = univ :=
186-
h.surjective.range_eq
184+
theorem range_coe (h : X ≃ₜ Y) : range h = univ := by simp
187185

188186
theorem image_symm (h : X ≃ₜ Y) : image h.symm = preimage h :=
189187
funext h.symm.toEquiv.image_eq_preimage

Mathlib/Topology/MetricSpace/Isometry.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,7 @@ theorem symm_comp_self (h : α ≃ᵢ β) : (h.symm : β → α) ∘ h = id := f
403403

404404
theorem self_comp_symm (h : α ≃ᵢ β) : (h : α → β) ∘ h.symm = id := funext h.right_inv
405405

406-
@[simp]
407-
theorem range_eq_univ (h : α ≃ᵢ β) : range h = univ :=
408-
h.toEquiv.range_eq_univ
406+
theorem range_eq_univ (h : α ≃ᵢ β) : range h = univ := by simp
409407

410408
theorem image_symm (h : α ≃ᵢ β) : image h.symm = preimage h :=
411409
image_eq_preimage_of_inverse h.symm.toEquiv.left_inv h.symm.toEquiv.right_inv

Mathlib/Topology/UniformSpace/Equiv.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ theorem symm_comp_self (h : α ≃ᵤ β) : (h.symm : β → α) ∘ h = id :=
176176
theorem self_comp_symm (h : α ≃ᵤ β) : (h : α → β) ∘ h.symm = id :=
177177
funext h.apply_symm_apply
178178

179-
@[simp]
180-
theorem range_coe (h : α ≃ᵤ β) : range h = univ :=
181-
h.surjective.range_eq
179+
theorem range_coe (h : α ≃ᵤ β) : range h = univ := by simp
182180

183181
theorem image_symm (h : α ≃ᵤ β) : image h.symm = preimage h :=
184182
funext h.symm.toEquiv.image_eq_preimage

0 commit comments

Comments
 (0)