Skip to content

Commit 1050066

Browse files
committed
chore: format by line breaks with long lines (#1529)
This was done semi-automatically with some regular expressions in vim in contrast to the fully automatic #1523. Co-authored-by: Moritz Firsching <firsching@google.com>
1 parent d933809 commit 1050066

Some content is hidden

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

41 files changed

+116
-116
lines changed

Mathlib/Algebra/GCDMonoid/Basic.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ theorem normUnit_mul_normUnit (a : α) : normUnit (a * normUnit a) = 1 := by
171171
theorem normalize_idem (x : α) : normalize (normalize x) = normalize x := by simp
172172
#align normalize_idem normalize_idem
173173

174-
theorem normalize_eq_normalize {a b : α} (hab : a ∣ b) (hba : b ∣ a) : normalize a = normalize b :=
175-
by
174+
theorem normalize_eq_normalize {a b : α} (hab : a ∣ b) (hba : b ∣ a) :
175+
normalize a = normalize b := by
176176
nontriviality α
177177
rcases associated_of_dvd_dvd hab hba with ⟨u, rfl⟩
178178
refine' by_cases (by rintro rfl; simp only [zero_mul]) fun ha : a ≠ 0 => _
@@ -446,8 +446,8 @@ theorem gcd_mul_left [NormalizedGCDMonoid α] (a b c : α) :
446446
(dvd_gcd (mul_dvd_mul_left a <| gcd_dvd_left _ _) (mul_dvd_mul_left a <| gcd_dvd_right _ _))
447447
#align gcd_mul_left gcd_mul_left
448448

449-
theorem gcd_mul_left' [GCDMonoid α] (a b c : α) : Associated (gcd (a * b) (a * c)) (a * gcd b c) :=
450-
by
449+
theorem gcd_mul_left' [GCDMonoid α] (a b c : α) :
450+
Associated (gcd (a * b) (a * c)) (a * gcd b c) := by
451451
obtain rfl | ha := eq_or_ne a 0
452452
· simp only [zero_mul, gcd_zero_left']
453453
obtain ⟨d, eq⟩ := dvd_gcd (dvd_mul_right a b) (dvd_mul_right a c)
@@ -561,8 +561,8 @@ theorem gcd_mul_dvd_mul_gcd [GCDMonoid α] (k m n : α) : gcd k (m * n) ∣ gcd
561561
exact dvd_gcd hn'k hn'
562562
#align gcd_mul_dvd_mul_gcd gcd_mul_dvd_mul_gcd
563563

564-
theorem gcd_pow_right_dvd_pow_gcd [GCDMonoid α] {a b : α} {k : ℕ} : gcd a (b ^ k) ∣ gcd a b ^ k :=
565-
by
564+
theorem gcd_pow_right_dvd_pow_gcd [GCDMonoid α] {a b : α} {k : ℕ} :
565+
gcd a (b ^ k) ∣ gcd a b ^ k := by
566566
by_cases hg : gcd a b = 0
567567
· rw [gcd_eq_zero_iff] at hg
568568
rcases hg with ⟨rfl, rfl⟩

Mathlib/Algebra/Group/Conj.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ theorem mem_carrier_mk {a : α} : a ∈ carrier (ConjClasses.mk a) :=
317317
IsConj.refl _
318318
#align conj_classes.mem_carrier_mk ConjClasses.mem_carrier_mk
319319

320-
theorem mem_carrier_iff_mk_eq {a : α} {b : ConjClasses α} : a ∈ carrier b ↔ ConjClasses.mk a = b :=
321-
by
320+
theorem mem_carrier_iff_mk_eq {a : α} {b : ConjClasses α} :
321+
a ∈ carrier b ↔ ConjClasses.mk a = b := by
322322
revert b
323323
rw [forall_isConj]
324324
intro b

Mathlib/Algebra/Group/Ext.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ theorem Monoid.ext {M : Type u} ⦃m₁ m₂ : Monoid M⦄ (h_mul : m₁.mul = m
4545
#align monoid.ext Monoid.ext
4646

4747
@[to_additive]
48-
theorem CommMonoid.toMonoid_injective {M : Type u} : Function.Injective (@CommMonoid.toMonoid M) :=
49-
by
48+
theorem CommMonoid.toMonoid_injective {M : Type u} :
49+
Function.Injective (@CommMonoid.toMonoid M) := by
5050
rintro ⟨⟩ ⟨⟩ h
5151
congr
5252
#align comm_monoid.to_monoid_injective CommMonoid.toMonoid_injective

Mathlib/Algebra/GroupPower/Lemmas.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ theorem abs_zsmul (n : ℤ) (a : α) : |n • a| = |n| • |a| := by
437437
exact abs_nsmul m _
438438
#align abs_zsmul abs_zsmul
439439

440-
theorem abs_add_eq_add_abs_le (hle : a ≤ b) : |a + b| = |a| + |b| ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0 :=
441-
by
440+
theorem abs_add_eq_add_abs_le (hle : a ≤ b) :
441+
|a + b| = |a| + |b| ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0 := by
442442
obtain a0 | a0 := le_or_lt 0 a <;> obtain b0 | b0 := le_or_lt 0 b
443443
· simp [a0, b0, abs_of_nonneg, add_nonneg a0 b0]
444444
· exact (lt_irrefl (0 : α) <| a0.trans_lt <| hle.trans_lt b0).elim
@@ -752,8 +752,8 @@ theorem le_self_sq (b : ℤ) : b ≤ b ^ 2 :=
752752

753753
alias le_self_sq ← le_self_pow_two
754754

755-
theorem pow_right_injective {x : ℤ} (h : 1 < x.natAbs) : Function.Injective ((· ^ ·) x : ℕ → ℤ) :=
756-
by
755+
theorem pow_right_injective {x : ℤ} (h : 1 < x.natAbs) :
756+
Function.Injective ((· ^ ·) x : ℕ → ℤ) := by
757757
suffices Function.Injective (natAbs ∘ ((· ^ ·) x : ℕ → ℤ)) by
758758
exact Function.Injective.of_comp this
759759
convert Nat.pow_right_injective h

Mathlib/Algebra/Order/Group/Defs.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,8 @@ theorem le_iff_forall_one_lt_lt_mul : a ≤ b ↔ ∀ ε, 1 < ε → a < b * ε
880880
/- I (DT) introduced this lemma to prove (the additive version `sub_le_sub_flip` of)
881881
`div_le_div_flip` below. Now I wonder what is the point of either of these lemmas... -/
882882
@[to_additive]
883-
theorem div_le_inv_mul_iff [CovariantClass α α (swap (· * ·)) (· ≤ ·)] : a / b ≤ a⁻¹ * b ↔ a ≤ b :=
884-
by
883+
theorem div_le_inv_mul_iff [CovariantClass α α (swap (· * ·)) (· ≤ ·)] :
884+
a / b ≤ a⁻¹ * b ↔ a ≤ b := by
885885
rw [div_eq_mul_inv, mul_inv_le_inv_mul_iff]
886886
exact
887887
fun h => not_lt.mp fun k => not_lt.mpr h (mul_lt_mul_of_lt_of_lt k k), fun h =>

Mathlib/Algebra/Order/Ring/Canonical.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ theorem mul_add_mul_le_mul_add_mul (hab : a ≤ b) (hcd : c ≤ d) : a * d + b *
6060
#align mul_add_mul_le_mul_add_mul mul_add_mul_le_mul_add_mul
6161

6262
/-- Binary **rearrangement inequality**. -/
63-
theorem mul_add_mul_le_mul_add_mul' (hba : b ≤ a) (hdc : d ≤ c) : a • d + b • c ≤ a • c + b • d :=
64-
by
63+
theorem mul_add_mul_le_mul_add_mul' (hba : b ≤ a) (hdc : d ≤ c) :
64+
a • d + b • c ≤ a • c + b • d := by
6565
rw [add_comm (a • d), add_comm (a • c)]
6666
exact mul_add_mul_le_mul_add_mul hba hdc
6767
#align mul_add_mul_le_mul_add_mul' mul_add_mul_le_mul_add_mul'
@@ -75,8 +75,8 @@ theorem mul_add_mul_lt_mul_add_mul (hab : a < b) (hcd : c < d) : a * d + b * c <
7575
#align mul_add_mul_lt_mul_add_mul mul_add_mul_lt_mul_add_mul
7676

7777
/-- Binary **rearrangement inequality**. -/
78-
theorem mul_add_mul_lt_mul_add_mul' (hba : b < a) (hdc : d < c) : a • d + b • c < a • c + b • d :=
79-
by
78+
theorem mul_add_mul_lt_mul_add_mul' (hba : b < a) (hdc : d < c) :
79+
a • d + b • c < a • c + b • d := by
8080
rw [add_comm (a • d), add_comm (a • c)]
8181
exact mul_add_mul_lt_mul_add_mul hba hdc
8282
#align mul_add_mul_lt_mul_add_mul' mul_add_mul_lt_mul_add_mul'

Mathlib/Algebra/Order/Sub/Canonical.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ protected theorem le_tsub_iff_left (ha : AddLECancellable a) (h : a ≤ c) : b
110110
⟨add_le_of_le_tsub_left_of_le h, ha.le_tsub_of_add_le_left⟩
111111
#align add_le_cancellable.le_tsub_iff_left AddLECancellable.le_tsub_iff_left
112112

113-
protected theorem le_tsub_iff_right (ha : AddLECancellable a) (h : a ≤ c) : b ≤ c - a ↔ b + a ≤ c :=
114-
by
113+
protected theorem le_tsub_iff_right (ha : AddLECancellable a) (h : a ≤ c) :
114+
b ≤ c - a ↔ b + a ≤ c := by
115115
rw [add_comm]
116116
exact ha.le_tsub_iff_left h
117117
#align add_le_cancellable.le_tsub_iff_right AddLECancellable.le_tsub_iff_right

Mathlib/Algebra/Parity.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ theorem Even.isSquare_zpow [Group α] {n : ℤ} : Even n → ∀ a : α, IsSquar
216216

217217
-- `odd.tsub` requires `CanonicallyLinearOrderedSemiring`, which we don't have
218218
theorem Even.tsub [CanonicallyLinearOrderedAddMonoid α] [Sub α] [OrderedSub α]
219-
[ContravariantClass α α (· + ·) (· ≤ ·)] {m n : α} (hm : Even m) (hn : Even n) : Even (m - n) :=
220-
by
219+
[ContravariantClass α α (· + ·) (· ≤ ·)] {m n : α} (hm : Even m) (hn : Even n) :
220+
Even (m - n) := by
221221
obtain ⟨a, rfl⟩ := hm
222222
obtain ⟨b, rfl⟩ := hn
223223
refine' ⟨a - b, _⟩
@@ -248,8 +248,8 @@ theorem even_iff_two_dvd {a : α} : Even a ↔ 2 ∣ a := by simp [Even, Dvd.dvd
248248
#align even_iff_two_dvd even_iff_two_dvd
249249

250250
@[simp]
251-
theorem range_two_mul (α : Type _) [Semiring α] : (Set.range fun x : α => 2 * x) = { a | Even a } :=
252-
by
251+
theorem range_two_mul (α : Type _) [Semiring α] :
252+
(Set.range fun x : α => 2 * x) = { a | Even a } := by
253253
ext x
254254
simp [eq_comm, two_mul, Even]
255255
#align range_two_mul range_two_mul

Mathlib/Algebra/Regular/Pow.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ theorem IsLeftRegular.pow_iff {n : ℕ} (n0 : 0 < n) : IsLeftRegular (a ^ n) ↔
5353
#align is_left_regular.pow_iff IsLeftRegular.pow_iff
5454

5555
/-- An element `a` is right-regular if and only if a positive power of `a` is right-regular. -/
56-
theorem IsRightRegular.pow_iff {n : ℕ} (n0 : 0 < n) : IsRightRegular (a ^ n) ↔ IsRightRegular a :=
57-
by
56+
theorem IsRightRegular.pow_iff {n : ℕ} (n0 : 0 < n) :
57+
IsRightRegular (a ^ n) ↔ IsRightRegular a := by
5858
refine' ⟨_, IsRightRegular.pow n⟩
5959
rw [← Nat.succ_pred_eq_of_pos n0, pow_succ]
6060
exact IsRightRegular.of_mul

Mathlib/Algebra/Regular/SMul.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ theorem mul [Mul R] [IsScalarTower R R M] (ra : IsSMulRegular M a) (rb : IsSMulR
102102
ra.smul rb
103103
#align is_smul_regular.mul IsSMulRegular.mul
104104

105-
theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) : IsSMulRegular M b :=
106-
by
105+
theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) :
106+
IsSMulRegular M b := by
107107
rw [← smul_eq_mul] at ab
108108
exact ab.of_smul _
109109
#align is_smul_regular.of_mul IsSMulRegular.of_mul

0 commit comments

Comments
 (0)