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

full_name: ContinuousLinearMap.measurable_apply₂
code: theorem measurable_apply₂ [MeasurableSpace E] [OpensMeasurableSpace E]
    [SecondCountableTopologyEither (E →L[𝕜] F) E]
    [MeasurableSpace F] [BorelSpace F] : Measurable fun p : (E →L[𝕜] F) × E => p.1 p.2 
goal: Measurable fun p => p.1 p.2

full_name: FDerivMeasurableAux.A
code: /-- The set `A f L r ε` is the set of points `x` around which the function `f` is well approximated
at scale `r` by the linear map `L`, up to an error `ε`. We tweak the definition to make sure that
this is an open set. -/
def A (f : E → F) (L : E →L[𝕜] F) (r ε : ℝ) : Set E 
goal: Set E

full_name: FDerivMeasurableAux.B
code: /-- The set `B f K r s ε` is the set of points `x` around which there exists a continuous linear map
`L` belonging to `K` (a given set of continuous linear maps) that approximates well the
function `f` (up to an error `ε`), simultaneously at scales `r` and `s`. -/
def B (f : E → F) (K : Set (E →L[𝕜] F)) (r s ε : ℝ) : Set E 
goal: Set E

full_name: FDerivMeasurableAux.D
code: /-- The set `D f K` is a complicated set constructed using countable intersections and unions. Its
main use is that, when `K` is complete, it is exactly the set of points where `f` is differentiable,
with a derivative in `K`. -/
def D (f : E → F) (K : Set (E →L[𝕜] F)) : Set E 
goal: Set E

full_name: FDerivMeasurableAux.isOpen_A
code: theorem isOpen_A (L : E →L[𝕜] F) (r ε : ℝ) : IsOpen (A f L r ε) 
goal: IsOpen (FDerivMeasurableAux.A f L r ε)

full_name: FDerivMeasurableAux.isOpen_B
code: theorem isOpen_B {K : Set (E →L[𝕜] F)} {r s ε : ℝ} : IsOpen (B f K r s ε) 
goal: IsOpen (FDerivMeasurableAux.B f K r s ε)

full_name: FDerivMeasurableAux.A_mono
code: theorem A_mono (L : E →L[𝕜] F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ 
goal: FDerivMeasurableAux.A f L r ε ⊆ FDerivMeasurableAux.A f L r δ

full_name: FDerivMeasurableAux.le_of_mem_A
code: theorem le_of_mem_A {r ε : ℝ} {L : E →L[𝕜] F} {x : E} (hx : x ∈ A f L r ε) {y z : E}
    (hy : y ∈ closedBall x (r / 2)) (hz : z ∈ closedBall x (r / 2)) :
    ‖f z - f y - L (z - y)‖ ≤ ε * r 
goal: ‖f z - f y - L (z - y)‖ ≤ ε * r

full_name: FDerivMeasurableAux.mem_A_of_differentiable
code: theorem mem_A_of_differentiable {ε : ℝ} (hε : 0 < ε) {x : E} (hx : DifferentiableAt 𝕜 f x) :
    ∃ R > 0, ∀ r ∈ Ioo (0 : ℝ) R, x ∈ A f (fderiv 𝕜 f x) r ε 
goal: ∃ R > 0, ∀ r ∈ Set.Ioo 0 R, x ∈ FDerivMeasurableAux.A f (fderiv 𝕜 f x) r ε

full_name: FDerivMeasurableAux.norm_sub_le_of_mem_A
code: theorem norm_sub_le_of_mem_A {c : 𝕜} (hc : 1 < ‖c‖) {r ε : ℝ} (hε : 0 < ε) (hr : 0 < r) {x : E}
    {L₁ L₂ : E →L[𝕜] F} (h₁ : x ∈ A f L₁ r ε) (h₂ : x ∈ A f L₂ r ε) : ‖L₁ - L₂‖ ≤ 4 * ‖c‖ * ε 
goal: ‖L₁ - L₂‖ ≤ 4 * ‖c‖ * ε

full_name: FDerivMeasurableAux.differentiable_set_subset_D
code: /-- Easy inclusion: a differentiability point with derivative in `K` belongs to `D f K`. -/
theorem differentiable_set_subset_D :
    { x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K } ⊆ D f K 
goal: {x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K} ⊆ FDerivMeasurableAux.D f K

full_name: FDerivMeasurableAux.D_subset_differentiable_set
code: /-- Harder inclusion: at a point in `D f K`, the function `f` has a derivative, in `K`. -/
theorem D_subset_differentiable_set {K : Set (E →L[𝕜] F)} (hK : IsComplete K) :
    D f K ⊆ { x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K } 
goal: FDerivMeasurableAux.D f K ⊆ {x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K}

full_name: FDerivMeasurableAux.differentiable_set_eq_D
code: theorem differentiable_set_eq_D (hK : IsComplete K) :
    { x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K } = D f K 
goal: {x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K} = FDerivMeasurableAux.D f K

full_name: measurableSet_of_differentiableAt_of_isComplete
code: /-- The set of differentiability points of a function, with derivative in a given complete set,
is Borel-measurable. -/
theorem measurableSet_of_differentiableAt_of_isComplete {K : Set (E →L[𝕜] F)} (hK : IsComplete K) :
    MeasurableSet { x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K } 
goal: MeasurableSet {x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K}

full_name: measurableSet_of_differentiableAt
code: /-- The set of differentiability points of a function taking values in a complete space is
Borel-measurable. -/
theorem measurableSet_of_differentiableAt : MeasurableSet { x | DifferentiableAt 𝕜 f x } 
goal: MeasurableSet {x | DifferentiableAt 𝕜 f x}

full_name: measurable_fderiv
code: @[measurability, fun_prop]
theorem measurable_fderiv : Measurable (fderiv 𝕜 f) 
goal: Measurable (fderiv 𝕜 f)

full_name: measurable_fderiv_apply_const
code: @[measurability, fun_prop]
theorem measurable_fderiv_apply_const [MeasurableSpace F] [BorelSpace F] (y : E) :
    Measurable fun x => fderiv 𝕜 f x y 
goal: Measurable fun x => (fderiv 𝕜 f x) y

full_name: measurable_deriv
code: @[measurability, fun_prop]
theorem measurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜] [MeasurableSpace F]
    [BorelSpace F] (f : 𝕜 → F) : Measurable (deriv f) 
goal: Measurable (deriv f)

full_name: stronglyMeasurable_deriv
code: theorem stronglyMeasurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜]
    [h : SecondCountableTopologyEither 𝕜 F] (f : 𝕜 → F) : StronglyMeasurable (deriv f) 
goal: MeasureTheory.StronglyMeasurable (deriv f)

full_name: aemeasurable_deriv
code: theorem aemeasurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜] [MeasurableSpace F]
    [BorelSpace F] (f : 𝕜 → F) (μ : Measure 𝕜) : AEMeasurable (deriv f) μ 
goal: AEMeasurable (deriv f) μ

full_name: aestronglyMeasurable_deriv
code: theorem aestronglyMeasurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜]
    [SecondCountableTopologyEither 𝕜 F] (f : 𝕜 → F) (μ : Measure 𝕜) :
    AEStronglyMeasurable (deriv f) μ 
goal: MeasureTheory.AEStronglyMeasurable (deriv f) μ

full_name: RightDerivMeasurableAux.A
code: /-- The set `A f L r ε` is the set of points `x` around which the function `f` is well approximated
at scale `r` by the linear map `h ↦ h • L`, up to an error `ε`. We tweak the definition to
make sure that this is open on the right. -/
def A (f : ℝ → F) (L : F) (r ε : ℝ) : Set ℝ 
goal: Set ℝ

full_name: RightDerivMeasurableAux.B
code: /-- The set `B f K r s ε` is the set of points `x` around which there exists a vector
`L` belonging to `K` (a given set of vectors) such that `h • L` approximates well `f (x + h)`
(up to an error `ε`), simultaneously at scales `r` and `s`. -/
def B (f : ℝ → F) (K : Set F) (r s ε : ℝ) : Set ℝ 
goal: Set ℝ

full_name: RightDerivMeasurableAux.D
code: /-- The set `D f K` is a complicated set constructed using countable intersections and unions. Its
main use is that, when `K` is complete, it is exactly the set of points where `f` is differentiable,
with a derivative in `K`. -/
def D (f : ℝ → F) (K : Set F) : Set ℝ 
goal: Set ℝ

full_name: RightDerivMeasurableAux.A_mem_nhdsWithin_Ioi
code: theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x 
goal: RightDerivMeasurableAux.A f L r ε ∈ 𝓝[>] x

full_name: RightDerivMeasurableAux.B_mem_nhdsWithin_Ioi
code: theorem B_mem_nhdsWithin_Ioi {K : Set F} {r s ε x : ℝ} (hx : x ∈ B f K r s ε) :
    B f K r s ε ∈ 𝓝[>] x 
goal: RightDerivMeasurableAux.B f K r s ε ∈ 𝓝[>] x

full_name: RightDerivMeasurableAux.measurableSet_B
code: theorem measurableSet_B {K : Set F} {r s ε : ℝ} : MeasurableSet (B f K r s ε) 
goal: MeasurableSet (RightDerivMeasurableAux.B f K r s ε)

full_name: RightDerivMeasurableAux.A_mono
code: theorem A_mono (L : F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ 
goal: RightDerivMeasurableAux.A f L r ε ⊆ RightDerivMeasurableAux.A f L r δ

full_name: RightDerivMeasurableAux.le_of_mem_A
code: theorem le_of_mem_A {r ε : ℝ} {L : F} {x : ℝ} (hx : x ∈ A f L r ε) {y z : ℝ}
    (hy : y ∈ Icc x (x + r / 2)) (hz : z ∈ Icc x (x + r / 2)) :
  ‖f z - f y - (z - y) • L‖ ≤ ε * r 
goal: ‖f z - f y - (z - y) • L‖ ≤ ε * r

full_name: RightDerivMeasurableAux.mem_A_of_differentiable
code: theorem mem_A_of_differentiable {ε : ℝ} (hε : 0 < ε) {x : ℝ}
    (hx : DifferentiableWithinAt ℝ f (Ici x) x) :
    ∃ R > 0, ∀ r ∈ Ioo (0 : ℝ) R, x ∈ A f (derivWithin f (Ici x) x) r ε 
goal: ∃ R > 0, ∀ r ∈ Set.Ioo 0 R, x ∈ RightDerivMeasurableAux.A f (derivWithin f (Set.Ici x) x) r ε

full_name: RightDerivMeasurableAux.norm_sub_le_of_mem_A
code: theorem norm_sub_le_of_mem_A {r x : ℝ} (hr : 0 < r) (ε : ℝ) {L₁ L₂ : F} (h₁ : x ∈ A f L₁ r ε)
    (h₂ : x ∈ A f L₂ r ε) : ‖L₁ - L₂‖ ≤ 4 * ε 
goal: ‖L₁ - L₂‖ ≤ 4 * ε

full_name: RightDerivMeasurableAux.differentiable_set_subset_D
code: /-- Easy inclusion: a differentiability point with derivative in `K` belongs to `D f K`. -/
theorem differentiable_set_subset_D :
    { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ K } ⊆ D f K 
goal: {x | DifferentiableWithinAt ℝ f (Set.Ici x) x ∧ derivWithin f (Set.Ici x) x ∈ K} ⊆ RightDerivMeasurableAux.D f K

full_name: RightDerivMeasurableAux.D_subset_differentiable_set
code: /-- Harder inclusion: at a point in `D f K`, the function `f` has a derivative, in `K`. -/
theorem D_subset_differentiable_set {K : Set F} (hK : IsComplete K) :
    D f K ⊆ { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ K } 
goal: RightDerivMeasurableAux.D f K ⊆ {x | DifferentiableWithinAt ℝ f (Set.Ici x) x ∧ derivWithin f (Set.Ici x) x ∈ K}

full_name: RightDerivMeasurableAux.differentiable_set_eq_D
code: theorem differentiable_set_eq_D (hK : IsComplete K) :
    { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ K } = D f K 
goal: {x | DifferentiableWithinAt ℝ f (Set.Ici x) x ∧ derivWithin f (Set.Ici x) x ∈ K} = RightDerivMeasurableAux.D f K

full_name: measurableSet_of_differentiableWithinAt_Ici_of_isComplete
code: /-- The set of right differentiability points of a function, with derivative in a given complete
set, is Borel-measurable. -/
theorem measurableSet_of_differentiableWithinAt_Ici_of_isComplete {K : Set F} (hK : IsComplete K) :
    MeasurableSet { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ K } 
goal: MeasurableSet {x | DifferentiableWithinAt ℝ f (Set.Ici x) x ∧ derivWithin f (Set.Ici x) x ∈ K}

full_name: measurableSet_of_differentiableWithinAt_Ici
code: /-- The set of right differentiability points of a function taking values in a complete space is
Borel-measurable. -/
theorem measurableSet_of_differentiableWithinAt_Ici :
    MeasurableSet { x | DifferentiableWithinAt ℝ f (Ici x) x } 
goal: MeasurableSet {x | DifferentiableWithinAt ℝ f (Set.Ici x) x}

full_name: measurable_derivWithin_Ici
code: @[measurability, fun_prop]
theorem measurable_derivWithin_Ici [MeasurableSpace F] [BorelSpace F] :
    Measurable fun x => derivWithin f (Ici x) x 
goal: Measurable fun x => derivWithin f (Set.Ici x) x

full_name: stronglyMeasurable_derivWithin_Ici
code: theorem stronglyMeasurable_derivWithin_Ici :
    StronglyMeasurable (fun x ↦ derivWithin f (Ici x) x) 
goal: MeasureTheory.StronglyMeasurable fun x => derivWithin f (Set.Ici x) x

full_name: aemeasurable_derivWithin_Ici
code: theorem aemeasurable_derivWithin_Ici [MeasurableSpace F] [BorelSpace F] (μ : Measure ℝ) :
    AEMeasurable (fun x => derivWithin f (Ici x) x) μ 
goal: AEMeasurable (fun x => derivWithin f (Set.Ici x) x) μ

full_name: aestronglyMeasurable_derivWithin_Ici
code: theorem aestronglyMeasurable_derivWithin_Ici (μ : Measure ℝ) :
    AEStronglyMeasurable (fun x => derivWithin f (Ici x) x) μ 
goal: MeasureTheory.AEStronglyMeasurable (fun x => derivWithin f (Set.Ici x) x) μ

full_name: measurableSet_of_differentiableWithinAt_Ioi
code: /-- The set of right differentiability points of a function taking values in a complete space is
Borel-measurable. -/
theorem measurableSet_of_differentiableWithinAt_Ioi :
    MeasurableSet { x | DifferentiableWithinAt ℝ f (Ioi x) x } 
goal: MeasurableSet {x | DifferentiableWithinAt ℝ f (Set.Ioi x) x}

full_name: measurable_derivWithin_Ioi
code: @[measurability, fun_prop]
theorem measurable_derivWithin_Ioi [MeasurableSpace F] [BorelSpace F] :
    Measurable fun x => derivWithin f (Ioi x) x 
goal: Measurable fun x => derivWithin f (Set.Ioi x) x

full_name: stronglyMeasurable_derivWithin_Ioi
code: theorem stronglyMeasurable_derivWithin_Ioi :
    StronglyMeasurable (fun x ↦ derivWithin f (Ioi x) x) 
goal: MeasureTheory.StronglyMeasurable fun x => derivWithin f (Set.Ioi x) x

full_name: aemeasurable_derivWithin_Ioi
code: theorem aemeasurable_derivWithin_Ioi [MeasurableSpace F] [BorelSpace F] (μ : Measure ℝ) :
    AEMeasurable (fun x => derivWithin f (Ioi x) x) μ 
goal: AEMeasurable (fun x => derivWithin f (Set.Ioi x) x) μ

full_name: aestronglyMeasurable_derivWithin_Ioi
code: theorem aestronglyMeasurable_derivWithin_Ioi (μ : Measure ℝ) :
    AEStronglyMeasurable (fun x => derivWithin f (Ioi x) x) μ 
goal: MeasureTheory.AEStronglyMeasurable (fun x => derivWithin f (Set.Ioi x) x) μ

full_name: FDerivMeasurableAux.isOpen_A_with_param
code: lemma isOpen_A_with_param {r s : ℝ} (hf : Continuous f.uncurry) (L : E →L[𝕜] F) :
    IsOpen {p : α × E | p.2 ∈ A (f p.1) L r s} 
goal: IsOpen {p | p.2 ∈ FDerivMeasurableAux.A (f p.1) L r s}

full_name: FDerivMeasurableAux.isOpen_B_with_param
code: lemma isOpen_B_with_param {r s t : ℝ} (hf : Continuous f.uncurry) (K : Set (E →L[𝕜] F)) :
    IsOpen {p : α × E | p.2 ∈ B (f p.1) K r s t} 
goal: IsOpen {p | p.2 ∈ FDerivMeasurableAux.B (f p.1) K r s t}

full_name: measurableSet_of_differentiableAt_of_isComplete_with_param
code: theorem measurableSet_of_differentiableAt_of_isComplete_with_param
    (hf : Continuous f.uncurry) {K : Set (E →L[𝕜] F)} (hK : IsComplete K) :
    MeasurableSet {p : α × E | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ K} 
goal: MeasurableSet {p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ K}

full_name: measurableSet_of_differentiableAt_with_param
code: /-- The set of differentiability points of a continuous function depending on a parameter taking
values in a complete space is Borel-measurable. -/
theorem measurableSet_of_differentiableAt_with_param (hf : Continuous f.uncurry) :
    MeasurableSet {p : α × E | DifferentiableAt 𝕜 (f p.1) p.2} 
goal: MeasurableSet {p | DifferentiableAt 𝕜 (f p.1) p.2}

full_name: measurable_fderiv_with_param
code: theorem measurable_fderiv_with_param (hf : Continuous f.uncurry) :
    Measurable (fun (p : α × E) ↦ fderiv 𝕜 (f p.1) p.2) 
goal: Measurable fun p => fderiv 𝕜 (f p.1) p.2

full_name: measurable_fderiv_apply_const_with_param
code: theorem measurable_fderiv_apply_const_with_param [MeasurableSpace F] [BorelSpace F]
    (hf : Continuous f.uncurry) (y : E) :
    Measurable (fun (p : α × E) ↦ fderiv 𝕜 (f p.1) p.2 y) 
goal: Measurable fun p => (fderiv 𝕜 (f p.1) p.2) y

full_name: measurable_deriv_with_param
code: theorem measurable_deriv_with_param [LocallyCompactSpace 𝕜] [MeasurableSpace 𝕜]
    [OpensMeasurableSpace 𝕜] [MeasurableSpace F]
    [BorelSpace F] {f : α → 𝕜 → F} (hf : Continuous f.uncurry) :
    Measurable (fun (p : α × 𝕜) ↦ deriv (f p.1) p.2) 
goal: Measurable fun p => deriv (f p.1) p.2

full_name: stronglyMeasurable_deriv_with_param
code: theorem stronglyMeasurable_deriv_with_param [LocallyCompactSpace 𝕜] [MeasurableSpace 𝕜]
    [OpensMeasurableSpace 𝕜] [h : SecondCountableTopologyEither α F]
    {f : α → 𝕜 → F} (hf : Continuous f.uncurry) :
    StronglyMeasurable (fun (p : α × 𝕜) ↦ deriv (f p.1) p.2) 
goal: MeasureTheory.StronglyMeasurable fun p => deriv (f p.1) p.2

full_name: aemeasurable_deriv_with_param
code: theorem aemeasurable_deriv_with_param [LocallyCompactSpace 𝕜] [MeasurableSpace 𝕜]
    [OpensMeasurableSpace 𝕜] [MeasurableSpace F]
    [BorelSpace F] {f : α → 𝕜 → F} (hf : Continuous f.uncurry) (μ : Measure (α × 𝕜)) :
    AEMeasurable (fun (p : α × 𝕜) ↦ deriv (f p.1) p.2) μ 
goal: AEMeasurable (fun p => deriv (f p.1) p.2) μ

full_name: aestronglyMeasurable_deriv_with_param
code: theorem aestronglyMeasurable_deriv_with_param [LocallyCompactSpace 𝕜] [MeasurableSpace 𝕜]
    [OpensMeasurableSpace 𝕜] [SecondCountableTopologyEither α F]
    {f : α → 𝕜 → F} (hf : Continuous f.uncurry) (μ : Measure (α × 𝕜)) :
    AEStronglyMeasurable (fun (p : α × 𝕜) ↦ deriv (f p.1) p.2) μ 
goal: MeasureTheory.AEStronglyMeasurable (fun p => deriv (f p.1) p.2) μ