Theorems / mh_prob_1ffcf9
Mathlib held-out
Probability · hard
theorem lg_target {E : Type u_1} [NormedAddCommGroup E] {mE : MeasurableSpace E} {μ : MeasureTheory.Measure E} [NormedSpace ℝ E] {p : ENNReal} (h_Lp : MeasureTheory.MemLp (fun x => x - ∫ (y : E), y ∂μ) p μ) : MeasureTheory.MemLp id p μ := by- Mathlib declaration
- MeasureTheory.memLp_id_of_self_sub_integral
- Held-out module
- Mathlib.Probability.Moments.CovarianceBilinDual
- Banned modules (itself + downstream)
- 9
- Reference proof premises (reachable / held-out)
- 125 / 0
Traces
Each configuration's full record: what was retrieved, what the model wrote, what Lean said back.
No configuration has attempted this theorem yet.
Reference proof
Mathlib's own source for this declaration, shown for comparison. It may use lemmas the prover is not allowed to use.
lemma _root_.MeasureTheory.memLp_id_of_self_sub_integral {p : ℝ≥0∞}
(h_Lp : MemLp (fun x ↦ x - ∫ y, y ∂μ) p μ) : MemLp id p μ := by
have : (id : E → E) = fun x ↦ x - ∫ x, x ∂μ + ∫ x, x ∂μ := by ext; simp
rw [this]
apply h_Lp.add
set c := ∫ x, x ∂μ
/- We need to check that the constant `c = ∫ x, x ∂μ` is in `L^p`. Note that we don't assume
that `μ` is finite, so this requires an argument. If the constant is zero, it's obvious.
If it's nonzero, this means that `x` is integrable for `μ` (as otherwise the integral would be
`0` by our choice of junk value), so `‖x‖ ^ (1/p)` is in `L^p`.
The constant `c` is controlled by `2 ‖x - c‖` close to `0` (say when `‖x‖ ≤ ‖c‖ / 2`)
and by a multiple of `‖x‖ ^ (1/p)` away from `0`. Those two functions
are in `L^p` by assumptions, so the constant `c` also is. -/
by_cases hx : c = 0
· simp [hx]
rcases eq_or_ne p 0 with rfl | hp0
· simp [aestronglyMeasurable_const]
rcases eq_or_ne p ∞ with rfl | hptop
· exact memLp_top_const c
apply (integrable_norm_rpow_iff (by fun_prop) hp0 hptop).1
have I : Integrable (fun (x : E) ↦ ‖x‖) μ := by
apply Integrable.norm
contrapose hx
exact integral_undef hx
have := (h_Lp.integrable_norm_rpow hp0 hptop).const_mul (2 ^ p.toReal)
apply (((I.const_mul (2 * ‖c‖ ^ (p.toReal - 1))).add this)).mono' (by fun_prop)
filter_upwards [] with y
lift p to ℝ≥0 using hptop
simp only [ENNReal.coe_toReal, Real.norm_eq_abs, Pi.add_apply]
rw [abs_of_nonneg (by positivity)]
rcases le_total ‖y‖ (‖c‖ / 2)
· have : ‖c‖ ≤ ‖y‖ + ‖y - c‖ := Eq.trans_le (by abel_nf) (norm_sub_le y (y - c))
calc ‖c‖ ^ (p : ℝ)
_ ≤ (2 * ‖y - c‖) ^ (p : ℝ) := by
gcongr
linarith
_ = 0 + 2 ^ (p : ℝ) * ‖y - c‖ ^ (p : ℝ) := by
rw [Real.mul_rpow (by simp) (by positivity)]
ring
_ ≤ 2 * ‖c‖ ^ (p - 1 : ℝ) * ‖y‖ + 2 ^ (p : ℝ) * ‖y - c‖ ^ (p : ℝ) := by
gcongr
positivity
· calc ‖c‖ ^ (p : ℝ)
_ = ‖c‖ ^ ((p - 1) + 1 : ℝ) := by abel_nf
_ = ‖c‖ ^ (p - 1 : ℝ) * ‖c‖ := by rw [Real.rpow_add (by positivity), Real.rpow_one]
_ ≤ ‖c‖ ^ (p - 1 : ℝ) * (2 * ‖y‖) := by gcongr; linarith
_ = 2 * ‖c‖ ^ (p - 1 : ℝ) * ‖y‖ + 0 := by ring
_ ≤ 2 * ‖c‖ ^ (p - 1 : ℝ) * ‖y‖ + 2 ^ (p : ℝ) * ‖y - c‖ ^ (p : ℝ) := by gcongr; positivity