@@ -1148,58 +1148,98 @@ begin
1148
1148
{ rw [integral_symm, neg_eq_zero, integral_eq_zero_iff_of_le_of_nonneg_ae hab hf hfi.symm] }
1149
1149
end
1150
1150
1151
+ /-- If `f` is nonnegative and integrable on the unordered interval `set.interval_oc a b`, then its
1152
+ integral over `a..b` is positive if and only if `a < b` and the measure of
1153
+ `function.support f ∩ set.Ioc a b` is positive. -/
1151
1154
lemma integral_pos_iff_support_of_nonneg_ae'
1152
- (hf : 0 ≤ᵐ[μ.restrict (Ioc a b ∪ Ioc b a )] f) (hfi : interval_integrable f μ a b) :
1155
+ (hf : 0 ≤ᵐ[μ.restrict (Ι a b)] f) (hfi : interval_integrable f μ a b) :
1153
1156
0 < ∫ x in a..b, f x ∂μ ↔ a < b ∧ 0 < μ (support f ∩ Ioc a b) :=
1154
1157
begin
1155
- obtain hab | hab := le_total b a;
1156
- simp only [Ioc_eq_empty hab.not_lt, empty_union, union_empty] at hf ⊢,
1157
- { rw [←not_iff_not, not_and_distrib, not_lt, not_lt, integral_of_ge hab, neg_nonpos],
1158
- exact iff_of_true (integral_nonneg_of_ae hf) (or.intro_left _ hab) },
1159
- rw [integral_of_le hab, set_integral_pos_iff_support_of_nonneg_ae hf hfi.1 , iff.comm,
1160
- and_iff_right_iff_imp],
1161
- contrapose!,
1162
- intro h,
1163
- rw [Ioc_eq_empty h.not_lt, inter_empty, measure_empty],
1164
- exact le_refl 0 ,
1158
+ cases lt_or_le a b with hab hba,
1159
+ { rw interval_oc_of_le hab.le at hf,
1160
+ simp only [hab, true_and, integral_of_le hab.le,
1161
+ set_integral_pos_iff_support_of_nonneg_ae hf hfi.1 ] },
1162
+ { suffices : ∫ x in a..b, f x ∂μ ≤ 0 , by simp only [this.not_lt, hba.not_lt, false_and],
1163
+ rw [integral_of_ge hba, neg_nonpos],
1164
+ rw [interval_oc_swap, interval_oc_of_le hba] at hf,
1165
+ exact integral_nonneg_of_ae hf }
1165
1166
end
1166
1167
1167
- lemma integral_pos_iff_support_of_nonneg_ae
1168
- (hf : 0 ≤ᵐ[μ] f) (hfi : interval_integrable f μ a b) :
1168
+ /-- If `f` is nonnegative a.e.-everywhere and it is integrable on the unordered interval
1169
+ `set.interval_oc a b`, then its integral over `a..b` is positive if and only if `a < b` and the
1170
+ measure of `function.support f ∩ set.Ioc a b` is positive. -/
1171
+ lemma integral_pos_iff_support_of_nonneg_ae (hf : 0 ≤ᵐ[μ] f) (hfi : interval_integrable f μ a b) :
1169
1172
0 < ∫ x in a..b, f x ∂μ ↔ a < b ∧ 0 < μ (support f ∩ Ioc a b) :=
1170
1173
integral_pos_iff_support_of_nonneg_ae' (ae_mono measure.restrict_le_self hf) hfi
1171
1174
1172
- variable (hab : a ≤ b)
1175
+ /-- If `f` and `g` are two functions that are interval integrable on `a..b`, `a ≤ b`,
1176
+ `f x ≤ g x` for a.e. `x ∈ set.Ioc a b`, and `f x < g x` on a subset of `set.Ioc a b`
1177
+ of nonzero measure, then `∫ x in a..b, f x ∂μ < ∫ x in a..b, g x ∂μ`. -/
1178
+ lemma integral_lt_integral_of_ae_le_of_measure_set_of_lt_ne_zero (hab : a ≤ b)
1179
+ (hfi : interval_integrable f μ a b) (hgi : interval_integrable g μ a b)
1180
+ (hle : f ≤ᵐ[μ.restrict (Ioc a b)] g) (hlt : μ.restrict (Ioc a b) {x | f x < g x} ≠ 0 ) :
1181
+ ∫ x in a..b, f x ∂μ < ∫ x in a..b, g x ∂μ :=
1182
+ begin
1183
+ rw [← sub_pos, ← integral_sub hgi hfi, integral_of_le hab,
1184
+ measure_theory.integral_pos_iff_support_of_nonneg_ae],
1185
+ { refine pos_iff_ne_zero.2 (mt (measure_mono_null _) hlt),
1186
+ exact λ x hx, (sub_pos.2 hx).ne' },
1187
+ exacts [hle.mono (λ x, sub_nonneg.2 ), hgi.1 .sub hfi.1 ]
1188
+ end
1173
1189
1174
- include hab
1190
+ /-- If `f` and `g` are continuous on `[a, b]`, `a < b`, `f x ≤ g x` on this interval, and
1191
+ `f c < g c` at some point `c ∈ [a, b]`, then `∫ x in a..b, f x < ∫ x in a..b, g x`. -/
1192
+ lemma integral_lt_integral_of_continuous_on_of_le_of_exists_lt {f g : ℝ → ℝ} {a b : ℝ}
1193
+ (hab : a < b) (hfc : continuous_on f (Icc a b)) (hgc : continuous_on g (Icc a b))
1194
+ (hle : ∀ x ∈ Icc a b, f x ≤ g x) (hlt : ∃ c ∈ Icc a b, f c < g c) :
1195
+ ∫ x in a..b, f x < ∫ x in a..b, g x :=
1196
+ begin
1197
+ refine integral_lt_integral_of_ae_le_of_measure_set_of_lt_ne_zero hab.le
1198
+ (hfc.interval_integrable_of_Icc hab.le) (hgc.interval_integrable_of_Icc hab.le)
1199
+ ((ae_restrict_mem measurable_set_Ioc).mono $ λ x hx, hle x (Ioc_subset_Icc_self hx)) _,
1200
+ simp only [measure.restrict_apply' measurable_set_Ioc],
1201
+ rcases hlt with ⟨c, ⟨hac, hcb⟩, hlt⟩,
1202
+ have : ∀ᶠ x in 𝓝[Icc a b] c, f x < g x,
1203
+ from ((hfc c ⟨hac, hcb⟩).prod (hgc c ⟨hac, hcb⟩)).eventually (is_open_lt_prod.mem_nhds hlt),
1204
+ rcases (eventually_nhds_within_iff.1 this ).exists_Ioo_subset with ⟨l, u, ⟨hlc, hcu⟩, hsub⟩,
1205
+ have A : Ioo (max a l) (min b u) ⊆ Ioc a b,
1206
+ from Ioo_subset_Ioc_self.trans (Ioc_subset_Ioc (le_max_left _ _) (min_le_left _ _)),
1207
+ have B : Ioo (max a l) (min b u) ⊆ Ioo l u,
1208
+ from Ioo_subset_Ioo (le_max_right _ _) (min_le_right _ _),
1209
+ refine ne_of_gt _,
1210
+ calc (0 : ℝ≥0 ∞) < volume (Ioo (max a l) (min b u)) :
1211
+ by simp [hab, hlc.trans_le hcb, hac.trans_lt hcu, hlc.trans hcu]
1212
+ ... ≤ volume ({x | f x < g x} ∩ Ioc a b) :
1213
+ measure_mono (λ x hx, ⟨hsub (B hx) (Ioc_subset_Icc_self $ A hx), A hx⟩)
1214
+ end
1175
1215
1176
- lemma integral_nonneg_of_ae_restrict (hf : 0 ≤ᵐ[μ.restrict (Icc a b)] f) :
1216
+ lemma integral_nonneg_of_ae_restrict (hab : a ≤ b) ( hf : 0 ≤ᵐ[μ.restrict (Icc a b)] f) :
1177
1217
0 ≤ (∫ u in a..b, f u ∂μ) :=
1178
1218
let H := ae_restrict_of_ae_restrict_of_subset Ioc_subset_Icc_self hf in
1179
1219
by simpa only [integral_of_le hab] using set_integral_nonneg_of_ae_restrict H
1180
1220
1181
- lemma integral_nonneg_of_ae (hf : 0 ≤ᵐ[μ] f) :
1221
+ lemma integral_nonneg_of_ae (hab : a ≤ b) ( hf : 0 ≤ᵐ[μ] f) :
1182
1222
0 ≤ (∫ u in a..b, f u ∂μ) :=
1183
1223
integral_nonneg_of_ae_restrict hab $ ae_restrict_of_ae hf
1184
1224
1185
- lemma integral_nonneg_of_forall (hf : ∀ u, 0 ≤ f u) :
1225
+ lemma integral_nonneg_of_forall (hab : a ≤ b) ( hf : ∀ u, 0 ≤ f u) :
1186
1226
0 ≤ (∫ u in a..b, f u ∂μ) :=
1187
1227
integral_nonneg_of_ae hab $ eventually_of_forall hf
1188
1228
1189
1229
lemma integral_nonneg [topological_space α] [opens_measurable_space α] [order_closed_topology α]
1190
- (hf : ∀ u, u ∈ Icc a b → 0 ≤ f u) :
1230
+ (hab : a ≤ b) ( hf : ∀ u, u ∈ Icc a b → 0 ≤ f u) :
1191
1231
0 ≤ (∫ u in a..b, f u ∂μ) :=
1192
1232
integral_nonneg_of_ae_restrict hab $ (ae_restrict_iff' measurable_set_Icc).mpr $ ae_of_all μ hf
1193
1233
1194
- lemma abs_integral_le_integral_abs :
1234
+ lemma abs_integral_le_integral_abs (hab : a ≤ b) :
1195
1235
|∫ x in a..b, f x ∂μ| ≤ ∫ x in a..b, |f x| ∂μ :=
1196
1236
by simpa only [← real.norm_eq_abs] using norm_integral_le_integral_norm hab
1197
1237
1198
1238
section mono
1199
1239
1200
- variables (hf : interval_integrable f μ a b) (hg : interval_integrable g μ a b)
1240
+ variables (hab : a ≤ b) ( hf : interval_integrable f μ a b) (hg : interval_integrable g μ a b)
1201
1241
1202
- include hf hg
1242
+ include hab hf hg
1203
1243
1204
1244
lemma integral_mono_ae_restrict (h : f ≤ᵐ[μ.restrict (Icc a b)] g) :
1205
1245
∫ u in a..b, f u ∂μ ≤ ∫ u in a..b, g u ∂μ :=
0 commit comments