@@ -90,8 +90,7 @@ lemma tilted_congr {g : α → ℝ} (hfg : f =ᵐ[μ] g) :
9090
9191lemma tilted_eq_withDensity_nnreal (μ : Measure α) (f : α → ℝ) :
9292 μ.tilted f = μ.withDensity (fun x ↦ ((↑) : ℝ≥0 → ℝ≥0 ∞)
93- (⟨exp (f x) / ∫ x, exp (f x) ∂μ,
94- div_nonneg (exp_pos _).le (integral_nonneg (fun _ ↦ (exp_pos _).le))⟩ : ℝ≥0 )) := by
93+ (⟨exp (f x) / ∫ x, exp (f x) ∂μ, by positivity⟩ : ℝ≥0 )) := by
9594 rw [Measure.tilted]
9695 congr with x
9796 rw [ENNReal.ofReal_eq_coe_nnreal]
@@ -109,8 +108,7 @@ lemma tilted_apply_eq_ofReal_integral' {s : Set α} (f : α → ℝ) (hs : Measu
109108 by_cases hf : Integrable (fun x ↦ exp (f x)) μ
110109 · rw [tilted_apply' _ _ hs, ← ofReal_integral_eq_lintegral_ofReal]
111110 · exact hf.integrableOn.div_const _
112- · exact ae_of_all _
113- (fun _ ↦ div_nonneg (exp_pos _).le (integral_nonneg (fun _ ↦ (exp_pos _).le)))
111+ · exact ae_of_all _ (fun _ ↦ by positivity)
114112 · simp only [hf, not_false_eq_true, tilted_of_not_integrable, Measure.zero_toOuterMeasure,
115113 OuterMeasure.coe_zero, Pi.zero_apply, integral_undef hf, div_zero, integral_zero,
116114 ENNReal.ofReal_zero]
@@ -120,8 +118,7 @@ lemma tilted_apply_eq_ofReal_integral [SFinite μ] (f : α → ℝ) (s : Set α)
120118 by_cases hf : Integrable (fun x ↦ exp (f x)) μ
121119 · rw [tilted_apply _ _, ← ofReal_integral_eq_lintegral_ofReal]
122120 · exact hf.integrableOn.div_const _
123- · exact ae_of_all _
124- (fun _ ↦ div_nonneg (exp_pos _).le (integral_nonneg (fun _ ↦ (exp_pos _).le)))
121+ · exact ae_of_all _ (fun _ ↦ by positivity)
125122 · simp only [hf, not_false_eq_true, tilted_of_not_integrable, Measure.zero_toOuterMeasure,
126123 OuterMeasure.coe_zero, Pi.zero_apply, integral_undef hf, div_zero, integral_zero,
127124 ENNReal.ofReal_zero]
@@ -257,7 +254,7 @@ lemma tilted_tilted (hf : Integrable (fun x ↦ exp (f x)) μ) (g : α → ℝ)
257254 ext1 s hs
258255 rw [tilted_apply' _ _ hs, tilted_apply' _ _ hs, set_lintegral_tilted' f _ hs]
259256 congr with x
260- rw [← ENNReal.ofReal_mul (div_nonneg (exp_pos _).le (integral_nonneg ( fun _ ↦ (exp_pos _).le)) ),
257+ rw [← ENNReal.ofReal_mul (by positivity ),
261258 integral_exp_tilted f, Pi.add_apply, exp_add]
262259 congr 1
263260 simp only [Pi.add_apply]
@@ -321,7 +318,7 @@ lemma toReal_rnDeriv_tilted_right (μ ν : Measure α) [SigmaFinite μ] [SigmaFi
321318 filter_upwards [rnDeriv_tilted_right μ ν hf] with x hx
322319 rw [hx]
323320 simp only [ENNReal.toReal_mul, gt_iff_lt, mul_eq_mul_right_iff, ENNReal.toReal_ofReal_eq_iff]
324- exact Or.inl (mul_nonneg (exp_pos _).le (integral_nonneg ( fun _ ↦ (exp_pos _).le)) )
321+ exact Or.inl (by positivity )
325322
326323lemma rnDeriv_tilted_left {ν : Measure α} [SigmaFinite μ] [SigmaFinite ν]
327324 (hfμ : AEMeasurable f μ) (hfν : AEMeasurable f ν) :
@@ -340,9 +337,7 @@ lemma toReal_rnDeriv_tilted_left {ν : Measure α} [SigmaFinite μ] [SigmaFinite
340337 filter_upwards [rnDeriv_tilted_left hfμ hfν] with x hx
341338 rw [hx]
342339 simp only [ENNReal.toReal_mul, mul_eq_mul_right_iff, ENNReal.toReal_ofReal_eq_iff]
343- refine Or.inl (mul_nonneg (exp_pos _).le ?_)
344- rw [inv_nonneg]
345- exact (integral_nonneg (fun _ ↦ (exp_pos _).le))
340+ exact Or.inl (by positivity)
346341
347342lemma rnDeriv_tilted_left_self [SigmaFinite μ] (hf : AEMeasurable f μ) :
348343 (μ.tilted f).rnDeriv μ =ᵐ[μ] fun x ↦ ENNReal.ofReal (exp (f x) / ∫ x, exp (f x) ∂μ) := by
@@ -358,8 +353,7 @@ lemma log_rnDeriv_tilted_left_self [SigmaFinite μ] (hf : Integrable (fun x ↦
358353 | inr h0 =>
359354 have hf' : AEMeasurable f μ := aemeasurable_of_aemeasurable_exp hf.1 .aemeasurable
360355 filter_upwards [rnDeriv_tilted_left_self hf'] with x hx
361- rw [hx, ENNReal.toReal_ofReal, log_div (exp_pos _).ne', log_exp]
362- · exact (integral_exp_pos hf).ne'
363- · exact div_nonneg (exp_pos _).le (integral_nonneg (fun _ ↦ (exp_pos _).le))
356+ rw [hx, ENNReal.toReal_ofReal (by positivity), log_div (exp_pos _).ne', log_exp]
357+ exact (integral_exp_pos hf).ne'
364358
365359end MeasureTheory
0 commit comments