l3lab/ntp-mathlib huggingface dataset:
/-- `(φ i ⋆ g i) (k i)` tends to `z₀` as `i` tends to some filter `l` if
* `φ` is a sequence of nonnegative functions with integral `1` as `i` tends to `l`;
* The support of `φ` tends to small neighborhoods around `(0 : G)` as `i` tends to `l`;
* `g i` is `mu`-a.e. strongly measurable as `i` tends to `l`;
* `g i x` tends to `z₀` as `(i, x)` tends to `l ×ˢ 𝓝 x₀`;
* `k i` tends to `x₀`.

See also `ContDiffBump.convolution_tendsto_right`.
-/
theorem convolution_tendsto_right {ι} {g : ι → G → E'} {l : Filter ι} {x₀ : G} {z₀ : E'}
    {φ : ι → G → ℝ} {k : ι → G} (hnφ : ∀ᶠ i in l, ∀ x, 0 ≤ φ i x)
    (hiφ : ∀ᶠ i in l, ∫ x, φ i x ∂μ = 1)
    -- todo: we could weaken this to "the integral tends to 1"
    (hφ : Tendsto (fun n => support (φ n)) l (𝓝 0).smallSets)
    (hmg : ∀ᶠ i in l, AEStronglyMeasurable (g i) μ) (hcg : Tendsto (uncurry g) (l ×ˢ 𝓝 x₀) (𝓝 z₀))
    (hk : Tendsto k l (𝓝 x₀)) :
    Tendsto (fun i : ι => (φ i ⋆[lsmul ℝ ℝ, μ] g i : G → E') (k i)) l (𝓝 z₀) := by
  simp_rw [tendsto_smallSets_iff] at hφ
  rw [Metric.tendsto_nhds] at hcg ⊢
  simp_rw [Metric.eventually_prod_nhds_iff] at hcg
  intro ε hε
  have h2ε : 0 < ε / 3 := div_pos hε (by norm_num)
  obtain ⟨p, hp, δ, hδ, hgδ⟩ := hcg _ h2ε
  dsimp only [uncurry] at hgδ
  have h2k := hk.eventually (ball_mem_nhds x₀ <| half_pos hδ)
  

Proof state:
case intro.intro.intro.intro
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝¹⁸ : NormedAddCommGroup E
inst✝¹⁷ : NormedAddCommGroup E'
inst✝¹⁶ : NormedAddCommGroup E''
inst✝¹⁵ : NormedAddCommGroup F
f f' : G → E
g✝ g' : G → E'
x x' : G
y y' : E
inst✝¹⁴ : NontriviallyNormedField 𝕜
inst✝¹³ : NormedSpace 𝕜 E
inst✝¹² : NormedSpace 𝕜 E'
inst✝¹¹ : NormedSpace 𝕜 E''
inst✝¹⁰ : NormedSpace 𝕜 F
L : E →L[𝕜] E' →L[𝕜] F
inst✝⁹ : MeasurableSpace G
μ ν : Measure G
inst✝⁸ : NormedSpace ℝ F
inst✝⁷ : SeminormedAddCommGroup G
inst✝⁶ : BorelSpace G
inst✝⁵ : SecondCountableTopology G
inst✝⁴ : IsAddLeftInvariant μ
inst✝³ : SigmaFinite μ
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedSpace ℝ E'
inst✝ : CompleteSpace E'
ι : Type u_1
g : ι → G → E'
l : Filter ι
x₀ : G
z₀ : E'
φ : ι → G → ℝ
k : ι → G
hnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x
hiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1
hmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ
hk : Tendsto k l (𝓝 x₀)
hφ : ∀ t ∈ 𝓝 0, ∀ᶠ (x : ι) in l, support (φ x) ⊆ t
hcg :
  ∀ ε > 0,
    ∃ pa,
      (∀ᶠ (i : ι) in l, pa i) ∧ ∃ ε_1 > 0, ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε
ε : ℝ
hε : ε > 0
h2ε : 0 < ε / 3
p : ι → Prop
hp : ∀ᶠ (i : ι) in l, p i
δ : ℝ
hδ : δ > 0
hgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3
h2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2
⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε

Next tactic:
have h2φ := hφ (ball (0 : G) _) <| ball_mem_nhds _ (half_pos hδ)
/-- `(φ i ⋆ g i) (k i)` tends to `z₀` as `i` tends to some filter `l` if
* `φ` is a sequence of nonnegative functions with integral `1` as `i` tends to `l`;
* The support of `φ` tends to small neighborhoods around `(0 : G)` as `i` tends to `l`;
* `g i` is `mu`-a.e. strongly measurable as `i` tends to `l`;
* `g i x` tends to `z₀` as `(i, x)` tends to `l ×ˢ 𝓝 x₀`;
* `k i` tends to `x₀`.

See also `ContDiffBump.convolution_tendsto_right`.
-/
theorem convolution_tendsto_right {ι} {g : ι → G → E'} {l : Filter ι} {x₀ : G} {z₀ : E'}
    {φ : ι → G → ℝ} {k : ι → G} (hnφ : ∀ᶠ i in l, ∀ x, 0 ≤ φ i x)
    (hiφ : ∀ᶠ i in l, ∫ x, φ i x ∂μ = 1)
    -- todo: we could weaken this to "the integral tends to 1"
    (hφ : Tendsto (fun n => support (φ n)) l (𝓝 0).smallSets)
    (hmg : ∀ᶠ i in l, AEStronglyMeasurable (g i) μ) (hcg : Tendsto (uncurry g) (l ×ˢ 𝓝 x₀) (𝓝 z₀))
    (hk : Tendsto k l (𝓝 x₀)) :
    Tendsto (fun i : ι => (φ i ⋆[lsmul ℝ ℝ, μ] g i : G → E') (k i)) l (𝓝 z₀) := by
  simp_rw [tendsto_smallSets_iff] at hφ
  rw [Metric.tendsto_nhds] at hcg ⊢
  simp_rw [Metric.eventually_prod_nhds_iff] at hcg
  intro ε hε
  have h2ε : 0 < ε / 3 := div_pos hε (by norm_num)
  obtain ⟨p, hp, δ, hδ, hgδ⟩ := hcg _ h2ε
  dsimp only [uncurry] at hgδ
  have h2k := hk.eventually (ball_mem_nhds x₀ <| half_pos hδ)
  have h2φ := hφ (ball (0 : G) _) <| ball_mem_nhds _ (half_pos hδ)
  

Proof state:
case intro.intro.intro.intro
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝¹⁸ : NormedAddCommGroup E
inst✝¹⁷ : NormedAddCommGroup E'
inst✝¹⁶ : NormedAddCommGroup E''
inst✝¹⁵ : NormedAddCommGroup F
f f' : G → E
g✝ g' : G → E'
x x' : G
y y' : E
inst✝¹⁴ : NontriviallyNormedField 𝕜
inst✝¹³ : NormedSpace 𝕜 E
inst✝¹² : NormedSpace 𝕜 E'
inst✝¹¹ : NormedSpace 𝕜 E''
inst✝¹⁰ : NormedSpace 𝕜 F
L : E →L[𝕜] E' →L[𝕜] F
inst✝⁹ : MeasurableSpace G
μ ν : Measure G
inst✝⁸ : NormedSpace ℝ F
inst✝⁷ : SeminormedAddCommGroup G
inst✝⁶ : BorelSpace G
inst✝⁵ : SecondCountableTopology G
inst✝⁴ : IsAddLeftInvariant μ
inst✝³ : SigmaFinite μ
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedSpace ℝ E'
inst✝ : CompleteSpace E'
ι : Type u_1
g : ι → G → E'
l : Filter ι
x₀ : G
z₀ : E'
φ : ι → G → ℝ
k : ι → G
hnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x
hiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1
hmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ
hk : Tendsto k l (𝓝 x₀)
hφ : ∀ t ∈ 𝓝 0, ∀ᶠ (x : ι) in l, support (φ x) ⊆ t
hcg :
  ∀ ε > 0,
    ∃ pa,
      (∀ᶠ (i : ι) in l, pa i) ∧ ∃ ε_1 > 0, ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε
ε : ℝ
hε : ε > 0
h2ε : 0 < ε / 3
p : ι → Prop
hp : ∀ᶠ (i : ι) in l, p i
δ : ℝ
hδ : δ > 0
hgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3
h2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2
h2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)
⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε

Next tactic:
filter_upwards [hp, h2k, h2φ, hnφ, hiφ, hmg] with i hpi hki hφi hnφi hiφi hmgi
theorem integral_convolution [MeasurableAdd₂ G] [MeasurableNeg G] [NormedSpace ℝ E]
    [NormedSpace ℝ E'] [CompleteSpace E] [CompleteSpace E'] (hf : Integrable f ν)
    (hg : Integrable g μ) : ∫ x, (f ⋆[L, ν] g) x ∂μ = L (∫ x, f x ∂ν) (∫ x, g x ∂μ) := by
  

Proof state:
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁹ : NormedAddCommGroup E
inst✝²⁸ : NormedAddCommGroup E'
inst✝²⁷ : NormedAddCommGroup E''
inst✝²⁶ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²⁵ : IsROrC 𝕜
inst✝²⁴ : NormedSpace 𝕜 E
inst✝²³ : NormedSpace 𝕜 E'
inst✝²² : NormedSpace 𝕜 E''
inst✝²¹ : NormedSpace ℝ F
inst✝²⁰ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁹ : CompleteSpace F
inst✝¹⁸ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁷ : NormedAddCommGroup F'
inst✝¹⁶ : NormedSpace ℝ F'
inst✝¹⁵ : NormedSpace 𝕜 F'
inst✝¹⁴ : CompleteSpace F'
inst✝¹³ : NormedAddCommGroup F''
inst✝¹² : NormedSpace ℝ F''
inst✝¹¹ : NormedSpace 𝕜 F''
inst✝¹⁰ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁹ : AddGroup G
inst✝⁸ : SigmaFinite μ
inst✝⁷ : SigmaFinite ν
inst✝⁶ : IsAddRightInvariant μ
inst✝⁵ : MeasurableAdd₂ G
inst✝⁴ : MeasurableNeg G
inst✝³ : NormedSpace ℝ E
inst✝² : NormedSpace ℝ E'
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace E'
hf : Integrable f
hg : Integrable g
⊢ ∫ (x : G), f ⋆[L, x] g ∂μ = (L (∫ (x : G), f x ∂ν)) (∫ (x : G), g x ∂μ)

Next tactic:
refine' (integral_integral_swap (by apply hf.convolution_integrand L hg)).trans _
theorem integral_convolution [MeasurableAdd₂ G] [MeasurableNeg G] [NormedSpace ℝ E]
    [NormedSpace ℝ E'] [CompleteSpace E] [CompleteSpace E'] (hf : Integrable f ν)
    (hg : Integrable g μ) : ∫ x, (f ⋆[L, ν] g) x ∂μ = L (∫ x, f x ∂ν) (∫ x, g x ∂μ) := by
  refine' (integral_integral_swap (by 

Proof state:
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁹ : NormedAddCommGroup E
inst✝²⁸ : NormedAddCommGroup E'
inst✝²⁷ : NormedAddCommGroup E''
inst✝²⁶ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²⁵ : IsROrC 𝕜
inst✝²⁴ : NormedSpace 𝕜 E
inst✝²³ : NormedSpace 𝕜 E'
inst✝²² : NormedSpace 𝕜 E''
inst✝²¹ : NormedSpace ℝ F
inst✝²⁰ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁹ : CompleteSpace F
inst✝¹⁸ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁷ : NormedAddCommGroup F'
inst✝¹⁶ : NormedSpace ℝ F'
inst✝¹⁵ : NormedSpace 𝕜 F'
inst✝¹⁴ : CompleteSpace F'
inst✝¹³ : NormedAddCommGroup F''
inst✝¹² : NormedSpace ℝ F''
inst✝¹¹ : NormedSpace 𝕜 F''
inst✝¹⁰ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁹ : AddGroup G
inst✝⁸ : SigmaFinite μ
inst✝⁷ : SigmaFinite ν
inst✝⁶ : IsAddRightInvariant μ
inst✝⁵ : MeasurableAdd₂ G
inst✝⁴ : MeasurableNeg G
inst✝³ : NormedSpace ℝ E
inst✝² : NormedSpace ℝ E'
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace E'
hf : Integrable f
hg : Integrable g
⊢ Integrable (uncurry fun x t => (L (f t)) (g (x - t)))

Next tactic:
apply hf.convolution_integrand L hg
theorem integral_convolution [MeasurableAdd₂ G] [MeasurableNeg G] [NormedSpace ℝ E]
    [NormedSpace ℝ E'] [CompleteSpace E] [CompleteSpace E'] (hf : Integrable f ν)
    (hg : Integrable g μ) : ∫ x, (f ⋆[L, ν] g) x ∂μ = L (∫ x, f x ∂ν) (∫ x, g x ∂μ) := by
  refine' (integral_integral_swap (by apply hf.convolution_integrand L hg)).trans _
  

Proof state:
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁹ : NormedAddCommGroup E
inst✝²⁸ : NormedAddCommGroup E'
inst✝²⁷ : NormedAddCommGroup E''
inst✝²⁶ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²⁵ : IsROrC 𝕜
inst✝²⁴ : NormedSpace 𝕜 E
inst✝²³ : NormedSpace 𝕜 E'
inst✝²² : NormedSpace 𝕜 E''
inst✝²¹ : NormedSpace ℝ F
inst✝²⁰ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁹ : CompleteSpace F
inst✝¹⁸ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁷ : NormedAddCommGroup F'
inst✝¹⁶ : NormedSpace ℝ F'
inst✝¹⁵ : NormedSpace 𝕜 F'
inst✝¹⁴ : CompleteSpace F'
inst✝¹³ : NormedAddCommGroup F''
inst✝¹² : NormedSpace ℝ F''
inst✝¹¹ : NormedSpace 𝕜 F''
inst✝¹⁰ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁹ : AddGroup G
inst✝⁸ : SigmaFinite μ
inst✝⁷ : SigmaFinite ν
inst✝⁶ : IsAddRightInvariant μ
inst✝⁵ : MeasurableAdd₂ G
inst✝⁴ : MeasurableNeg G
inst✝³ : NormedSpace ℝ E
inst✝² : NormedSpace ℝ E'
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace E'
hf : Integrable f
hg : Integrable g
⊢ ∫ (y : G), ∫ (x : G), (L (f y)) (g (x - y)) ∂μ ∂ν = (L (∫ (x : G), f x ∂ν)) (∫ (x : G), g x ∂μ)

Next tactic:
simp_rw [integral_comp_comm _ (hg.comp_sub_right _), integral_sub_right_eq_self]
theorem integral_convolution [MeasurableAdd₂ G] [MeasurableNeg G] [NormedSpace ℝ E]
    [NormedSpace ℝ E'] [CompleteSpace E] [CompleteSpace E'] (hf : Integrable f ν)
    (hg : Integrable g μ) : ∫ x, (f ⋆[L, ν] g) x ∂μ = L (∫ x, f x ∂ν) (∫ x, g x ∂μ) := by
  refine' (integral_integral_swap (by apply hf.convolution_integrand L hg)).trans _
  simp_rw [integral_comp_comm _ (hg.comp_sub_right _), integral_sub_right_eq_self]
  

Proof state:
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁹ : NormedAddCommGroup E
inst✝²⁸ : NormedAddCommGroup E'
inst✝²⁷ : NormedAddCommGroup E''
inst✝²⁶ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²⁵ : IsROrC 𝕜
inst✝²⁴ : NormedSpace 𝕜 E
inst✝²³ : NormedSpace 𝕜 E'
inst✝²² : NormedSpace 𝕜 E''
inst✝²¹ : NormedSpace ℝ F
inst✝²⁰ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁹ : CompleteSpace F
inst✝¹⁸ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁷ : NormedAddCommGroup F'
inst✝¹⁶ : NormedSpace ℝ F'
inst✝¹⁵ : NormedSpace 𝕜 F'
inst✝¹⁴ : CompleteSpace F'
inst✝¹³ : NormedAddCommGroup F''
inst✝¹² : NormedSpace ℝ F''
inst✝¹¹ : NormedSpace 𝕜 F''
inst✝¹⁰ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁹ : AddGroup G
inst✝⁸ : SigmaFinite μ
inst✝⁷ : SigmaFinite ν
inst✝⁶ : IsAddRightInvariant μ
inst✝⁵ : MeasurableAdd₂ G
inst✝⁴ : MeasurableNeg G
inst✝³ : NormedSpace ℝ E
inst✝² : NormedSpace ℝ E'
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace E'
hf : Integrable f
hg : Integrable g
⊢ ∫ (y : G), (L (f y)) (∫ (x : G), g x ∂μ) ∂ν = (L (∫ (x : G), f x ∂ν)) (∫ (x : G), g x ∂μ)

Next tactic:
exact (L.flip (∫ x, g x ∂μ)).integral_comp_comm hf
/-- Convolution is associative. This has a weak but inconvenient integrability condition.
See also `convolution_assoc`. -/
theorem convolution_assoc' (hL : ∀ (x : E) (y : E') (z : E''), L₂ (L x y) z = L₃ x (L₄ y z))
    {x₀ : G} (hfg : ∀ᵐ y ∂μ, ConvolutionExistsAt f g y L ν)
    (hgk : ∀ᵐ x ∂ν, ConvolutionExistsAt g k x L₄ μ)
    (hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x)))) (μ.prod ν)) :
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = (f ⋆[L₃, ν] g ⋆[L₄, μ] k) x₀ :=
  calc
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = ∫ t, L₂ (∫ s, L (f s) (g (t - s)) ∂ν) (k (x₀ - t)) ∂μ := rfl
    _ = ∫ t, ∫ s, L₂ (L (f s) (g (t - s))) (k (x₀ - t)) ∂ν ∂μ :=
      (integral_congr_ae (hfg.mono fun t ht => ((L₂.flip (k (x₀ - t))).integral_comp_comm ht).symm))
    _ = ∫ t, ∫ s, L₃ (f s) (L₄ (g (t - s)) (k (x₀ - t))) ∂ν ∂μ := by 

Proof state:
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁶ : NormedAddCommGroup E
inst✝²⁵ : NormedAddCommGroup E'
inst✝²⁴ : NormedAddCommGroup E''
inst✝²³ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²² : IsROrC 𝕜
inst✝²¹ : NormedSpace 𝕜 E
inst✝²⁰ : NormedSpace 𝕜 E'
inst✝¹⁹ : NormedSpace 𝕜 E''
inst✝¹⁸ : NormedSpace ℝ F
inst✝¹⁷ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁶ : CompleteSpace F
inst✝¹⁵ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁴ : NormedAddCommGroup F'
inst✝¹³ : NormedSpace ℝ F'
inst✝¹² : NormedSpace 𝕜 F'
inst✝¹¹ : CompleteSpace F'
inst✝¹⁰ : NormedAddCommGroup F''
inst✝⁹ : NormedSpace ℝ F''
inst✝⁸ : NormedSpace 𝕜 F''
inst✝⁷ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁶ : AddGroup G
inst✝⁵ : SigmaFinite μ
inst✝⁴ : SigmaFinite ν
inst✝³ : IsAddRightInvariant μ
inst✝² : MeasurableAdd₂ G
inst✝¹ : IsAddRightInvariant ν
inst✝ : MeasurableNeg G
hL : ∀ (x : E) (y : E') (z : E''), (L₂ ((L x) y)) z = (L₃ x) ((L₄ y) z)
x₀ : G
hfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L
hgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄
hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x))))
⊢ ∫ (t : G), ∫ (s : G), (L₂ ((L (f s)) (g (t - s)))) (k (x₀ - t)) ∂ν ∂μ =
    ∫ (t : G), ∫ (s : G), (L₃ (f s)) ((L₄ (g (t - s))) (k (x₀ - t))) ∂ν ∂μ

Next tactic:
simp_rw [hL]
/-- Convolution is associative. This has a weak but inconvenient integrability condition.
See also `convolution_assoc`. -/
theorem convolution_assoc' (hL : ∀ (x : E) (y : E') (z : E''), L₂ (L x y) z = L₃ x (L₄ y z))
    {x₀ : G} (hfg : ∀ᵐ y ∂μ, ConvolutionExistsAt f g y L ν)
    (hgk : ∀ᵐ x ∂ν, ConvolutionExistsAt g k x L₄ μ)
    (hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x)))) (μ.prod ν)) :
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = (f ⋆[L₃, ν] g ⋆[L₄, μ] k) x₀ :=
  calc
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = ∫ t, L₂ (∫ s, L (f s) (g (t - s)) ∂ν) (k (x₀ - t)) ∂μ := rfl
    _ = ∫ t, ∫ s, L₂ (L (f s) (g (t - s))) (k (x₀ - t)) ∂ν ∂μ :=
      (integral_congr_ae (hfg.mono fun t ht => ((L₂.flip (k (x₀ - t))).integral_comp_comm ht).symm))
    _ = ∫ t, ∫ s, L₃ (f s) (L₄ (g (t - s)) (k (x₀ - t))) ∂ν ∂μ := by simp_rw [hL]
    _ = ∫ s, ∫ t, L₃ (f s) (L₄ (g (t - s)) (k (x₀ - t))) ∂μ ∂ν := by 

Proof state:
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁶ : NormedAddCommGroup E
inst✝²⁵ : NormedAddCommGroup E'
inst✝²⁴ : NormedAddCommGroup E''
inst✝²³ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²² : IsROrC 𝕜
inst✝²¹ : NormedSpace 𝕜 E
inst✝²⁰ : NormedSpace 𝕜 E'
inst✝¹⁹ : NormedSpace 𝕜 E''
inst✝¹⁸ : NormedSpace ℝ F
inst✝¹⁷ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁶ : CompleteSpace F
inst✝¹⁵ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁴ : NormedAddCommGroup F'
inst✝¹³ : NormedSpace ℝ F'
inst✝¹² : NormedSpace 𝕜 F'
inst✝¹¹ : CompleteSpace F'
inst✝¹⁰ : NormedAddCommGroup F''
inst✝⁹ : NormedSpace ℝ F''
inst✝⁸ : NormedSpace 𝕜 F''
inst✝⁷ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁶ : AddGroup G
inst✝⁵ : SigmaFinite μ
inst✝⁴ : SigmaFinite ν
inst✝³ : IsAddRightInvariant μ
inst✝² : MeasurableAdd₂ G
inst✝¹ : IsAddRightInvariant ν
inst✝ : MeasurableNeg G
hL : ∀ (x : E) (y : E') (z : E''), (L₂ ((L x) y)) z = (L₃ x) ((L₄ y) z)
x₀ : G
hfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L
hgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄
hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x))))
⊢ ∫ (t : G), ∫ (s : G), (L₃ (f s)) ((L₄ (g (t - s))) (k (x₀ - t))) ∂ν ∂μ =
    ∫ (s : G), ∫ (t : G), (L₃ (f s)) ((L₄ (g (t - s))) (k (x₀ - t))) ∂μ ∂ν

Next tactic:
rw [integral_integral_swap hi]
/-- Convolution is associative. This has a weak but inconvenient integrability condition.
See also `convolution_assoc`. -/
theorem convolution_assoc' (hL : ∀ (x : E) (y : E') (z : E''), L₂ (L x y) z = L₃ x (L₄ y z))
    {x₀ : G} (hfg : ∀ᵐ y ∂μ, ConvolutionExistsAt f g y L ν)
    (hgk : ∀ᵐ x ∂ν, ConvolutionExistsAt g k x L₄ μ)
    (hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x)))) (μ.prod ν)) :
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = (f ⋆[L₃, ν] g ⋆[L₄, μ] k) x₀ :=
  calc
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = ∫ t, L₂ (∫ s, L (f s) (g (t - s)) ∂ν) (k (x₀ - t)) ∂μ := rfl
    _ = ∫ t, ∫ s, L₂ (L (f s) (g (t - s))) (k (x₀ - t)) ∂ν ∂μ :=
      (integral_congr_ae (hfg.mono fun t ht => ((L₂.flip (k (x₀ - t))).integral_comp_comm ht).symm))
    _ = ∫ t, ∫ s, L₃ (f s) (L₄ (g (t - s)) (k (x₀ - t))) ∂ν ∂μ := by simp_rw [hL]
    _ = ∫ s, ∫ t, L₃ (f s) (L₄ (g (t - s)) (k (x₀ - t))) ∂μ ∂ν := by rw [integral_integral_swap hi]
    _ = ∫ s, ∫ u, L₃ (f s) (L₄ (g u) (k (x₀ - s - u))) ∂μ ∂ν := by
      

Proof state:
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁶ : NormedAddCommGroup E
inst✝²⁵ : NormedAddCommGroup E'
inst✝²⁴ : NormedAddCommGroup E''
inst✝²³ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²² : IsROrC 𝕜
inst✝²¹ : NormedSpace 𝕜 E
inst✝²⁰ : NormedSpace 𝕜 E'
inst✝¹⁹ : NormedSpace 𝕜 E''
inst✝¹⁸ : NormedSpace ℝ F
inst✝¹⁷ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁶ : CompleteSpace F
inst✝¹⁵ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁴ : NormedAddCommGroup F'
inst✝¹³ : NormedSpace ℝ F'
inst✝¹² : NormedSpace 𝕜 F'
inst✝¹¹ : CompleteSpace F'
inst✝¹⁰ : NormedAddCommGroup F''
inst✝⁹ : NormedSpace ℝ F''
inst✝⁸ : NormedSpace 𝕜 F''
inst✝⁷ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁶ : AddGroup G
inst✝⁵ : SigmaFinite μ
inst✝⁴ : SigmaFinite ν
inst✝³ : IsAddRightInvariant μ
inst✝² : MeasurableAdd₂ G
inst✝¹ : IsAddRightInvariant ν
inst✝ : MeasurableNeg G
hL : ∀ (x : E) (y : E') (z : E''), (L₂ ((L x) y)) z = (L₃ x) ((L₄ y) z)
x₀ : G
hfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L
hgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄
hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x))))
⊢ ∫ (s : G), ∫ (t : G), (L₃ (f s)) ((L₄ (g (t - s))) (k (x₀ - t))) ∂μ ∂ν =
    ∫ (s : G), ∫ (u : G), (L₃ (f s)) ((L₄ (g u)) (k (x₀ - s - u))) ∂μ ∂ν

Next tactic:
congr
/-- Convolution is associative. This has a weak but inconvenient integrability condition.
See also `convolution_assoc`. -/
theorem convolution_assoc' (hL : ∀ (x : E) (y : E') (z : E''), L₂ (L x y) z = L₃ x (L₄ y z))
    {x₀ : G} (hfg : ∀ᵐ y ∂μ, ConvolutionExistsAt f g y L ν)
    (hgk : ∀ᵐ x ∂ν, ConvolutionExistsAt g k x L₄ μ)
    (hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x)))) (μ.prod ν)) :
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = (f ⋆[L₃, ν] g ⋆[L₄, μ] k) x₀ :=
  calc
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = ∫ t, L₂ (∫ s, L (f s) (g (t - s)) ∂ν) (k (x₀ - t)) ∂μ := rfl
    _ = ∫ t, ∫ s, L₂ (L (f s) (g (t - s))) (k (x₀ - t)) ∂ν ∂μ :=
      (integral_congr_ae (hfg.mono fun t ht => ((L₂.flip (k (x₀ - t))).integral_comp_comm ht).symm))
    _ = ∫ t, ∫ s, L₃ (f s) (L₄ (g (t - s)) (k (x₀ - t))) ∂ν ∂μ := by simp_rw [hL]
    _ = ∫ s, ∫ t, L₃ (f s) (L₄ (g (t - s)) (k (x₀ - t))) ∂μ ∂ν := by rw [integral_integral_swap hi]
    _ = ∫ s, ∫ u, L₃ (f s) (L₄ (g u) (k (x₀ - s - u))) ∂μ ∂ν := by
      congr; 

Proof state:
case e_f
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝²⁶ : NormedAddCommGroup E
inst✝²⁵ : NormedAddCommGroup E'
inst✝²⁴ : NormedAddCommGroup E''
inst✝²³ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x x' : G
y y' : E
inst✝²² : IsROrC 𝕜
inst✝²¹ : NormedSpace 𝕜 E
inst✝²⁰ : NormedSpace 𝕜 E'
inst✝¹⁹ : NormedSpace 𝕜 E''
inst✝¹⁸ : NormedSpace ℝ F
inst✝¹⁷ : NormedSpace 𝕜 F
n : ℕ∞
inst✝¹⁶ : CompleteSpace F
inst✝¹⁵ : MeasurableSpace G
μ ν : Measure G
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹⁴ : NormedAddCommGroup F'
inst✝¹³ : NormedSpace ℝ F'
inst✝¹² : NormedSpace 𝕜 F'
inst✝¹¹ : CompleteSpace F'
inst✝¹⁰ : NormedAddCommGroup F''
inst✝⁹ : NormedSpace ℝ F''
inst✝⁸ : NormedSpace 𝕜 F''
inst✝⁷ : CompleteSpace F''
k : G → E''
L₂ : F →L[𝕜] E'' →L[𝕜] F'
L₃ : E →L[𝕜] F'' →L[𝕜] F'
L₄ : E' →L[𝕜] E'' →L[𝕜] F''
inst✝⁶ : AddGroup G
inst✝⁵ : SigmaFinite μ
inst✝⁴ : SigmaFinite ν
inst✝³ : IsAddRightInvariant μ
inst✝² : MeasurableAdd₂ G
inst✝¹ : IsAddRightInvariant ν
inst✝ : MeasurableNeg G
hL : ∀ (x : E) (y : E') (z : E''), (L₂ ((L x) y)) z = (L₃ x) ((L₄ y) z)
x₀ : G
hfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L
hgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄
hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x))))
⊢ (fun s => ∫ (t : G), (L₃ (f s)) ((L₄ (g (t - s))) (k (x₀ - t))) ∂μ) = fun s =>
    ∫ (u : G), (L₃ (f s)) ((L₄ (g u)) (k (x₀ - s - u))) ∂μ

Next tactic:
ext t