Skip to content

Commit 319f608

Browse files
committed
chore: small golfs, mostly using gcongr
1 parent a344b2a commit 319f608

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

SphereEversion/InductiveConstructions.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ theorem inductive_htpy_construction' {X Y : Type*} [TopologicalSpace X] {N : ℕ
382382
rw [mem_Ici]
383383
congr
384384
rw [← mul_T_succ_sub i.toNat]
385-
exact mul_le_mul_of_nonneg_left (sub_le_sub_right ht _) (pow_nonneg zero_le_two _)
385+
gcongr
386386
· push_neg
387387
apply T_lt_succ
388388
· rintro j hj ⟨t, x⟩ (rfl : t = 1)
@@ -397,7 +397,8 @@ theorem inductive_htpy_construction' {X Y : Type*} [TopologicalSpace X] {N : ℕ
397397
apply congr_fun (hfutur_F'.self_of_nhdsSet ..)
398398
rw [mem_Ici]
399399
conv => congr; skip; rw [← mul_T_succ_sub i.toNat]
400-
exact mul_le_mul_of_nonneg_left (sub_le_sub_right (T_lt _).le _) (pow_nonneg zero_le_two _)
400+
gcongr
401+
exact (T_lt _).le
401402
· rintro ⟨t, x⟩ htx
402403
simp only [prodMk_mem_set_prod_eq, mem_Ici, not_and_or, not_le] at htx
403404
obtain (ht | hx) := htx

SphereEversion/ToMathlib/Equivariant.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ protected theorem monotone (h : MonotoneOn φ I) : Monotone φ := fun x y hxy
5858
· rw [h2]
5959
refine add_le_add_right (h (unitInterval.fract_mem _) (unitInterval.fract_mem _) ?_) _
6060
simp_rw [fract, h2]
61-
exact sub_le_sub_right hxy _
61+
gcongr
6262
· refine (add_le_add_right (h (unitInterval.fract_mem _) unitInterval.one_mem
6363
(fract_lt_one _).le) _).trans
6464
(le_trans ?_ <|
6565
add_le_add_right (h unitInterval.zero_mem (unitInterval.fract_mem _) (fract_nonneg _)) _)
6666
rw [φ.one, add_assoc, add_comm (1 : ℝ)]
67-
refine add_le_add_left ?_ _
67+
gcongr
6868
norm_cast
6969

7070
protected theorem fract_fract (t : ℝ) : fract (φ (fract t)) = fract (φ t) := by
@@ -121,7 +121,7 @@ theorem linearReparam_monotone : Monotone linearReparam := by
121121
norm_num; linarith
122122
have : MonotoneOn linearReparam (Icc 4⁻¹ (3 / 4)) := fun x hx y hy hxy ↦ by
123123
rw [this x hx, this y hy]
124-
exact sub_le_sub_right (mul_le_mul_of_nonneg_left hxy zero_le_two) _
124+
gcongr
125125
have : MonotoneOn linearReparam (Icc 4⁻¹ 1) := fun x hx y hy hxy ↦ by
126126
obtain (h1y | h1y) := le_total y (3 / 4)
127127
· exact this ⟨hx.1, hxy.trans h1y⟩ ⟨hy.1, h1y⟩ hxy

SphereEversion/ToMathlib/Topology/Paracompact.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ theorem exists_countable_locallyFinite_cover {ι X : Type*} [TopologicalSpace X]
3131
suffices {m | (U m ∩ U n).Nonempty} ⊆ Icc (n - 2) (n + 2) by exact (finite_Icc _ _).subset this
3232
rintro m ⟨x, ⟨⟨hx₁, hx₂⟩, ⟨hx₃, hx₄⟩⟩⟩
3333
simp only [mem_Icc, tsub_le_iff_right]
34-
suffices ∀ {a b : ℕ}, x ∉ K a → x ∈ interior (K b.succ) → a ≤ b by
35-
exact ⟨this hx₄ hx₁, this hx₂ hx₃⟩
34+
suffices ∀ {a b : ℕ}, x ∉ K a → x ∈ interior (K b.succ) → a ≤ b from
35+
⟨this hx₄ hx₁, this hx₂ hx₃⟩
3636
intro a b ha hb
3737
by_contra hab
3838
replace hab : b + 1 ≤ a := by simpa using hab

0 commit comments

Comments
 (0)