l3lab/ntp-mathlib huggingface dataset:
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  

Proof state:
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f : α → F
hf : Memℒp f p
hfm : AEStronglyMeasurable' m f μ
f_Lp : ↥(Lp F p) := toLp f hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
⊢ P ↑↑f_Lp

Next tactic:
refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
  · 

Proof state:
case refine'_1
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f : α → F
hf : Memℒp f p
hfm : AEStronglyMeasurable' m f μ
f_Lp : ↥(Lp F p) := toLp f hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
⊢ ∀ (c : F) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤),
    (fun f => P ↑↑f) ↑(Lp.simpleFunc.indicatorConst p (_ : MeasurableSet s) (_ : ↑↑μ s ≠ ⊤) c)

Next tactic:
intro c s hs hμs
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
  · intro c s hs hμs
    

Proof state:
case refine'_1
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f : α → F
hf : Memℒp f p
hfm : AEStronglyMeasurable' m f μ
f_Lp : ↥(Lp F p) := toLp f hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
c : F
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s < ⊤
⊢ P ↑↑↑(Lp.simpleFunc.indicatorConst p (_ : MeasurableSet s) (_ : ↑↑μ s ≠ ⊤) c)

Next tactic:
rw [Lp.simpleFunc.coe_indicatorConst]
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
  · intro c s hs hμs
    rw [Lp.simpleFunc.coe_indicatorConst]
    

Proof state:
case refine'_1
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f : α → F
hf : Memℒp f p
hfm : AEStronglyMeasurable' m f μ
f_Lp : ↥(Lp F p) := toLp f hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
c : F
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s < ⊤
⊢ P ↑↑(indicatorConstLp p (_ : MeasurableSet s) (_ : ↑↑μ s ≠ ⊤) c)

Next tactic:
refine' h_ae indicatorConstLp_coeFn.symm _ (h_ind c hs hμs)
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
  · intro c s hs hμs
    rw [Lp.simpleFunc.coe_indicatorConst]
    refine' h_ae indicatorConstLp_coeFn.symm _ (h_ind c hs hμs)
    

Proof state:
case refine'_1
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f : α → F
hf : Memℒp f p
hfm : AEStronglyMeasurable' m f μ
f_Lp : ↥(Lp F p) := toLp f hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
c : F
s : Set α
hs : MeasurableSet s
hμs : ↑↑μ s < ⊤
⊢ Memℒp (Set.indicator s fun x => c) p

Next tactic:
exact memℒp_indicator_const p (hm s hs) c (Or.inr hμs.ne)
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
  · intro c s hs hμs
    rw [Lp.simpleFunc.coe_indicatorConst]
    refine' h_ae indicatorConstLp_coeFn.symm _ (h_ind c hs hμs)
    exact memℒp_indicator_const p (hm s hs) c (Or.inr hμs.ne)
  · 

Proof state:
case refine'_2
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f : α → F
hf : Memℒp f p
hfm : AEStronglyMeasurable' m f μ
f_Lp : ↥(Lp F p) := toLp f hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
⊢ ∀ ⦃f g : α → F⦄ (hf : Memℒp f p) (hg : Memℒp g p),
    StronglyMeasurable f →
      StronglyMeasurable g →
        Disjoint (Function.support f) (Function.support g) →
          (fun f => P ↑↑f) (toLp f hf) → (fun f => P ↑↑f) (toLp g hg) → (fun f => P ↑↑f) (toLp f hf + toLp g hg)

Next tactic:
intro f g hf_mem hg_mem hfm hgm h_disj hfP hgP
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
  · intro c s hs hμs
    rw [Lp.simpleFunc.coe_indicatorConst]
    refine' h_ae indicatorConstLp_coeFn.symm _ (h_ind c hs hμs)
    exact memℒp_indicator_const p (hm s hs) c (Or.inr hμs.ne)
  · intro f g hf_mem hg_mem hfm hgm h_disj hfP hgP
    

Proof state:
case refine'_2
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f✝ : α → F
hf : Memℒp f✝ p
hfm✝ : AEStronglyMeasurable' m f✝ μ
f_Lp : ↥(Lp F p) := toLp f✝ hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
f g : α → F
hf_mem : Memℒp f p
hg_mem : Memℒp g p
hfm : StronglyMeasurable f
hgm : StronglyMeasurable g
h_disj : Disjoint (Function.support f) (Function.support g)
hfP : P ↑↑(toLp f hf_mem)
hgP : P ↑↑(toLp g hg_mem)
⊢ P ↑↑(toLp f hf_mem + toLp g hg_mem)

Next tactic:
have hfP' : P f := h_ae hf_mem.coeFn_toLp (Lp.memℒp _) hfP
/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄ (_ : Memℒp f p μ) (_ : AEStronglyMeasurable' m f μ), P f := by
  intro f hf hfm
  let f_Lp := hf.toLp f
  have hfm_Lp : AEStronglyMeasurable' m f_Lp μ := hfm.congr hf.coeFn_toLp.symm
  refine' h_ae hf.coeFn_toLp (Lp.memℒp _) _
  change P f_Lp
  -- Porting note: `P` should be an explicit argument to `Lp.induction_stronglyMeasurable`, but
  -- it isn't?
  refine' Lp.induction_stronglyMeasurable hm hp_ne_top (P := fun f => P f) _ _ h_closed f_Lp hfm_Lp
  · intro c s hs hμs
    rw [Lp.simpleFunc.coe_indicatorConst]
    refine' h_ae indicatorConstLp_coeFn.symm _ (h_ind c hs hμs)
    exact memℒp_indicator_const p (hm s hs) c (Or.inr hμs.ne)
  · intro f g hf_mem hg_mem hfm hgm h_disj hfP hgP
    have hfP' : P f := h_ae hf_mem.coeFn_toLp (Lp.memℒp _) hfP
    

Proof state:
case refine'_2
α : Type u_1
E' : Type u_2
F : Type u_3
F' : Type u_4
𝕜 : Type u_5
p : ℝ≥0∞
inst✝¹² : IsROrC 𝕜
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : InnerProductSpace 𝕜 E'
inst✝⁹ : CompleteSpace E'
inst✝⁸ : NormedSpace ℝ E'
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
inst✝⁵ : NormedAddCommGroup F'
inst✝⁴ : NormedSpace 𝕜 F'
inst✝³ : NormedSpace ℝ F'
inst✝² : CompleteSpace F'
m m0 : MeasurableSpace α
μ : Measure α
inst✝¹ : Fact (1 ≤ p)
inst✝ : NormedSpace ℝ F
hm : m ≤ m0
hp_ne_top : p ≠ ⊤
P : (α → F) → Prop
h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)
h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      Memℒp f p → Memℒp g p → StronglyMeasurable f → StronglyMeasurable g → P f → P g → P (f + g)
h_closed : IsClosed {f | P ↑↑↑f}
h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g
f✝ : α → F
hf : Memℒp f✝ p
hfm✝ : AEStronglyMeasurable' m f✝ μ
f_Lp : ↥(Lp F p) := toLp f✝ hf
hfm_Lp : AEStronglyMeasurable' m (↑↑f_Lp) μ
f g : α → F
hf_mem : Memℒp f p
hg_mem : Memℒp g p
hfm : StronglyMeasurable f
hgm : StronglyMeasurable g
h_disj : Disjoint (Function.support f) (Function.support g)
hfP : P ↑↑(toLp f hf_mem)
hgP : P ↑↑(toLp g hg_mem)
hfP' : P f
⊢ P ↑↑(toLp f hf_mem + toLp g hg_mem)

Next tactic:
have hgP' : P g := h_ae hg_mem.coeFn_toLp (Lp.memℒp _) hgP