Skip to content

Commit 6df41e3

Browse files
committed
chore(Computability): fix whitespace (#33172)
Found by extending the commandStart linter to proof bodies.
1 parent 7049d5b commit 6df41e3

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

Mathlib/Computability/AkraBazzi/AkraBazzi.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ lemma growsPolynomially_deriv_rpow_p_mul_one_sub_smoothingFn (p : ℝ) :
188188
(GrowsPolynomially.pow 2 growsPolynomially_log ?_)
189189
filter_upwards [eventually_ge_atTop 1] with _ hx using log_nonneg hx
190190
| inr hp => -- p ≠ 0
191-
refine GrowsPolynomially.of_isTheta (growsPolynomially_rpow (p-1))
191+
refine GrowsPolynomially.of_isTheta (growsPolynomially_rpow (p - 1))
192192
(isTheta_deriv_rpow_p_mul_one_sub_smoothingFn hp) ?_
193193
filter_upwards [eventually_gt_atTop 0] with _ _
194194
positivity
@@ -208,7 +208,7 @@ lemma growsPolynomially_deriv_rpow_p_mul_one_add_smoothingFn (p : ℝ) :
208208
(GrowsPolynomially.pow 2 growsPolynomially_log ?_)
209209
filter_upwards [eventually_ge_atTop 1] with x hx using log_nonneg hx
210210
| inr hp => -- p ≠ 0
211-
refine GrowsPolynomially.of_isTheta (growsPolynomially_rpow (p-1))
211+
refine GrowsPolynomially.of_isTheta (growsPolynomially_rpow (p - 1))
212212
(isTheta_deriv_rpow_p_mul_one_add_smoothingFn hp) ?_
213213
filter_upwards [eventually_gt_atTop 0] with _ _
214214
positivity
@@ -583,9 +583,9 @@ lemma T_isBigO_smoothingFn_mul_asympBound :
583583
refine mul_nonpos_of_nonpos_of_nonneg ?_ g_pos
584584
rw [sub_nonpos]
585585
calc 1
586-
_ ≤ 2 * (c₁⁻¹ * c₁) * (1/2) := by
586+
_ ≤ 2 * (c₁⁻¹ * c₁) * (1 / 2) := by
587587
rw [inv_mul_cancel₀ (by positivity : c₁ ≠ 0)]; norm_num
588-
_ = (2 * c₁⁻¹) * c₁ * (1/2) := by ring
588+
_ = (2 * c₁⁻¹) * c₁ * (1 / 2) := by ring
589589
_ ≤ C * c₁ * (1 - ε n) := by
590590
gcongr
591591
· rw [hC]; exact le_max_left _ _

Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ lemma eventually_atTop_nonneg_or_nonpos (hf : GrowsPolynomially f) :
220220
_ ≤ ((1 : ℝ) / (2 : ℝ)) * (2 : ℝ) ^ n * max n₀ 2 := by gcongr; norm_num
221221
_ ≤ _ := by rw [mul_assoc]; gcongr; exact_mod_cast hz.1
222222
case ub =>
223-
have h₁ : (2 : ℝ)^n = ((1 : ℝ)/(2 : ℝ)) * (2 : ℝ)^(n + 1) := by
223+
have h₁ : (2 : ℝ)^n = ((1 : ℝ) / (2 : ℝ)) * (2 : ℝ)^(n + 1) := by
224224
rw [one_div, pow_add, pow_one]
225225
ring
226226
rw [h₁, mul_assoc]
@@ -417,10 +417,10 @@ lemma GrowsPolynomially.add_isLittleO {f g : ℝ → ℝ} (hf : GrowsPolynomiall
417417
have hfg₂ : ‖g x‖ ≤ 1 / 2 * f x := by
418418
calc ‖g x‖ ≤ 1 / 2 * ‖f x‖ := hfg' x hbx
419419
_ = 1 / 2 * f x := by congr; exact norm_of_nonneg (hf₂ _ hbx)
420-
have hx_ub : f x + g x ≤ 3/2 * f x := by
420+
have hx_ub : f x + g x ≤ 3 / 2 * f x := by
421421
calc _ ≤ f x + ‖g x‖ := by gcongr; exact le_norm_self (g x)
422422
_ ≤ f x + 1 / 2 * f x := by gcongr
423-
_ = 3/2 * f x := by ring
423+
_ = 3 / 2 * f x := by ring
424424
have hx_lb : 1 / 2 * f x ≤ f x + g x := by
425425
calc f x + g x ≥ f x - ‖g x‖ := by
426426
rw [sub_eq_add_neg, norm_eq_abs]; gcongr; exact neg_abs_le (g x)
@@ -438,15 +438,15 @@ lemma GrowsPolynomially.add_isLittleO {f g : ℝ → ℝ} (hf : GrowsPolynomiall
438438
_ ≥ f u - 1 / 2 * f u := by gcongr
439439
_ = 1 / 2 * f u := by ring
440440
_ ≥ 1 / 2 * (c₁ * f x) := by gcongr; exact (hf₁ u ⟨hu_lb, hu_ub⟩).1
441-
_ = c₁/3 * (3/2 * f x) := by ring
442-
_ ≥ c₁/3 * (f x + g x) := by gcongr
441+
_ = c₁ / 3 * (3 / 2 * f x) := by ring
442+
_ ≥ c₁ / 3 * (f x + g x) := by gcongr
443443
case ub =>
444444
calc _ ≤ f u + ‖g u‖ := by gcongr; exact le_norm_self (g u)
445445
_ ≤ f u + 1 / 2 * f u := by gcongr
446-
_ = 3/2 * f u := by ring
447-
_ ≤ 3/2 * (c₂ * f x) := by gcongr; exact (hf₁ u ⟨hu_lb, hu_ub⟩).2
448-
_ = 3*c₂ * (1 / 2 * f x) := by ring
449-
_ ≤ 3*c₂ * (f x + g x) := by gcongr
446+
_ = 3 / 2 * f u := by ring
447+
_ ≤ 3 / 2 * (c₂ * f x) := by gcongr; exact (hf₁ u ⟨hu_lb, hu_ub⟩).2
448+
_ = 3 * c₂ * (1 / 2 * f x) := by ring
449+
_ ≤ 3 * c₂ * (f x + g x) := by gcongr
450450
| inr hf' => -- f is eventually nonpos
451451
have hf := hf b hb
452452
obtain ⟨c₁, hc₁_mem : 0 < c₁, c₂, hc₂_mem : 0 < c₂, hf⟩ := hf
@@ -465,15 +465,15 @@ lemma GrowsPolynomially.add_isLittleO {f g : ℝ → ℝ} (hf : GrowsPolynomiall
465465
calc _ ≤ f x + ‖g x‖ := by gcongr; exact le_norm_self (g x)
466466
_ ≤ f x + (-1 / 2 * f x) := by gcongr
467467
_ = 1 / 2 * f x := by ring
468-
have hx_lb : 3/2 * f x ≤ f x + g x := by
468+
have hx_lb : 3 / 2 * f x ≤ f x + g x := by
469469
calc f x + g x ≥ f x - ‖g x‖ := by
470470
rw [sub_eq_add_neg, norm_eq_abs]; gcongr; exact neg_abs_le (g x)
471471
_ ≥ f x + 1 / 2 * f x := by
472472
rw [sub_eq_add_neg]
473473
gcongr
474474
refine le_of_neg_le_neg ?bc.a
475475
rwa [neg_neg, ← neg_mul, ← neg_div]
476-
_ = 3/2 * f x := by ring
476+
_ = 3 / 2 * f x := by ring
477477
intro u ⟨hu_lb, hu_ub⟩
478478
have hfu_nonpos : f u ≤ 0 := hf₂ _ hu_lb
479479
have hfg₃ : ‖g u‖ ≤ -1 / 2 * f u := by
@@ -489,10 +489,10 @@ lemma GrowsPolynomially.add_isLittleO {f g : ℝ → ℝ} (hf : GrowsPolynomiall
489489
gcongr
490490
refine le_of_neg_le_neg ?_
491491
rwa [neg_neg, ← neg_mul, ← neg_div]
492-
_ = 3/2 * f u := by ring
493-
_ ≥ 3/2 * (c₁ * f x) := by gcongr; exact (hf₁ u ⟨hu_lb, hu_ub⟩).1
494-
_ = 3*c₁ * (1 / 2 * f x) := by ring
495-
_ ≥ 3*c₁ * (f x + g x) := by gcongr
492+
_ = 3 / 2 * f u := by ring
493+
_ ≥ 3 / 2 * (c₁ * f x) := by gcongr; exact (hf₁ u ⟨hu_lb, hu_ub⟩).1
494+
_ = 3 * c₁ * (1 / 2 * f x) := by ring
495+
_ ≥ 3 * c₁ * (f x + g x) := by gcongr
496496
case ub =>
497497
calc _ ≤ f u + ‖g u‖ := by gcongr; exact le_norm_self (g u)
498498
_ ≤ f u - 1 / 2 * f u := by
@@ -501,8 +501,8 @@ lemma GrowsPolynomially.add_isLittleO {f g : ℝ → ℝ} (hf : GrowsPolynomiall
501501
rwa [← neg_mul, ← neg_div]
502502
_ = 1 / 2 * f u := by ring
503503
_ ≤ 1 / 2 * (c₂ * f x) := by gcongr; exact (hf₁ u ⟨hu_lb, hu_ub⟩).2
504-
_ = c₂/3 * (3/2 * f x) := by ring
505-
_ ≤ c₂/3 * (f x + g x) := by gcongr
504+
_ = c₂ / 3 * (3 / 2 * f x) := by ring
505+
_ ≤ c₂ / 3 * (f x + g x) := by gcongr
506506

507507
protected lemma GrowsPolynomially.inv {f : ℝ → ℝ} (hf : GrowsPolynomially f) :
508508
GrowsPolynomially fun x => (f x)⁻¹ := by

Mathlib/Computability/NFA.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ theorem evalFrom_iUnion {ι : Sort*} (s : ι → Set σ) (x : List α) :
138138
M.evalFrom (⋃ i, s i) x = ⋃ i, M.evalFrom (s i) x := by
139139
induction x generalizing s with
140140
| nil => simp
141-
| cons a x ih => simp [stepSet, Set.iUnion_comm (ι:=σ) (ι':=ι), ih]
141+
| cons a x ih => simp [stepSet, Set.iUnion_comm (ι := σ) (ι' := ι), ih]
142142

143143
variable (M) in
144144
theorem evalFrom_iUnion₂ {ι : Sort*} {κ : ι → Sort*} (f : ∀ i, κ i → Set σ) (x : List α) :

Mathlib/Computability/TMToPartrec.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ theorem trStmts₁_trans {q q'} : q' ∈ trStmts₁ q → trStmts₁ q' ⊆ trSt
972972
· exact Or.inr (Or.inr <| Or.inr <| q₂_ih h h')
973973

974974
theorem trStmts₁_self (q) : q ∈ trStmts₁ q := by
975-
induction q <;> · first | apply Finset.mem_singleton_self|apply Finset.mem_insert_self
975+
induction q <;> · first | apply Finset.mem_singleton_self | apply Finset.mem_insert_self
976976

977977
/-- The (finite!) set of machine states visited during the course of evaluation of `c`,
978978
including the state `ret k` but not any states after that (that is, the states visited while

0 commit comments

Comments
 (0)