Skip to content

Commit de0f1e8

Browse files
Parcly-Taxelurkud
andcommitted
chore(*): use gcongr (#24720)
Also add a few missing `gcongr` lemmas. Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
1 parent 7ed4f81 commit de0f1e8

File tree

19 files changed

+110
-134
lines changed

19 files changed

+110
-134
lines changed

β€ŽMathlib/Algebra/ContinuedFractions/Computation/Approximations.leanβ€Ž

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating
88
import Mathlib.Algebra.Order.Ring.Basic
99
import Mathlib.Data.Nat.Fib.Basic
1010
import Mathlib.Tactic.Monotonicity
11+
import Mathlib.Tactic.GCongr
1112

1213
/-!
1314
# Approximations for Continued Fraction Computations (`GenContFract.of`)
@@ -230,16 +231,14 @@ theorem fib_le_of_contsAux_b :
230231
-- use the IH to get the inequalities for `pconts` and `ppconts`
231232
have ppred_nth_fib_le_ppconts_B : (fib n : K) ≀ ppconts.b :=
232233
IH n (lt_trans (Nat.lt.base n) <| Nat.lt.base <| n + 1) (Or.inr not_terminatedAt_ppred_n)
233-
suffices (fib (n + 1) : K) ≀ gp.b * pconts.b by
234-
solve_by_elim [_root_.add_le_add ppred_nth_fib_le_ppconts_B]
234+
suffices (fib (n + 1) : K) ≀ gp.b * pconts.b by gcongr
235235
-- finally use the fact that `1 ≀ gp.b` to solve the goal
236236
suffices 1 * (fib (n + 1) : K) ≀ gp.b * pconts.b by rwa [one_mul] at this
237237
have one_le_gp_b : (1 : K) ≀ gp.b :=
238238
of_one_le_get?_partDen (partDen_eq_s_b s_ppred_nth_eq)
239-
have : (0 : K) ≀ fib (n + 1) := mod_cast (fib (n + 1)).zero_le
240-
have : (0 : K) ≀ gp.b := le_trans zero_le_one one_le_gp_b
241-
mono
242-
Β· norm_num
239+
gcongr
240+
apply IH
241+
Β· simp
243242
Β· tauto)
244243

245244
/-- Shows that the `n`th denominator is greater than or equal to the `n + 1`th fibonacci number,
@@ -465,13 +464,12 @@ theorem abs_sub_convs_le (not_terminatedAt_n : Β¬(of v).TerminatedAt n) :
465464
nextConts_b_ineq.trans_lt' <| mod_cast fib_pos.2 <| succ_pos _
466465
solve_by_elim [mul_pos]
467466
Β· -- we can cancel multiplication by `conts.b` and addition with `pred_conts.b`
468-
suffices gp.b * conts.b ≀ ifp_n.fr⁻¹ * conts.b from
469-
(mul_le_mul_left zero_lt_conts_b).2 <| (add_le_add_iff_left pred_conts.b).2 this
467+
suffices gp.b * conts.b ≀ ifp_n.fr⁻¹ * conts.b by
468+
simp only [den, den']; gcongr
470469
suffices (ifp_succ_n.b : K) * conts.b ≀ ifp_n.fr⁻¹ * conts.b by rwa [← ifp_succ_n_b_eq_gp_b]
471470
have : (ifp_succ_n.b : K) ≀ ifp_n.fr⁻¹ :=
472471
IntFractPair.succ_nth_stream_b_le_nth_stream_fr_inv stream_nth_eq succ_nth_stream_eq
473-
have : 0 ≀ conts.b := le_of_lt zero_lt_conts_b
474-
gcongr; exact this
472+
gcongr
475473

476474
/-- Shows that `|v - Aβ‚™ / Bβ‚™| ≀ 1 / (bβ‚™ * Bβ‚™ * Bβ‚™)`. This bound is worse than the one shown in
477475
`GenContFract.abs_sub_convs_le`, but sometimes it is easier to apply and
@@ -492,7 +490,8 @@ theorem abs_sub_convergents_le' {b : K}
492490
Β· have : 0 < b := zero_lt_one.trans_le (of_one_le_get?_partDen nth_partDen_eq)
493491
apply_rules [mul_pos]
494492
Β· conv_rhs => rw [mul_comm]
495-
exact mul_le_mul_of_nonneg_right (le_of_succ_get?_den nth_partDen_eq) hB.le
493+
gcongr
494+
exact le_of_succ_get?_den nth_partDen_eq
496495

497496
end ErrorTerm
498497

β€ŽMathlib/Algebra/Polynomial/FieldDivision.leanβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This file starts looking like the ring theory of $R[X]$
2121
noncomputable section
2222

2323
open Polynomial
24+
open scoped Nat
2425

2526
namespace Polynomial
2627

@@ -84,7 +85,7 @@ theorem lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors
8485
by_contra! h'
8586
replace hroot := hroot _ h'
8687
simp only [IsRoot, eval_iterate_derivative_rootMultiplicity] at hroot
87-
obtain ⟨q, hq⟩ := Nat.cast_dvd_cast (α := R) <| Nat.factorial_dvd_factorial h'
88+
obtain ⟨q, hq⟩ : ((rootMultiplicity t p)! : R) ∣ n ! := by gcongr
8889
rw [hq, mul_mem_nonZeroDivisors] at hnzd
8990
rw [nsmul_eq_mul, mul_left_mem_nonZeroDivisors_eq_zero_iff hnzd.1] at hroot
9091
exact eval_divByMonic_pow_rootMultiplicity_ne_zero t h hroot

β€ŽMathlib/Analysis/Asymptotics/ExpGrowth.leanβ€Ž

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ lemma expGrowthSup_monotone : Monotone expGrowthSup :=
7575
lemma expGrowthInf_le_expGrowthSup : expGrowthInf u ≀ expGrowthSup u := liminf_le_limsup
7676

7777
lemma expGrowthInf_le_expGrowthSup_of_frequently_le (h : βˆƒαΆ  n in atTop, u n ≀ v n) :
78-
expGrowthInf u ≀ expGrowthSup v := by
79-
refine (liminf_le_limsup_of_frequently_le) (h.mono fun n u_v ↦ ?_)
80-
exact div_le_div_right_of_nonneg n.cast_nonneg' (log_monotone u_v)
78+
expGrowthInf u ≀ expGrowthSup v :=
79+
liminf_le_limsup_of_frequently_le <| h.mono fun n u_v ↦ by gcongr
8180

8281
lemma expGrowthInf_le_iff :
8382
expGrowthInf u ≀ a ↔ βˆ€ b > a, βˆƒαΆ  n : β„• in atTop, u n ≀ exp (b * n) := by
@@ -130,22 +129,19 @@ lemma frequently_exp_le (h : a < expGrowthSup u) :
130129
lemma _root_.Frequently.expGrowthInf_le (h : βˆƒαΆ  n : β„• in atTop, u n ≀ exp (a * n)) :
131130
expGrowthInf u ≀ a := by
132131
apply expGrowthInf_le_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans ?_
133-
exact exp_monotone (mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg')
132+
gcongr
134133

135134
lemma _root_.Eventually.le_expGrowthInf (h : βˆ€αΆ  n : β„• in atTop, exp (a * n) ≀ u n) :
136-
a ≀ expGrowthInf u := by
137-
apply le_expGrowthInf_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' ?_
138-
exact exp_monotone (mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg')
135+
a ≀ expGrowthInf u :=
136+
le_expGrowthInf_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' <| by gcongr
139137

140138
lemma _root_.Eventually.expGrowthSup_le (h : βˆ€αΆ  n : β„• in atTop, u n ≀ exp (a * n)) :
141-
expGrowthSup u ≀ a:= by
142-
apply expGrowthSup_le_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans ?_
143-
exact exp_monotone (mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg')
139+
expGrowthSup u ≀ a :=
140+
expGrowthSup_le_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans <| by gcongr
144141

145142
lemma _root_.Frequently.le_expGrowthSup (h : βˆƒαΆ  n : β„• in atTop, exp (a * n) ≀ u n) :
146-
a ≀ expGrowthSup u := by
147-
apply le_expGrowthSup_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' ?_
148-
exact exp_monotone (mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg')
143+
a ≀ expGrowthSup u :=
144+
le_expGrowthSup_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' <| by gcongr
149145

150146
/-! ### Special cases -/
151147

β€ŽMathlib/Analysis/Asymptotics/LinearGrowth.leanβ€Ž

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -135,31 +135,27 @@ lemma frequently_mul_le (h : a < linearGrowthSup u) :
135135
le_linearGrowthSup_iff.1 (le_refl (linearGrowthSup u)) a h
136136

137137
lemma _root_.Frequently.linearGrowthInf_le (h : βˆƒαΆ  n : β„• in atTop, u n ≀ a * n) :
138-
linearGrowthInf u ≀ a := by
139-
apply linearGrowthInf_le_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans ?_
140-
exact mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg'
138+
linearGrowthInf u ≀ a :=
139+
linearGrowthInf_le_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans <| by gcongr
141140

142141
lemma _root_.Eventually.le_linearGrowthInf (h : βˆ€αΆ  n : β„• in atTop, a * n ≀ u n) :
143-
a ≀ linearGrowthInf u := by
144-
apply le_linearGrowthInf_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' ?_
145-
exact mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg'
142+
a ≀ linearGrowthInf u :=
143+
le_linearGrowthInf_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' <| by gcongr
146144

147145
lemma _root_.Eventually.linearGrowthSup_le (h : βˆ€αΆ  n : β„• in atTop, u n ≀ a * n) :
148-
linearGrowthSup u ≀ a:= by
149-
apply linearGrowthSup_le_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans ?_
150-
exact mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg'
146+
linearGrowthSup u ≀ a:=
147+
linearGrowthSup_le_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans <| by gcongr
151148

152149
lemma _root_.Frequently.le_linearGrowthSup (h : βˆƒαΆ  n : β„• in atTop, a * n ≀ u n) :
153-
a ≀ linearGrowthSup u := by
154-
apply le_linearGrowthSup_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' ?_
155-
exact mul_le_mul_of_nonneg_right c_u.le n.cast_nonneg'
150+
a ≀ linearGrowthSup u :=
151+
le_linearGrowthSup_iff.2 fun c c_u ↦ h.mono fun n hn ↦ hn.trans' <| by gcongr
156152

157153
/-! ### Special cases -/
158154

159155
lemma linearGrowthSup_bot : linearGrowthSup (βŠ₯ : β„• β†’ EReal) = (βŠ₯ : EReal) := by
160156
nth_rw 2 [← limsup_const (f := atTop (Ξ± := β„•)) βŠ₯]
161-
refine limsup_congr (eventually_atTop.2 ?_)
162-
exact ⟨1, fun n n_pos ↦ bot_div_of_pos_ne_top (Nat.cast_pos'.2 n_pos) (natCast_ne_top n)⟩
157+
refine limsup_congr <| (eventually_gt_atTop 0).mono fun n n_pos ↦ ?_
158+
exact bot_div_of_pos_ne_top (by positivity) (natCast_ne_top n)
163159

164160
lemma linearGrowthInf_bot : linearGrowthInf (βŠ₯ : β„• β†’ EReal) = (βŠ₯ : EReal) := by
165161
apply le_bot_iff.1
@@ -400,7 +396,7 @@ lemma le_linearGrowthInf_comp (hu : 0 ≀ᢠ[atTop] u) (hv : Tendsto v atTop atT
400396
with n b_uvn a_vn n_0
401397
replace a_vn := ((lt_div_iff (Nat.cast_pos'.2 n_0) (natCast_ne_top n)).1 a_vn).le
402398
rw [comp_apply, mul_comm a b, mul_assoc b a]
403-
exact b_uvn.trans' (mul_le_mul_of_nonneg_left a_vn b_0.le)
399+
exact b_uvn.trans' <| by gcongr
404400

405401
lemma linearGrowthSup_comp_le (hu : βˆƒαΆ  n in atTop, 0 ≀ u n)
406402
(hvβ‚€ : (linearGrowthSup fun n ↦ v n : EReal) β‰  0)
@@ -418,7 +414,7 @@ lemma linearGrowthSup_comp_le (hu : βˆƒαΆ  n in atTop, 0 ≀ u n)
418414
with n uvn_b vn_a n_0
419415
replace vn_a := ((div_lt_iff (Nat.cast_pos'.2 n_0) (natCast_ne_top n)).1 vn_a).le
420416
rw [comp_apply, mul_comm a b, mul_assoc b a]
421-
exact uvn_b.trans (mul_le_mul_of_nonneg_left vn_a b_0)
417+
exact uvn_b.trans <| by gcongr
422418

423419
/-! ### Monotone sequences -/
424420

@@ -490,12 +486,12 @@ lemma _root_.Monotone.linearGrowthInf_comp_le (h : Monotone u)
490486
refine ⟨k, ?_, fun vk_ak' ↦ ?_⟩
491487
Β· rw [mul_comm a, ← le_div_iff_mul_le a_0 a_top, EReal.div_eq_inv_mul] at aM_M'
492488
apply Nat.cast_le.1 <| aM_M'.trans <| an_k.trans' _
493-
exact mul_le_mul_of_nonneg_left (Nat.cast_le.2 n_M') (inv_nonneg_of_nonneg a_0.le)
489+
gcongr
494490
Β· rw [comp_apply, mul_comm a b, mul_assoc b a]
495491
rw [← EReal.div_eq_inv_mul, le_div_iff_mul_le a_0' (ne_top_of_lt a_a'), mul_comm] at k_an'
496492
rw [← EReal.div_eq_inv_mul, div_le_iff_le_mul a_0 a_top] at an_k
497493
have vk_n := Nat.cast_le.1 (vk_ak'.trans k_an')
498-
exact (h vk_n).trans <| un_bn.trans (mul_le_mul_of_nonneg_left an_k b_0.le)
494+
exact (h vk_n).trans <| un_bn.trans <| by gcongr
499495

500496
lemma _root_.Monotone.le_linearGrowthSup_comp (h : Monotone u)
501497
(hv : (linearGrowthInf fun n ↦ v n : EReal) β‰  0) :
@@ -531,12 +527,12 @@ lemma _root_.Monotone.le_linearGrowthSup_comp (h : Monotone u)
531527
refine ⟨k, ?_, fun ak_vk' ↦ ?_⟩
532528
Β· rw [mul_comm a', ← le_div_iff_mul_le a_0' a_top', EReal.div_eq_inv_mul] at aM_M'
533529
apply Nat.cast_le.1 <| aM_M'.trans <| an_k'.trans' _
534-
exact mul_le_mul_of_nonneg_left (Nat.cast_le.2 n_M') (inv_nonneg_of_nonneg a_0'.le)
530+
gcongr
535531
Β· rw [comp_apply, mul_comm a b, mul_assoc b a]
536532
rw [← EReal.div_eq_inv_mul, div_le_iff_le_mul a_0' a_top'] at an_k'
537533
rw [← EReal.div_eq_inv_mul, le_div_iff_mul_le a_0 (ne_top_of_lt a_a'), mul_comm] at k_an
538534
have n_vk := Nat.cast_le.1 (an_k'.trans ak_vk')
539-
exact (mul_le_mul_of_nonneg_left k_an b_0.le).trans <| bn_un.trans (h n_vk)
535+
exact le_trans (by gcongr) <| bn_un.trans (h n_vk)
540536

541537
lemma _root_.Monotone.linearGrowthInf_comp {a : EReal} (h : Monotone u)
542538
(hv : Tendsto (fun n ↦ (v n : EReal) / n) atTop (𝓝 a)) (ha : a β‰  0) (ha' : a β‰  ⊀) :

β€ŽMathlib/Analysis/BoxIntegral/Basic.leanβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ theorem norm_integral_le_of_norm_le {g : ℝⁿ β†’ ℝ} (hle : βˆ€ x ∈ Box.Ic
347347
refine norm_sum_le_of_le _ fun J _ => ?_
348348
simp only [BoxAdditiveMap.toSMul_apply, norm_smul, smul_eq_mul, Real.norm_eq_abs,
349349
ΞΌ.toBoxAdditive_apply, abs_of_nonneg measureReal_nonneg]
350-
exact mul_le_mul_of_nonneg_left (hle _ <| Ο€.tag_mem_Icc _) ENNReal.toReal_nonneg
350+
gcongr
351+
exact hle _ <| Ο€.tag_mem_Icc _
351352
Β· rw [integral, dif_neg hfi, norm_zero]
352353
exact integral_nonneg (fun x hx => (norm_nonneg _).trans (hle x hx)) ΞΌ
353354

@@ -681,7 +682,7 @@ theorem integrable_of_bounded_and_ae_continuousWithinAt [CompleteSpace E] {I : B
681682
intro J hJ
682683
rw [mem_sdiff, B.mem_filter, not_and] at hJ
683684
rw [norm_smul, ΞΌ.toBoxAdditive_apply, Real.norm_of_nonneg measureReal_nonneg]
684-
refine mul_le_mul_of_nonneg_left ?_ toReal_nonneg
685+
gcongr _ * ?_
685686
obtain ⟨x, xJ, xnU⟩ : βˆƒ x ∈ J, x βˆ‰ U := Set.not_subset.1 (hJ.2 hJ.1)
686687
have hx : x ∈ Box.Icc I \ U := ⟨Box.coe_subset_Icc ((le_of_mem' _ J hJ.1) xJ), xnU⟩
687688
have ineq : edist (f (t₁ J)) (f (tβ‚‚ J)) ≀ EMetric.diam (f '' (ball x r ∩ (Box.Icc I))) := by

β€ŽMathlib/Analysis/Convex/Integral.leanβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ theorem StrictConvexOn.ae_eq_const_or_map_average_lt [IsFiniteMeasure ΞΌ] (hg :
285285
g ((a β€’ ⨍ x in t, f x βˆ‚ΞΌ) + b β€’ ⨍ x in tᢜ, f x βˆ‚ΞΌ) <
286286
a * g (⨍ x in t, f x βˆ‚ΞΌ) + b * g (⨍ x in tᢜ, f x βˆ‚ΞΌ) :=
287287
hg.2 (this hβ‚€).1 (this hβ‚€').1 hne ha hb hab
288-
_ ≀ (a * ⨍ x in t, g (f x) βˆ‚ΞΌ) + b * ⨍ x in tᢜ, g (f x) βˆ‚ΞΌ :=
289-
add_le_add (mul_le_mul_of_nonneg_left (this hβ‚€).2 ha.le)
290-
(mul_le_mul_of_nonneg_left (this hβ‚€').2 hb.le)
288+
_ ≀ (a * ⨍ x in t, g (f x) βˆ‚ΞΌ) + b * ⨍ x in tᢜ, g (f x) βˆ‚ΞΌ := by
289+
gcongr
290+
exacts [(this hβ‚€).2, (this hβ‚€').2]
291291

292292
/-- **Jensen's inequality**, strict version: if an integrable function `f : Ξ± β†’ E` takes values in a
293293
convex closed set `s`, and `g : E β†’ ℝ` is continuous and strictly concave on `s`, then

β€ŽMathlib/Analysis/Distribution/SchwartzSpace.leanβ€Ž

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ theorem decay_add_le_aux (k n : β„•) (f g : 𝓒(E, F)) (x : E) :
170170
β€–xβ€– ^ k * β€–iteratedFDeriv ℝ n ((f : E β†’ F) + (g : E β†’ F)) xβ€– ≀
171171
β€–xβ€– ^ k * β€–iteratedFDeriv ℝ n f xβ€– + β€–xβ€– ^ k * β€–iteratedFDeriv ℝ n g xβ€– := by
172172
rw [← mul_add]
173-
refine mul_le_mul_of_nonneg_left ?_ (by positivity)
173+
gcongr _ * ?_
174174
rw [iteratedFDeriv_add_apply (f.smooth _).contDiffAt (g.smooth _).contDiffAt]
175175
exact norm_add_le _ _
176176

@@ -219,15 +219,13 @@ instance instSMul : SMul π•œ 𝓒(E, F) :=
219219
⟨fun c f =>
220220
{ toFun := c β€’ (f : E β†’ F)
221221
smooth' := (f.smooth _).const_smul c
222-
decay' := fun k n => by
223-
refine ⟨f.seminormAux k n * (β€–cβ€– + 1), fun x => ?_⟩
224-
have hc : 0 ≀ β€–cβ€– := by positivity
225-
refine le_trans ?_ ((mul_le_mul_of_nonneg_right (f.le_seminormAux k n x) hc).trans ?_)
226-
Β· apply Eq.le
222+
decay' k n := .intro (f.seminormAux k n * β€–cβ€–) fun x ↦ calc
223+
β€–xβ€– ^ k * β€–iteratedFDeriv ℝ n (c β€’ ⇑f) xβ€– = β€–xβ€– ^ k * β€–iteratedFDeriv ℝ n f xβ€– * β€–cβ€– := by
227224
rw [mul_comm _ β€–cβ€–, ← mul_assoc]
228225
exact decay_smul_aux k n f c x
229-
Β· apply mul_le_mul_of_nonneg_left _ (f.seminormAux_nonneg k n)
230-
linarith }⟩
226+
_ ≀ SchwartzMap.seminormAux k n f * β€–cβ€– := by
227+
gcongr
228+
apply f.le_seminormAux }⟩
231229

232230
@[simp]
233231
theorem smul_apply {f : 𝓒(E, F)} {c : π•œ} {x : E} : (c β€’ f) x = c β€’ f x :=
@@ -241,9 +239,8 @@ instance instSMulCommClass [SMulCommClass π•œ π•œ' F] : SMulCommClass π•œ
241239

242240
theorem seminormAux_smul_le (k n : β„•) (c : π•œ) (f : 𝓒(E, F)) :
243241
(c β€’ f).seminormAux k n ≀ β€–cβ€– * f.seminormAux k n := by
244-
refine
245-
(c β€’ f).seminormAux_le_bound k n (mul_nonneg (norm_nonneg _) (seminormAux_nonneg _ _ _))
246-
fun x => (decay_smul_aux k n f c x).le.trans ?_
242+
refine (c β€’ f).seminormAux_le_bound k n (mul_nonneg (norm_nonneg _) (seminormAux_nonneg _ _ _))
243+
fun x => (decay_smul_aux k n f c x).trans_le ?_
247244
rw [mul_assoc]
248245
exact mul_le_mul_of_nonneg_left (f.le_seminormAux k n x) (norm_nonneg _)
249246

@@ -686,7 +683,7 @@ theorem _root_.MeasureTheory.Measure.HasTemperateGrowth.exists_eLpNorm_lt_top (p
686683
simp only [ENNReal.coe_toReal]
687684
refine Eq.subst (motive := (∫⁻ x, Β· x βˆ‚ΞΌ < ⊀)) (funext fun x ↦ ?_) this
688685
rw [← neg_mul, Real.rpow_mul (h_one_add x).le]
689-
exact Real.enorm_rpow_of_nonneg (Real.rpow_nonneg (h_one_add x).le _) NNReal.zero_le_coe
686+
exact Real.enorm_rpow_of_nonneg (by positivity) NNReal.zero_le_coe
690687
refine hl.hasFiniteIntegral.mono' (ae_of_all ΞΌ fun x ↦ ?_)
691688
rw [Real.norm_of_nonneg (Real.rpow_nonneg (h_one_add x).le _)]
692689
gcongr

β€ŽMathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.leanβ€Ž

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,16 @@ induced by `PiTensorProduct.lift`, for every normed space `F`.
239239
-/
240240
@[simps]
241241
noncomputable def liftEquiv : ContinuousMultilinearMap π•œ E F ≃ₗ[π•œ] (⨂[π•œ] i, E i) β†’L[π•œ] F where
242-
toFun f := LinearMap.mkContinuous (lift f.toMultilinearMap) β€–fβ€–
243-
(fun x ↦ norm_eval_le_injectiveSeminorm f x)
242+
toFun f := LinearMap.mkContinuous (lift f.toMultilinearMap) β€–fβ€– fun x ↦
243+
norm_eval_le_injectiveSeminorm f x
244244
map_add' f g := by ext _; simp only [ContinuousMultilinearMap.toMultilinearMap_add, map_add,
245245
LinearMap.mkContinuous_apply, LinearMap.add_apply, ContinuousLinearMap.add_apply]
246246
map_smul' a f := by ext _; simp only [ContinuousMultilinearMap.toMultilinearMap_smul, map_smul,
247247
LinearMap.mkContinuous_apply, LinearMap.smul_apply, RingHom.id_apply,
248248
ContinuousLinearMap.coe_smul', Pi.smul_apply]
249-
invFun l := MultilinearMap.mkContinuous (lift.symm l.toLinearMap) β€–lβ€– (fun x ↦ by
249+
invFun l := MultilinearMap.mkContinuous (lift.symm l.toLinearMap) β€–lβ€– fun x ↦ by
250250
simp only [lift_symm, LinearMap.compMultilinearMap_apply, ContinuousLinearMap.coe_coe]
251-
refine le_trans (ContinuousLinearMap.le_opNorm _ _) (mul_le_mul_of_nonneg_left ?_
252-
(norm_nonneg l))
253-
exact injectiveSeminorm_tprod_le x)
251+
exact ContinuousLinearMap.le_opNorm_of_le _ (injectiveSeminorm_tprod_le x)
254252
left_inv f := by ext x; simp only [LinearMap.mkContinuous_coe, LinearEquiv.symm_apply_apply,
255253
MultilinearMap.coe_mkContinuous, ContinuousMultilinearMap.coe_coe]
256254
right_inv l := by

β€ŽMathlib/Analysis/ODE/PicardLindelof.leanβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ protected theorem mem_closedBall (t : Icc v.tMin v.tMax) : f t ∈ closedBall v.
199199
calc
200200
dist (f t) v.xβ‚€ = dist (f t) (f.toFun v.tβ‚€) := by rw [f.map_tβ‚€']
201201
_ ≀ v.C * dist t v.tβ‚€ := f.lipschitz.dist_le_mul _ _
202-
_ ≀ v.C * v.tDist := mul_le_mul_of_nonneg_left (v.dist_tβ‚€_le _) v.C.2
202+
_ ≀ v.C * v.tDist := by gcongr; apply v.dist_tβ‚€_le
203203
_ ≀ v.R := v.isPicardLindelof.C_mul_le_R
204204

205205
/-- Given a curve $Ξ³ \colon [t_{\min}, t_{\max}] β†’ E$, `PicardLindelof.vComp` is the function

0 commit comments

Comments
Β (0)