Skip to content

Commit b57f05f

Browse files
committed
chore: remove 4 porting notes about continuity (#12358)
1 parent fe756d6 commit b57f05f

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

Mathlib/Analysis/SpecialFunctions/Integrals.lean

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -659,15 +659,9 @@ theorem integral_sin_pow_aux :
659659
_ = C + (↑n + 1) * ∫ x in a..b, sin x ^ n - sin x ^ (n + 2) := by
660660
simp [cos_sq', sub_mul, ← pow_add, add_comm]
661661
_ = (C + (↑n + 1) * ∫ x in a..b, sin x ^ n) - (↑n + 1) * ∫ x in a..b, sin x ^ (n + 2) := by
662-
rw [integral_sub, mul_sub, add_sub_assoc] <;> apply Continuous.intervalIntegrable
663-
-- Porting note: was `... <;> continuity`
664-
· exact continuous_sin_pow n
665-
· exact continuous_sin_pow (n + 2)
666-
all_goals apply Continuous.intervalIntegrable
667-
-- Porting note: was `... <;> continuity`
668-
· have : Continuous fun x ↦ ↑(n + 1) * cos x := by continuity
669-
exact this.mul (continuous_sin_pow n)
670-
· exact continuous_sin
662+
rw [integral_sub, mul_sub, add_sub_assoc] <;>
663+
apply Continuous.intervalIntegrable <;> continuity
664+
all_goals apply Continuous.intervalIntegrable; continuity
671665
#align integral_sin_pow_aux integral_sin_pow_aux
672666

673667
/-- The reduction formula for the integral of `sin x ^ n` for any natural `n ≥ 2`. -/
@@ -772,8 +766,7 @@ theorem integral_cos_sq : ∫ x in a..b, cos x ^ 2 = (cos b * sin b - cos a * si
772766
/-- Simplification of the integral of `sin x ^ m * cos x ^ n`, case `n` is odd. -/
773767
theorem integral_sin_pow_mul_cos_pow_odd (m n : ℕ) :
774768
(∫ x in a..b, sin x ^ m * cos x ^ (2 * n + 1)) = ∫ u in sin a..sin b, u^m * (↑1 - u ^ 2) ^ n :=
775-
have hc : Continuous fun u : ℝ => u ^ m * (↑1 - u ^ 2) ^ n := -- Porting note: was `by continuity`
776-
(continuous_pow m).mul ((continuous_const.sub (continuous_pow 2)).pow n)
769+
have hc : Continuous fun u : ℝ => u ^ m * (↑1 - u ^ 2) ^ n := by continuity
777770
calc
778771
(∫ x in a..b, sin x ^ m * cos x ^ (2 * n + 1)) =
779772
∫ x in a..b, sin x ^ m * (↑1 - sin x ^ 2) ^ n * cos x := by
@@ -809,8 +802,7 @@ theorem integral_cos_pow_three :
809802
/-- Simplification of the integral of `sin x ^ m * cos x ^ n`, case `m` is odd. -/
810803
theorem integral_sin_pow_odd_mul_cos_pow (m n : ℕ) :
811804
(∫ x in a..b, sin x ^ (2 * m + 1) * cos x ^ n) = ∫ u in cos b..cos a, u^n * (↑1 - u ^ 2) ^ m :=
812-
have hc : Continuous fun u : ℝ => u ^ n * (↑1 - u ^ 2) ^ m := -- Porting note: was `by continuity`
813-
(continuous_pow n).mul ((continuous_const.sub (continuous_pow 2)).pow m)
805+
have hc : Continuous fun u : ℝ => u ^ n * (↑1 - u ^ 2) ^ m := by continuity
814806
calc
815807
(∫ x in a..b, sin x ^ (2 * m + 1) * cos x ^ n) =
816808
-∫ x in b..a, sin x ^ (2 * m + 1) * cos x ^ n :=

0 commit comments

Comments
 (0)