Skip to content

Commit 05fc0b6

Browse files
chore: tidy various files
1 parent d9a9fc0 commit 05fc0b6

31 files changed

Lines changed: 88 additions & 110 deletions

File tree

Mathlib/Algebra/Lie/Engel.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,7 @@ theorem LieAlgebra.isEngelian_of_isNoetherian [IsNoetherian R L] : LieAlgebra.Is
243243
K.toSubmodule_inj]
244244
exact Submodule.Quotient.nontrivial_of_lt_top _ hK₂.lt_top
245245
have : LieModule.IsNilpotent K (L' ⧸ K.toLieSubmodule) := by
246-
-- Porting note: was refine' hK₁ _ fun x => _
247-
apply hK₁
248-
intro x
246+
refine hK₁ _ fun x => ?_
249247
have hx := LieAlgebra.isNilpotent_ad_of_isNilpotent (h x)
250248
apply Module.End.IsNilpotent.mapQ ?_ hx
251249
-- Porting note: mathlib3 solved this on its own with `submodule.mapq_linear._proof_5`

Mathlib/Algebra/Lie/Nilpotent.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ private theorem coe_lowerCentralSeries_eq_int_aux (R₁ R₂ L M : Type*)
105105

106106
theorem coe_lowerCentralSeries_eq_int [LieModule R L M] (k : ℕ) :
107107
(lowerCentralSeries R L M k : Set M) = (lowerCentralSeries ℤ L M k : Set M) := by
108-
show ((lowerCentralSeries R L M k).toSubmodule : Set M) =
109-
((lowerCentralSeries ℤ L M k).toSubmodule : Set M)
108+
rw [← LieSubmodule.coe_toSubmodule, ← LieSubmodule.coe_toSubmodule]
110109
induction k with
111110
| zero => rfl
112111
| succ k ih =>

Mathlib/Algebra/Lie/Solvable.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ private theorem coe_derivedSeries_eq_int_aux (R₁ R₂ L : Type*) [CommRing R
226226

227227
theorem coe_derivedSeries_eq_int (k : ℕ) :
228228
(derivedSeries R L k : Set L) = (derivedSeries ℤ L k : Set L) := by
229-
show ((derivedSeries R L k).toSubmodule : Set L) = ((derivedSeries ℤ L k).toSubmodule : Set L)
230-
rw [derivedSeries_def, derivedSeries_def]
229+
rw [← LieSubmodule.coe_toSubmodule, ← LieSubmodule.coe_toSubmodule, derivedSeries_def,
230+
derivedSeries_def]
231231
induction k with
232232
| zero => rfl
233233
| succ k ih =>

Mathlib/Algebra/Order/Floor.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,7 @@ theorem sub_floor_div_mul_nonneg (a : k) (hb : 0 < b) : 0 ≤ a - ⌊a / b⌋ *
10091009

10101010
theorem sub_floor_div_mul_lt (a : k) (hb : 0 < b) : a - ⌊a / b⌋ * b < b :=
10111011
sub_lt_iff_lt_add.2 <| by
1012-
-- Porting note: `← one_add_mul` worked in mathlib3 without the argument
1013-
rw [← one_add_mul _ b, ← div_lt_iff₀ hb, add_comm]
1012+
rw [← one_add_mul, ← div_lt_iff₀ hb, add_comm]
10141013
exact lt_floor_add_one _
10151014

10161015
theorem fract_div_natCast_eq_div_natCast_mod {m n : ℕ} : fract ((m : k) / n) = ↑(m % n) / n := by
@@ -1055,7 +1054,7 @@ theorem fract_div_intCast_eq_div_intCast_mod {m : ℤ} {n : ℕ} :
10551054
-- Porting note: the `simp` was `push_cast`
10561055
simp [m₁]
10571056
· congr 2
1058-
change (q * ↑n - (↑m₀ : ℤ)) % ↑n = _
1057+
simp only [m₁]
10591058
rw [sub_eq_add_neg, add_comm (q * ↑n), add_mul_emod_self]
10601059

10611060
end LinearOrderedField

Mathlib/Algebra/Order/Round.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ variable [LinearOrderedField α] [LinearOrderedField β] [FloorRing α] [FloorRi
205205
variable [FunLike F α β] [RingHomClass F α β] {a : α} {b : β}
206206

207207
theorem map_round (f : F) (hf : StrictMono f) (a : α) : round (f a) = round a := by
208-
have H : f 2 = 2 := map_natCast f 2
209-
simp_rw [round_eq, ← map_floor _ hf, map_add, one_div, map_inv₀, H]
210-
-- Porting note: was
211-
-- simp_rw [round_eq, ← map_floor _ hf, map_add, one_div, map_inv₀, map_bit0, map_one]
212-
-- Would have thought that `map_natCast` would replace `map_bit0, map_one` but seems not
208+
simp_rw [round_eq, ← map_floor _ hf, map_add, one_div, map_inv₀, map_ofNat]
213209

214210
end Int

Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,17 @@ theorem natDegree_mul_C_eq_of_mul_eq_one {ai : R} (au : a * ai = 1) :
116116
_ = (p * C a * C ai).natDegree := by rw [← C_1, ← au, RingHom.map_mul, ← mul_assoc]
117117
_ ≤ (p * C a).natDegree := natDegree_mul_C_le (p * C a) ai)
118118

119-
/-- Although not explicitly stated, the assumptions of lemma `nat_degree_mul_C_eq_of_mul_ne_zero`
120-
force the polynomial `p` to be non-zero, via `p.leading_coeff ≠ 0`.
119+
/-- Although not explicitly stated, the assumptions of lemma `natDegree_mul_C_eq_of_mul_ne_zero`
120+
force the polynomial `p` to be non-zero, via `p.leadingCoeff ≠ 0`.
121121
-/
122122
theorem natDegree_mul_C_eq_of_mul_ne_zero (h : p.leadingCoeff * a ≠ 0) :
123123
(p * C a).natDegree = p.natDegree := by
124124
refine eq_natDegree_of_le_mem_support (natDegree_mul_C_le p a) ?_
125125
refine mem_support_iff.mpr ?_
126126
rwa [coeff_mul_C]
127127

128-
/-- Although not explicitly stated, the assumptions of lemma `nat_degree_C_mul_eq_of_mul_ne_zero`
129-
force the polynomial `p` to be non-zero, via `p.leading_coeff ≠ 0`.
128+
/-- Although not explicitly stated, the assumptions of lemma `natDegree_C_mul_of_mul_ne_zero`
129+
force the polynomial `p` to be non-zero, via `p.leadingCoeff ≠ 0`.
130130
-/
131131
theorem natDegree_C_mul_of_mul_ne_zero (h : a * p.leadingCoeff ≠ 0) :
132132
(C a * p).natDegree = p.natDegree := by

Mathlib/Algebra/Polynomial/Degree/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Mathlib.Algebra.Polynomial.Degree.Definitions
1212
## Main results
1313
- `degree_mul` : The degree of the product is the sum of degrees
1414
- `leadingCoeff_add_of_degree_eq` and `leadingCoeff_add_of_degree_lt` :
15-
The leading_coefficient of a sum is determined by the leading coefficients and degrees
15+
The leading coefficient of a sum is determined by the leading coefficients and degrees
1616
-/
1717

1818
noncomputable section

Mathlib/Algebra/Polynomial/Laurent.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Lots is missing!
6666
-- This would likely involve adding a `comapDomain` analogue of
6767
-- `AddMonoidAlgebra.mapDomainAlgHom` and an `R`-linear version of
6868
-- `Polynomial.toFinsuppIso`.
69-
-- Add `degree, int_degree, int_trailing_degree, leading_coeff, trailing_coeff,...`.
69+
-- Add `degree, intDegree, intTrailingDegree, leadingCoeff, trailingCoeff,...`.
7070
-/
7171

7272

Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,9 +676,9 @@ lemma of_stalkMap (hQ : OfLocalizationPrime Q) (H : ∀ x, Q (f.stalkMap x).hom)
676676
/-- Let `Q` be a property of ring maps that is stable under localization.
677677
Then if the associated property of scheme morphisms holds for `f`, `Q` holds on all stalks. -/
678678
lemma stalkMap
679-
(hQ : ∀ {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (_ : Q f)
680-
(J : Ideal S) (_ : J.IsPrime), Q (Localization.localRingHom _ J f rfl))
681-
(hf : P f) (x : X) : Q (f.stalkMap x).hom := by
679+
(hQ : ∀ {R S : Type u} [CommRing R] [CommRing S] (f : R →+* S) (_ : Q f)
680+
(J : Ideal S) (_ : J.IsPrime), Q (Localization.localRingHom _ J f rfl))
681+
(hf : P f) (x : X) : Q (f.stalkMap x).hom := by
682682
have hQi := (HasRingHomProperty.isLocal_ringHomProperty P).respectsIso
683683
wlog h : IsAffine X ∧ IsAffine Y generalizing X Y f
684684
· obtain ⟨U, hU, hfx, _⟩ := Opens.isBasis_iff_nbhd.mp (isBasis_affine_open Y)

Mathlib/Analysis/Calculus/Deriv/Prod.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ theorem derivWithin_pi (h : ∀ i, DifferentiableWithinAt 𝕜 (fun x => φ x i)
8282
derivWithin φ s x = fun i => derivWithin (fun x => φ x i) s x := by
8383
rcases uniqueDiffWithinAt_or_nhdsWithin_eq_bot s x with hxs | hxs
8484
· exact (hasDerivWithinAt_pi.2 fun i => (h i).hasDerivWithinAt).derivWithin hxs
85-
· simp only [derivWithin_zero_of_isolated hxs]
86-
rfl
85+
· simp only [derivWithin_zero_of_isolated hxs, Pi.zero_def]
8786

8887
theorem deriv_pi (h : ∀ i, DifferentiableAt 𝕜 (fun x => φ x i) x) :
8988
deriv φ x = fun i => deriv (fun x => φ x i) x :=

0 commit comments

Comments
 (0)