Theorem: measurable_fderiv_with_param
File: Mathlib/Analysis/Calculus/FDeriv/Measurable.lean

tactic: refine measurable_of_isClosed (fun s hs ↦ ?_)
state_before: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : LocallyCompactSpace E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
α : Type u_4
inst✝⁵ : TopologicalSpace α
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace E
inst✝² : OpensMeasurableSpace α
inst✝¹ : OpensMeasurableSpace E
f : α → E → F
K : Set (E →L[𝕜] F)
inst✝ : CompleteSpace F
hf : Continuous (Function.uncurry f)
⊢ Measurable fun p => fderiv 𝕜 (f p.1) p.2
state_after: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : LocallyCompactSpace E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
α : Type u_4
inst✝⁵ : TopologicalSpace α
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace E
inst✝² : OpensMeasurableSpace α
inst✝¹ : OpensMeasurableSpace E
f : α → E → F
K : Set (E →L[𝕜] F)
inst✝ : CompleteSpace F
hf : Continuous (Function.uncurry f)
s : Set (E →L[𝕜] F)
hs : IsClosed s
⊢ MeasurableSet ((fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s)

tactic: have :
  (fun (p : α × E) ↦ fderiv 𝕜 (f p.1) p.2) ⁻¹' s =
    {p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ s } ∪
      { p | ¬DifferentiableAt 𝕜 (f p.1) p.2} ∩ { _p | (0 : E →L[𝕜] F) ∈ s} :=
  Set.ext (fun x ↦ mem_preimage.trans fderiv_mem_iff)
state_before: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : LocallyCompactSpace E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
α : Type u_4
inst✝⁵ : TopologicalSpace α
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace E
inst✝² : OpensMeasurableSpace α
inst✝¹ : OpensMeasurableSpace E
f : α → E → F
K : Set (E →L[𝕜] F)
inst✝ : CompleteSpace F
hf : Continuous (Function.uncurry f)
s : Set (E →L[𝕜] F)
hs : IsClosed s
⊢ MeasurableSet ((fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s)
state_after: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : LocallyCompactSpace E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
α : Type u_4
inst✝⁵ : TopologicalSpace α
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace E
inst✝² : OpensMeasurableSpace α
inst✝¹ : OpensMeasurableSpace E
f : α → E → F
K : Set (E →L[𝕜] F)
inst✝ : CompleteSpace F
hf : Continuous (Function.uncurry f)
s : Set (E →L[𝕜] F)
hs : IsClosed s
this :
  (fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s =
    {p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ s} ∪
      {p | ¬DifferentiableAt 𝕜 (f p.1) p.2} ∩ {_p | 0 ∈ s}
⊢ MeasurableSet ((fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s)

tactic: rw [this]
state_before: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : LocallyCompactSpace E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
α : Type u_4
inst✝⁵ : TopologicalSpace α
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace E
inst✝² : OpensMeasurableSpace α
inst✝¹ : OpensMeasurableSpace E
f : α → E → F
K : Set (E →L[𝕜] F)
inst✝ : CompleteSpace F
hf : Continuous (Function.uncurry f)
s : Set (E →L[𝕜] F)
hs : IsClosed s
this :
  (fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s =
    {p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ s} ∪
      {p | ¬DifferentiableAt 𝕜 (f p.1) p.2} ∩ {_p | 0 ∈ s}
⊢ MeasurableSet ((fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s)
state_after: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : LocallyCompactSpace E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
α : Type u_4
inst✝⁵ : TopologicalSpace α
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace E
inst✝² : OpensMeasurableSpace α
inst✝¹ : OpensMeasurableSpace E
f : α → E → F
K : Set (E →L[𝕜] F)
inst✝ : CompleteSpace F
hf : Continuous (Function.uncurry f)
s : Set (E →L[𝕜] F)
hs : IsClosed s
this :
  (fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s =
    {p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ s} ∪
      {p | ¬DifferentiableAt 𝕜 (f p.1) p.2} ∩ {_p | 0 ∈ s}
⊢ MeasurableSet
    ({p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ s} ∪
      {p | ¬DifferentiableAt 𝕜 (f p.1) p.2} ∩ {_p | 0 ∈ s})

tactic: exact
  (measurableSet_of_differentiableAt_of_isComplete_with_param hf hs.isComplete).union
    ((measurableSet_of_differentiableAt_with_param _ hf).compl.inter (MeasurableSet.const _))
state_before: 𝕜 : Type u_1
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : LocallyCompactSpace E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
α : Type u_4
inst✝⁵ : TopologicalSpace α
inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace E
inst✝² : OpensMeasurableSpace α
inst✝¹ : OpensMeasurableSpace E
f : α → E → F
K : Set (E →L[𝕜] F)
inst✝ : CompleteSpace F
hf : Continuous (Function.uncurry f)
s : Set (E →L[𝕜] F)
hs : IsClosed s
this :
  (fun p => fderiv 𝕜 (f p.1) p.2) ⁻¹' s =
    {p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ s} ∪
      {p | ¬DifferentiableAt 𝕜 (f p.1) p.2} ∩ {_p | 0 ∈ s}
⊢ MeasurableSet
    ({p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ s} ∪
      {p | ¬DifferentiableAt 𝕜 (f p.1) p.2} ∩ {_p | 0 ∈ s})
state_after: no goals