Skip to content

Commit f7a72a3

Browse files
committed
Use Skimmer to remove all the unnecessary convert!s
1 parent 835153f commit f7a72a3

1,257 files changed

Lines changed: 2961 additions & 2738 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/AffineMonoid/Irreducible.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ lemma Submonoid.closure_irreducible [Monoid.FG M] :
7474
-- Pick a minimal set `S` generating `M`.
7575
obtain ⟨S, hSgen, hSmax⟩ := Submonoid.exists_minimal_closure_eq_top M
7676
-- We claim that `S` is the set of irreducible elements of `M`.
77-
convert! hSgen
77+
convert hSgen
7878
-- We already know that `S` contains all irreducible elements...
7979
refine (irreducible_subset_of_submonoidClosure_eq_top hSgen).antisymm fun r hrS ↦ ?_
8080
-- So let us for contradiction assume that `r ∈ S` is reducible.

Mathlib/Algebra/Algebra/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ protected theorem map_div {B : Type*} [CommSemiring B] [Algebra R B] (I J : Subm
902902
· rintro hx
903903
refine ⟨h.symm x, fun z hz => ?_, h.apply_symm_apply x⟩
904904
obtain ⟨xz, xz_mem, hxz⟩ := hx (h z) ⟨z, hz, rfl⟩
905-
convert! xz_mem
905+
convert xz_mem
906906
apply h.injective
907907
rw [map_mul, h.apply_symm_apply, hxz]
908908

Mathlib/Algebra/Algebra/Spectrum/Quasispectrum.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ def unitsFstOne_mulEquiv_quasiregular : unitsFstOne R A ≃* (PreQuasiregular A)
156156
{ val := 1 + PreQuasiregular.equiv.symm x.val
157157
inv := 1 + PreQuasiregular.equiv.symm x⁻¹.val
158158
val_inv := by
159-
convert! congr((1 + $(inv_add_add_mul_eq_zero x) : Unitization R A)) using 1
159+
convert congr((1 + $(inv_add_add_mul_eq_zero x) : Unitization R A)) using 1
160160
· simp only [mul_one, PreQuasiregular.equiv_symm_apply, one_mul, mul_add,
161161
add_mul, inr_add, inr_mul]
162162
abel
163163
· simp only [inr_zero, add_zero]
164164
inv_val := by
165-
convert! congr((1 + $(add_inv_add_mul_eq_zero x) : Unitization R A)) using 1
165+
convert congr((1 + $(add_inv_add_mul_eq_zero x) : Unitization R A)) using 1
166166
· simp only [mul_one, PreQuasiregular.equiv_symm_apply, one_mul, mul_add,
167167
add_mul, inr_add, inr_mul]
168168
abel
@@ -216,8 +216,8 @@ lemma IsQuasiregular.isUnit_one_add {R : Type*} [Semiring R] {x : R} (hx : IsQua
216216
IsUnit (1 + x) := by
217217
obtain ⟨y, hy₁, hy₂⟩ := isQuasiregular_iff.mp hx
218218
refine ⟨⟨1 + x, 1 + y, ?_, ?_⟩, rfl⟩
219-
· convert! congr(1 + $(hy₁)) using 1 <;> [noncomm_ring; simp]
220-
· convert! congr(1 + $(hy₂)) using 1 <;> [noncomm_ring; simp]
219+
· convert congr(1 + $(hy₁)) using 1 <;> [noncomm_ring; simp]
220+
· convert congr(1 + $(hy₂)) using 1 <;> [noncomm_ring; simp]
221221

222222
lemma isQuasiregular_iff_isUnit {R : Type*} [Ring R] {x : R} :
223223
IsQuasiregular x ↔ IsUnit (1 + x) := by
@@ -229,7 +229,7 @@ lemma isQuasiregular_iff_isUnit {R : Type*} [Ring R] {x : R} :
229229
case' h.right => have := congr($(hx.val_inv_mul) - 1)
230230
all_goals
231231
rw [← sub_add_cancel (↑hx.unit⁻¹ : R) 1, sub_self] at this
232-
convert! this using 1
232+
convert this using 1
233233
noncomm_ring
234234

235235
-- interestingly, this holds even in the semiring case.
@@ -314,7 +314,7 @@ lemma spectrum_subset_quasispectrum (R : Type*) {A : Type*} [CommSemiring R] [Ri
314314

315315
lemma quasispectrum_eq_spectrum_union_zero (R : Type*) {A : Type*} [Semifield R] [Ring A]
316316
[Algebra R A] (a : A) : quasispectrum R a = spectrum R a ∪ {0} := by
317-
convert! quasispectrum_eq_spectrum_union R a
317+
convert quasispectrum_eq_spectrum_union R a
318318
simp
319319

320320
lemma mem_quasispectrum_iff {R A : Type*} [Semifield R] [Ring A]
@@ -518,10 +518,10 @@ protected lemma comp {R₁ R₂ R₃ A : Type*} [Semifield R₁] [Field R₂] [F
518518
(hf : QuasispectrumRestricts a f) (hg : QuasispectrumRestricts a g) :
519519
QuasispectrumRestricts a e where
520520
left_inv := by
521-
convert! hfge ▸ hf.left_inv.comp hg.left_inv
521+
convert hfge ▸ hf.left_inv.comp hg.left_inv
522522
congrm (⇑$(IsScalarTower.algebraMap_eq R₁ R₂ R₃))
523523
rightInvOn := by
524-
convert! hfge ▸ hg.rightInvOn.comp hf.rightInvOn fun _ ↦ hf.apply_mem
524+
convert hfge ▸ hg.rightInvOn.comp hf.rightInvOn fun _ ↦ hf.apply_mem
525525
congrm (⇑$(IsScalarTower.algebraMap_eq R₁ R₂ R₃))
526526

527527
end NonUnital

Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ scoped instance faithfulSMul :
725725
letI := (inclusion h).toModule; FaithfulSMul S T :=
726726
letI := (inclusion h).toModule
727727
fun {x y} h ↦ Subtype.ext <| by
728-
convert! Subtype.ext_iff.mp (h 1) using 1 <;> exact (mul_one _).symm⟩
728+
convert Subtype.ext_iff.mp (h 1) using 1 <;> exact (mul_one _).symm⟩
729729

730730
end inclusion
731731

Mathlib/Algebra/Algebra/Subalgebra/Centralizer.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ lemma centralizer_coe_image_includeRight_eq_center_tensorProduct
111111
(Subalgebra.centralizer R (S : Set B)).val).range := by
112112
have eq1 := centralizer_coe_image_includeLeft_eq_center_tensorProduct R B A S
113113
apply_fun Subalgebra.comap (Algebra.TensorProduct.comm R A B).toAlgHom at eq1
114-
convert! eq1
114+
convert eq1
115115
· ext x
116116
simpa [mem_centralizer_iff] using
117117
fun h b hb ↦ (Algebra.TensorProduct.comm R A B).symm.injective <| by aesop, fun h b hb ↦

Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ theorem mem_adjoin_of_map_mul {s} {x : A} {f : A →ₗ[R] B} (hf : ∀ a₁ a
713713
| algebraMap r =>
714714
have : f 1 ∈ adjoin R (f '' (s ∪ {1})) :=
715715
subset_adjoin ⟨1, ⟨Set.subset_union_right <| Set.mem_singleton 1, rfl⟩⟩
716-
convert! Subalgebra.smul_mem (adjoin R (f '' (s ∪ {1}))) this r
716+
convert Subalgebra.smul_mem (adjoin R (f '' (s ∪ { 1 }))) this r
717717
rw [algebraMap_eq_smul_one]
718718
exact f.map_smul _ _
719719
| add y z _ _ hy hz => simpa [hy, hz] using Subalgebra.add_mem _ hy hz
@@ -860,8 +860,8 @@ theorem eqOn_adjoin_iff {φ ψ : A →ₐ[R] B} {s : Set A} :
860860
theorem adjoin_ext {s : Set A} ⦃φ₁ φ₂ : adjoin R s →ₐ[R] B⦄
861861
(h : ∀ x hx, φ₁ ⟨x, subset_adjoin hx⟩ = φ₂ ⟨x, subset_adjoin hx⟩) : φ₁ = φ₂ :=
862862
ext fun ⟨x, hx⟩ ↦ adjoin_induction h (fun _ ↦ φ₂.commutes _ ▸ φ₁.commutes _)
863-
(fun _ _ _ _ h₁ h₂ ↦ by convert! congr_arg₂ (· + ·) h₁ h₂ <;> rw [← map_add] <;> rfl)
864-
(fun _ _ _ _ h₁ h₂ ↦ by convert! congr_arg₂ (· * ·) h₁ h₂ <;> rw [← map_mul] <;> rfl) hx
863+
(fun _ _ _ _ h₁ h₂ ↦ by convert congr_arg₂ (· + ·) h₁ h₂ <;> rw [← map_add] <;> rfl)
864+
(fun _ _ _ _ h₁ h₂ ↦ by convert congr_arg₂ (· * ·) h₁ h₂ <;> rw [← map_mul] <;> rfl) hx
865865

866866
theorem ext_of_eq_adjoin {S : Subalgebra R A} {s : Set A} (hS : S = adjoin R s) ⦃φ₁ φ₂ : S →ₐ[R] B⦄
867867
(h : ∀ x hx, φ₁ ⟨x, hS.ge (subset_adjoin hx)⟩ = φ₂ ⟨x, hS.ge (subset_adjoin hx)⟩) :
@@ -977,7 +977,7 @@ theorem comap_map_eq (f : A →ₐ[R] B) (S : Subalgebra R A) :
977977

978978
theorem comap_map_eq_self {f : A →ₐ[R] B} {S : Subalgebra R A}
979979
(h : f ⁻¹' {0} ⊆ S) : (S.map f).comap f = S := by
980-
convert! comap_map_eq f S
980+
convert comap_map_eq f S
981981
rwa [left_eq_sup, Algebra.adjoin_le_iff]
982982

983983
end Subalgebra

Mathlib/Algebra/BigOperators/Fin.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ def finPiFinEquiv {m : ℕ} {n : Fin m → ℕ} : (∀ i : Fin m, Fin (n i)) ≃
663663
simp_rw [Fin.val_zero, Fintype.prod_empty, Nat.div_one, mul_one, Fin.cons_zero,
664664
Fin.prod_univ_succ, Fin.castLE_zero, Fin.cons_zero, ← Nat.div_div_eq_div_mul,
665665
mul_left_comm (_ % _ : ℕ), ← mul_sum]
666-
convert! Nat.mod_add_div _ _
666+
convert Nat.mod_add_div _ _
667667
exact ih (a / x) (Nat.div_lt_of_lt_mul <| a.is_lt.trans_eq (Fin.prod_univ_succ _)))
668668

669669
theorem finPiFinEquiv_apply {m : ℕ} {n : Fin m → ℕ} (f : ∀ i : Fin m, Fin (n i)) :

Mathlib/Algebra/BigOperators/Group/Finset/Piecewise.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ theorem prod_inter_mul_prod_diff [DecidableEq ι] (s t : Finset ι) (f : ι →
191191
theorem prod_eq_mul_prod_diff_singleton [DecidableEq ι] {s : Finset ι} (i : ι) (f : ι → M)
192192
(h : i ∉ s → f i = 1) : ∏ x ∈ s, f x = f i * ∏ x ∈ s \ {i}, f x := by
193193
by_cases hs : i ∈ s
194-
· convert! (s.prod_inter_mul_prod_diff {i} f).symm
194+
· convert (s.prod_inter_mul_prod_diff { i } f).symm
195195
simp [hs]
196196
· simp_all only [not_false_eq_true, forall_const, one_mul]
197197
apply Finset.prod_congr <;> aesop

Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ theorem prod_hom (s : Multiset M) {F : Type*} [FunLike F M N]
9393
theorem prod_hom' (s : Multiset ι) {F : Type*} [FunLike F M N]
9494
[MonoidHomClass F M N] (f : F)
9595
(g : ι → M) : (s.map fun i => f <| g i).prod = f (s.map g).prod := by
96-
convert! (s.map g).prod_hom f
96+
convert (s.map g).prod_hom f
9797
exact (map_map _ _ _).symm
9898

9999
@[to_additive]

Mathlib/Algebra/BigOperators/Intervals.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,7 @@ lemma Finset.prod_fin_Icc_eq_prod_nat_Icc [CommMonoid α] {n : ℕ} (a b : Fin n
256256
lemma Fin.prod_Iic_div [CommGroup M] {n : ℕ} (a : Fin n) (f : Fin (n + 1) → M) :
257257
∏ i ∈ Iic a, (f i.succ / f i.castSucc) = f a.succ / f 0 := by
258258
rw [← prod_ite_mem_eq, prod_fin_eq_prod_range]
259-
convert! prod_range_div (fun i ↦ if hi : i < n + 1 then f ⟨i, hi⟩ else 1) (a + 1)
260-
using 1 with k hk
259+
convert prod_range_div (fun i ↦ if hi : i < n + 1 then f ⟨i, hi⟩ else 1) (a + 1) using 1 with k hk
261260
· exact prod_congr_of_eq_on_inter (by grind) (by grind) (by simp_all; grind)
262261
· grind
263262

0 commit comments

Comments
 (0)