Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 1442f70

Browse files
feat(measure_theory/interval_integral): variants of integral_comp lemmas (#7103)
Alternate versions of some of our `integral_comp` lemmas which work even when `c = 0`.
1 parent fc8e18c commit 1442f70

File tree

1 file changed

+56
-12
lines changed

1 file changed

+56
-12
lines changed

src/measure_theory/interval_integral.lean

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ end basic
374374

375375
section comp
376376

377-
variables {a b c : ℝ} (f : ℝ → E)
377+
variables {a b c d : ℝ} (f : ℝ → E)
378378

379379
@[simp] lemma integral_comp_mul_right (hc : c ≠ 0) :
380380
∫ x in a..b, f (x * c) = c⁻¹ • ∫ x in a*c..b*c, f x :=
@@ -389,63 +389,107 @@ begin
389389
{ simp [(show 0 < c, from h), mul_div_cancel, hc, abs_of_pos] }
390390
end
391391

392+
@[simp] lemma integral_comp_mul_right' (c) :
393+
c • ∫ x in a..b, f (x * c) = ∫ x in a*c..b*c, f x :=
394+
by by_cases hc : c = 0; simp [hc]
395+
392396
@[simp] lemma integral_comp_mul_left (hc : c ≠ 0) :
393397
∫ x in a..b, f (c * x) = c⁻¹ • ∫ x in c*a..c*b, f x :=
394398
by simpa only [mul_comm c] using integral_comp_mul_right f hc
395399

400+
@[simp] lemma integral_comp_mul_left' (c) :
401+
c • ∫ x in a..b, f (c * x) = ∫ x in c*a..c*b, f x :=
402+
by by_cases hc : c = 0; simp [hc]
403+
396404
@[simp] lemma integral_comp_div (hc : c ≠ 0) :
397405
∫ x in a..b, f (x / c) = c • ∫ x in a/c..b/c, f x :=
398406
by simpa only [inv_inv'] using integral_comp_mul_right f (inv_ne_zero hc)
399407

400-
@[simp] lemma integral_comp_add_right (d : ℝ) :
408+
@[simp] lemma integral_comp_div' (c) :
409+
c⁻¹ • ∫ x in a..b, f (x / c) = ∫ x in a/c..b/c, f x :=
410+
by by_cases hc : c = 0; simp [hc]
411+
412+
@[simp] lemma integral_comp_add_right (d) :
401413
∫ x in a..b, f (x + d) = ∫ x in a+d..b+d, f x :=
402414
have A : closed_embedding (λ x, x + d) := (homeomorph.add_right d).closed_embedding,
403415
calc ∫ x in a..b, f (x + d)
404416
= ∫ x in a+d..b+d, f x ∂(measure.map (λ x, x + d) volume)
405417
: by simp [interval_integral, set_integral_map_of_closed_embedding _ A]
406418
... = ∫ x in a+d..b+d, f x : by rw [real.map_volume_add_right]
407419

408-
@[simp] lemma integral_comp_mul_add (hc : c ≠ 0) (d : ℝ) :
420+
@[simp] lemma integral_comp_mul_add (hc : c ≠ 0) (d) :
409421
∫ x in a..b, f (c * x + d) = c⁻¹ • ∫ x in c*a+d..c*b+d, f x :=
410422
by rw [← integral_comp_add_right f d, ← integral_comp_mul_left _ hc]
411423

412-
@[simp] lemma integral_comp_add_mul (hc : c ≠ 0) (d : ℝ) :
424+
@[simp] lemma integral_comp_mul_add' (c d) :
425+
c • ∫ x in a..b, f (c * x + d) = ∫ x in c*a+d..c*b+d, f x :=
426+
by by_cases hc : c = 0; simp [hc]
427+
428+
@[simp] lemma integral_comp_add_mul (hc : c ≠ 0) (d) :
413429
∫ x in a..b, f (d + c * x) = c⁻¹ • ∫ x in d+c*a..d+c*b, f x :=
414430
by simpa only [add_comm] using integral_comp_mul_add f hc d
415431

416-
@[simp] lemma integral_comp_div_add (hc : c ≠ 0) (d : ℝ) :
432+
@[simp] lemma integral_comp_add_mul' (c d) :
433+
c • ∫ x in a..b, f (d + c * x) = ∫ x in d+c*a..d+c*b, f x :=
434+
by by_cases hc : c = 0; simp [hc]
435+
436+
@[simp] lemma integral_comp_div_add (hc : c ≠ 0) (d) :
417437
∫ x in a..b, f (x / c + d) = c • ∫ x in a/c+d..b/c+d, f x :=
418438
by simpa only [div_eq_inv_mul, inv_inv'] using integral_comp_mul_add f (inv_ne_zero hc) d
419439

420-
@[simp] lemma integral_comp_add_div (hc : c ≠ 0) (d : ℝ) :
440+
@[simp] lemma integral_comp_div_add' (c d) :
441+
c⁻¹ • ∫ x in a..b, f (x / c + d) = ∫ x in a/c+d..b/c+d, f x :=
442+
by by_cases hc : c = 0; simp [hc]
443+
444+
@[simp] lemma integral_comp_add_div (hc : c ≠ 0) (d) :
421445
∫ x in a..b, f (d + x / c) = c • ∫ x in d+a/c..d+b/c, f x :=
422446
by simpa only [div_eq_inv_mul, inv_inv'] using integral_comp_add_mul f (inv_ne_zero hc) d
423447

424-
@[simp] lemma integral_comp_mul_sub (hc : c ≠ 0) (d : ℝ) :
448+
@[simp] lemma integral_comp_add_div' (c d) :
449+
c⁻¹ • ∫ x in a..b, f (d + x / c) = ∫ x in d+a/c..d+b/c, f x :=
450+
by by_cases hc : c = 0; simp [hc]
451+
452+
@[simp] lemma integral_comp_mul_sub (hc : c ≠ 0) (d) :
425453
∫ x in a..b, f (c * x - d) = c⁻¹ • ∫ x in c*a-d..c*b-d, f x :=
426454
by simpa only [sub_eq_add_neg] using integral_comp_mul_add f hc (-d)
427455

428-
@[simp] lemma integral_comp_sub_mul (hc : c ≠ 0) (d : ℝ) :
456+
@[simp] lemma integral_comp_mul_sub' (c d) :
457+
c • ∫ x in a..b, f (c * x - d) = ∫ x in c*a-d..c*b-d, f x :=
458+
by by_cases hc : c = 0; simp [hc]
459+
460+
@[simp] lemma integral_comp_sub_mul (hc : c ≠ 0) (d) :
429461
∫ x in a..b, f (d - c * x) = c⁻¹ • ∫ x in d-c*b..d-c*a, f x :=
430462
begin
431463
simp only [sub_eq_add_neg, neg_mul_eq_neg_mul],
432464
rw [integral_comp_add_mul f (neg_ne_zero.mpr hc) d, integral_symm],
433465
simp only [inv_neg, smul_neg, neg_neg, neg_smul],
434466
end
435467

436-
@[simp] lemma integral_comp_div_sub (hc : c ≠ 0) (d : ℝ) :
468+
@[simp] lemma integral_comp_sub_mul' (c d) :
469+
c • ∫ x in a..b, f (d - c * x) = ∫ x in d-c*b..d-c*a, f x :=
470+
by by_cases hc : c = 0; simp [hc]
471+
472+
@[simp] lemma integral_comp_div_sub (hc : c ≠ 0) (d) :
437473
∫ x in a..b, f (x / c - d) = c • ∫ x in a/c-d..b/c-d, f x :=
438474
by simpa only [div_eq_inv_mul, inv_inv'] using integral_comp_mul_sub f (inv_ne_zero hc) d
439475

440-
@[simp] lemma integral_comp_sub_div (hc : c ≠ 0) (d : ℝ) :
476+
@[simp] lemma integral_comp_div_sub' (c d) :
477+
c⁻¹ • ∫ x in a..b, f (x / c - d) = ∫ x in a/c-d..b/c-d, f x :=
478+
by by_cases hc : c = 0; simp [hc]
479+
480+
@[simp] lemma integral_comp_sub_div (hc : c ≠ 0) (d) :
441481
∫ x in a..b, f (d - x / c) = c • ∫ x in d-b/c..d-a/c, f x :=
442482
by simpa only [div_eq_inv_mul, inv_inv'] using integral_comp_sub_mul f (inv_ne_zero hc) d
443483

444-
@[simp] lemma integral_comp_sub_right (d : ℝ) :
484+
@[simp] lemma integral_comp_sub_div' (c d) :
485+
c⁻¹ • ∫ x in a..b, f (d - x / c) = ∫ x in d-b/c..d-a/c, f x :=
486+
by by_cases hc : c = 0; simp [hc]
487+
488+
@[simp] lemma integral_comp_sub_right (d) :
445489
∫ x in a..b, f (x - d) = ∫ x in a-d..b-d, f x :=
446490
by simpa only [sub_eq_add_neg] using integral_comp_add_right f (-d)
447491

448-
@[simp] lemma integral_comp_sub_left (d : ℝ) :
492+
@[simp] lemma integral_comp_sub_left (d) :
449493
∫ x in a..b, f (d - x) = ∫ x in d-b..d-a, f x :=
450494
by simpa only [one_mul, one_smul, inv_one] using integral_comp_sub_mul f one_ne_zero d
451495

0 commit comments

Comments
 (0)