l3lab/ntp-mathlib huggingface dataset:
/-- The derivative of the convolution `f * g` is given by `f * Dg`, when `f` is locally integrable
and `g` is `C^1` and compactly supported. Version where `g` depends on an additional parameter in an
open subset `s` of a parameter space `P` (and the compact support `k` is independent of the
parameter in `s`). -/
theorem hasFDerivAt_convolution_right_with_param {g : P → G → E'} {s : Set P} {k : Set G}
    (hs : IsOpen s) (hk : IsCompact k) (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0)
    (hf : LocallyIntegrable f μ) (hg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)) (q₀ : P × G)
    (hq₀ : q₀.1 ∈ s) :
    HasFDerivAt (fun q : P × G => (f ⋆[L, μ] g q.1) q.2)
      ((f ⋆[L.precompR (P × G), μ] fun x : G => fderiv 𝕜 (↿g) (q₀.1, x)) q₀.2) q₀ := by
  let g' := fderiv 𝕜 ↿g
  have A : ∀ p ∈ s, Continuous (g p) := fun p hp ↦ by
    refine hg.continuousOn.comp_continuous (continuous_const.prod_mk continuous_id') fun x => ?_
    simpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hp
  have A' : ∀ q : P × G, q.1 ∈ s → s ×ˢ univ ∈ 𝓝 q := fun q hq ↦ by
    apply (hs.prod isOpen_univ).mem_nhds
    simpa only [mem_prod, mem_univ, and_true_iff] using hq
  -- The derivative of `g` vanishes away from `k`.
  have g'_zero : ∀ p x, p ∈ s → x ∉ k → g' (p, x) = 0 := by
    intro p x hp hx
    refine' (hasFDerivAt_zero_of_eventually_const 0 _).fderiv
    have M2 : kᶜ ∈ 𝓝 x := hk.isClosed.isOpen_compl.mem_nhds hx
    have M1 : s ∈ 𝓝 p := hs.mem_nhds hp
    rw [nhds_prod_eq]
    filter_upwards [prod_mem_prod M1 M2]
    rintro ⟨p, y⟩ ⟨hp, hy⟩
    exact hgs p y hp hy
  /- We find a small neighborhood of `{q₀.1} × k` on which the derivative is uniformly bounded. This
    follows from the continuity at all points of the compact set `k`. -/
  obtain ⟨ε, C, εpos, h₀ε, hε⟩ :
      ∃ ε C, 0 < ε ∧ ball q₀.1 ε ⊆ s ∧ ∀ p x, ‖p - q₀.1‖ < ε → ‖g' (p, x)‖ ≤ C := 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
inst✝⁶ : CompleteSpace F
inst✝⁵ : MeasurableSpace G
inst✝⁴ : NormedAddCommGroup G
inst✝³ : BorelSpace G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup P
inst✝ : NormedSpace 𝕜 P
μ : Measure G
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hf : LocallyIntegrable f
hg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)
q₀ : P × G
hq₀ : q₀.1 ∈ s
g' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g
A : ∀ p ∈ s, Continuous (g p)
A' : ∀ (q : P × G), q.1 ∈ s → s ×ˢ univ ∈ 𝓝 q
g'_zero : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g' (p, x) = 0
⊢ ∃ ε C, 0 < ε ∧ ball q₀.1 ε ⊆ s ∧ ∀ (p : P) (x : G), ‖p - q₀.1‖ < ε → ‖g' (p, x)‖ ≤ C

Next tactic:
have A : IsCompact ({q₀.1} ×ˢ k) := isCompact_singleton.prod hk
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`).
In this version, all the types belong to the same universe (to get an induction working in the
proof). Use instead `contDiffOn_convolution_right_with_param`, which removes this restriction. -/
theorem contDiffOn_convolution_right_with_param_aux {G : Type uP} {E' : Type uP} {F : Type uP}
    {P : Type uP} [NormedAddCommGroup E'] [NormedAddCommGroup F] [NormedSpace 𝕜 E']
    [NormedSpace ℝ F] [NormedSpace 𝕜 F] [CompleteSpace F] [MeasurableSpace G]
    {μ : MeasureTheory.Measure G}
    [NormedAddCommGroup G] [BorelSpace G] [NormedSpace 𝕜 G] [NormedAddCommGroup P] [NormedSpace 𝕜 P]
    {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F) {g : P → G → E'} {s : Set P} {k : Set G}
    (hs : IsOpen s) (hk : IsCompact k) (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0)
    (hf : LocallyIntegrable f μ) (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- We have a formula for the derivation of `f * g`, which is of the same form, thanks to
    `hasFDerivAt_convolution_right_with_param`. Therefore, we can prove the result by induction on
    `n` (but for this we need the spaces at the different steps of the induction to live in the same
    universe, which is why we make the assumption in the lemma that all the relevant spaces
    come from the same universe). -/
  

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✝
inst✝¹⁸ : CompleteSpace F✝
inst✝¹⁷ : MeasurableSpace G✝
inst✝¹⁶ : NormedAddCommGroup G✝
inst✝¹⁵ : BorelSpace G✝
inst✝¹⁴ : NormedSpace 𝕜 G✝
inst✝¹³ : NormedAddCommGroup P✝
inst✝¹² : NormedSpace 𝕜 P✝
μ✝ : Measure G✝
L✝ : E →L[𝕜] E'✝ →L[𝕜] F✝
G E' F P : Type uP
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedAddCommGroup F
inst✝⁹ : NormedSpace 𝕜 E'
inst✝⁸ : NormedSpace ℝ F
inst✝⁷ : NormedSpace 𝕜 F
inst✝⁶ : CompleteSpace F
inst✝⁵ : MeasurableSpace G
μ : Measure G
inst✝⁴ : NormedAddCommGroup G
inst✝³ : BorelSpace G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup P
inst✝ : NormedSpace 𝕜 P
f : G → E
n : ℕ∞
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hf : LocallyIntegrable f
hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)
⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
induction' n using ENat.nat_induction with n ih ih generalizing g E' F
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`).
In this version, all the types belong to the same universe (to get an induction working in the
proof). Use instead `contDiffOn_convolution_right_with_param`, which removes this restriction. -/
theorem contDiffOn_convolution_right_with_param_aux {G : Type uP} {E' : Type uP} {F : Type uP}
    {P : Type uP} [NormedAddCommGroup E'] [NormedAddCommGroup F] [NormedSpace 𝕜 E']
    [NormedSpace ℝ F] [NormedSpace 𝕜 F] [CompleteSpace F] [MeasurableSpace G]
    {μ : MeasureTheory.Measure G}
    [NormedAddCommGroup G] [BorelSpace G] [NormedSpace 𝕜 G] [NormedAddCommGroup P] [NormedSpace 𝕜 P]
    {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F) {g : P → G → E'} {s : Set P} {k : Set G}
    (hs : IsOpen s) (hk : IsCompact k) (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0)
    (hf : LocallyIntegrable f μ) (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- We have a formula for the derivation of `f * g`, which is of the same form, thanks to
    `hasFDerivAt_convolution_right_with_param`. Therefore, we can prove the result by induction on
    `n` (but for this we need the spaces at the different steps of the induction to live in the same
    universe, which is why we make the assumption in the lemma that all the relevant spaces
    come from the same universe). -/
  induction' n using ENat.nat_induction with n ih ih generalizing g E' F
  · 

Proof state:
case h0
𝕜 : 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✝
inst✝¹⁸ : CompleteSpace F✝
inst✝¹⁷ : MeasurableSpace G✝
inst✝¹⁶ : NormedAddCommGroup G✝
inst✝¹⁵ : BorelSpace G✝
inst✝¹⁴ : NormedSpace 𝕜 G✝
inst✝¹³ : NormedAddCommGroup P✝
inst✝¹² : NormedSpace 𝕜 P✝
μ✝ : Measure G✝
L✝ : E →L[𝕜] E'✝ →L[𝕜] F✝
G P : Type uP
inst✝¹¹ : MeasurableSpace G
μ : Measure G
inst✝¹⁰ : NormedAddCommGroup G
inst✝⁹ : BorelSpace G
inst✝⁸ : NormedSpace 𝕜 G
inst✝⁷ : NormedAddCommGroup P
inst✝⁶ : NormedSpace 𝕜 P
f : G → E
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hf : LocallyIntegrable f
E' F : Type uP
inst✝⁵ : NormedAddCommGroup E'
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 E'
inst✝² : NormedSpace ℝ F
inst✝¹ : NormedSpace 𝕜 F
inst✝ : CompleteSpace F
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hg : ContDiffOn 𝕜 0 (↿g) (s ×ˢ univ)
⊢ ContDiffOn 𝕜 0 (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
rw [contDiffOn_zero] at hg ⊢
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`).
In this version, all the types belong to the same universe (to get an induction working in the
proof). Use instead `contDiffOn_convolution_right_with_param`, which removes this restriction. -/
theorem contDiffOn_convolution_right_with_param_aux {G : Type uP} {E' : Type uP} {F : Type uP}
    {P : Type uP} [NormedAddCommGroup E'] [NormedAddCommGroup F] [NormedSpace 𝕜 E']
    [NormedSpace ℝ F] [NormedSpace 𝕜 F] [CompleteSpace F] [MeasurableSpace G]
    {μ : MeasureTheory.Measure G}
    [NormedAddCommGroup G] [BorelSpace G] [NormedSpace 𝕜 G] [NormedAddCommGroup P] [NormedSpace 𝕜 P]
    {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F) {g : P → G → E'} {s : Set P} {k : Set G}
    (hs : IsOpen s) (hk : IsCompact k) (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0)
    (hf : LocallyIntegrable f μ) (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- We have a formula for the derivation of `f * g`, which is of the same form, thanks to
    `hasFDerivAt_convolution_right_with_param`. Therefore, we can prove the result by induction on
    `n` (but for this we need the spaces at the different steps of the induction to live in the same
    universe, which is why we make the assumption in the lemma that all the relevant spaces
    come from the same universe). -/
  induction' n using ENat.nat_induction with n ih ih generalizing g E' F
  · rw [contDiffOn_zero] at hg ⊢
    

Proof state:
case h0
𝕜 : 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✝
inst✝¹⁸ : CompleteSpace F✝
inst✝¹⁷ : MeasurableSpace G✝
inst✝¹⁶ : NormedAddCommGroup G✝
inst✝¹⁵ : BorelSpace G✝
inst✝¹⁴ : NormedSpace 𝕜 G✝
inst✝¹³ : NormedAddCommGroup P✝
inst✝¹² : NormedSpace 𝕜 P✝
μ✝ : Measure G✝
L✝ : E →L[𝕜] E'✝ →L[𝕜] F✝
G P : Type uP
inst✝¹¹ : MeasurableSpace G
μ : Measure G
inst✝¹⁰ : NormedAddCommGroup G
inst✝⁹ : BorelSpace G
inst✝⁸ : NormedSpace 𝕜 G
inst✝⁷ : NormedAddCommGroup P
inst✝⁶ : NormedSpace 𝕜 P
f : G → E
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hf : LocallyIntegrable f
E' F : Type uP
inst✝⁵ : NormedAddCommGroup E'
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 E'
inst✝² : NormedSpace ℝ F
inst✝¹ : NormedSpace 𝕜 F
inst✝ : CompleteSpace F
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hg : ContinuousOn (↿g) (s ×ˢ univ)
⊢ ContinuousOn (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
exact continuousOn_convolution_right_with_param L hk hgs hf hg
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/
theorem contDiffOn_convolution_right_with_param {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F)
    {g : P → G → E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k)
    (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0) (hf : LocallyIntegrable f μ)
    (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- The result is known when all the universes are the same, from
    `contDiffOn_convolution_right_with_param_aux`. We reduce to this situation by pushing
    everything through `ULift` continuous linear equivalences. -/
  

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
inst✝⁶ : CompleteSpace F
inst✝⁵ : MeasurableSpace G
inst✝⁴ : NormedAddCommGroup G
inst✝³ : BorelSpace G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup P
inst✝ : NormedSpace 𝕜 P
μ : Measure G
L✝ : E →L[𝕜] E' →L[𝕜] F
f : G → E
n : ℕ∞
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hf : LocallyIntegrable f
hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)
⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
let eG : Type max uG uE' uF uP := ULift.{max uE' uF uP} G
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/
theorem contDiffOn_convolution_right_with_param {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F)
    {g : P → G → E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k)
    (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0) (hf : LocallyIntegrable f μ)
    (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- The result is known when all the universes are the same, from
    `contDiffOn_convolution_right_with_param_aux`. We reduce to this situation by pushing
    everything through `ULift` continuous linear equivalences. -/
  let eG : Type max uG uE' uF uP := ULift.{max uE' uF uP} G
  

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
inst✝⁶ : CompleteSpace F
inst✝⁵ : MeasurableSpace G
inst✝⁴ : NormedAddCommGroup G
inst✝³ : BorelSpace G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup P
inst✝ : NormedSpace 𝕜 P
μ : Measure G
L✝ : E →L[𝕜] E' →L[𝕜] F
f : G → E
n : ℕ∞
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hf : LocallyIntegrable f
hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)
eG : Type (max uG uE' uF uP) := ULift.{max uE' uF uP, uG} G
⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
borelize eG
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/
theorem contDiffOn_convolution_right_with_param {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F)
    {g : P → G → E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k)
    (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0) (hf : LocallyIntegrable f μ)
    (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- The result is known when all the universes are the same, from
    `contDiffOn_convolution_right_with_param_aux`. We reduce to this situation by pushing
    everything through `ULift` continuous linear equivalences. -/
  let eG : Type max uG uE' uF uP := ULift.{max uE' uF uP} G
  borelize eG
  

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
inst✝⁶ : CompleteSpace F
inst✝⁵ : MeasurableSpace G
inst✝⁴ : NormedAddCommGroup G
inst✝³ : BorelSpace G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup P
inst✝ : NormedSpace 𝕜 P
μ : Measure G
L✝ : E →L[𝕜] E' →L[𝕜] F
f : G → E
n : ℕ∞
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hf : LocallyIntegrable f
hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)
eG : Type (max uG uE' uF uP) := ULift.{max uE' uF uP, uG} G
this✝¹ : MeasurableSpace eG := borel eG
this✝ : BorelSpace eG
⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
let eE' : Type max uE' uG uF uP := ULift.{max uG uF uP} E'
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/
theorem contDiffOn_convolution_right_with_param {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F)
    {g : P → G → E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k)
    (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0) (hf : LocallyIntegrable f μ)
    (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- The result is known when all the universes are the same, from
    `contDiffOn_convolution_right_with_param_aux`. We reduce to this situation by pushing
    everything through `ULift` continuous linear equivalences. -/
  let eG : Type max uG uE' uF uP := ULift.{max uE' uF uP} G
  borelize eG
  let eE' : Type max uE' uG uF uP := ULift.{max uG uF uP} E'
  

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
inst✝⁶ : CompleteSpace F
inst✝⁵ : MeasurableSpace G
inst✝⁴ : NormedAddCommGroup G
inst✝³ : BorelSpace G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup P
inst✝ : NormedSpace 𝕜 P
μ : Measure G
L✝ : E →L[𝕜] E' →L[𝕜] F
f : G → E
n : ℕ∞
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hf : LocallyIntegrable f
hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)
eG : Type (max uG uE' uF uP) := ULift.{max uE' uF uP, uG} G
this✝¹ : MeasurableSpace eG := borel eG
this✝ : BorelSpace eG
eE' : Type (max uE' uG uF uP) := ULift.{max uG uF uP, uE'} E'
⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
let eF : Type max uF uG uE' uP := ULift.{max uG uE' uP} F
/-- The convolution `f * g` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/
theorem contDiffOn_convolution_right_with_param {f : G → E} {n : ℕ∞} (L : E →L[𝕜] E' →L[𝕜] F)
    {g : P → G → E'} {s : Set P} {k : Set G} (hs : IsOpen s) (hk : IsCompact k)
    (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0) (hf : LocallyIntegrable f μ)
    (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ) := by
  /- The result is known when all the universes are the same, from
    `contDiffOn_convolution_right_with_param_aux`. We reduce to this situation by pushing
    everything through `ULift` continuous linear equivalences. -/
  let eG : Type max uG uE' uF uP := ULift.{max uE' uF uP} G
  borelize eG
  let eE' : Type max uE' uG uF uP := ULift.{max uG uF uP} E'
  let eF : Type max uF uG uE' uP := ULift.{max uG uE' uP} F
  

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
inst✝⁶ : CompleteSpace F
inst✝⁵ : MeasurableSpace G
inst✝⁴ : NormedAddCommGroup G
inst✝³ : BorelSpace G
inst✝² : NormedSpace 𝕜 G
inst✝¹ : NormedAddCommGroup P
inst✝ : NormedSpace 𝕜 P
μ : Measure G
L✝ : E →L[𝕜] E' →L[𝕜] F
f : G → E
n : ℕ∞
L : E →L[𝕜] E' →L[𝕜] F
g : P → G → E'
s : Set P
k : Set G
hs : IsOpen s
hk : IsCompact k
hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0
hf : LocallyIntegrable f
hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)
eG : Type (max uG uE' uF uP) := ULift.{max uE' uF uP, uG} G
this✝¹ : MeasurableSpace eG := borel eG
this✝ : BorelSpace eG
eE' : Type (max uE' uG uF uP) := ULift.{max uG uF uP, uE'} E'
eF : Type (max uF uG uE' uP) := ULift.{max uG uE' uP, uF} F
⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.2] g q.1) (s ×ˢ univ)

Next tactic:
let eP : Type max uP uG uE' uF := ULift.{max uG uE' uF} P