l3lab/ntp-mathlib huggingface dataset:
theorem memℒp_of_finite_measure_preimage (p : ℝ≥0∞) {f : α →ₛ E}
    (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) : Memℒp f p μ := by
  by_cases hp0 : p = 0
  · rw [hp0, memℒp_zero_iff_aestronglyMeasurable]; exact f.aestronglyMeasurable
  by_cases hp_top : p = ∞
  · rw [hp_top]; exact memℒp_top f μ
  refine' ⟨f.aestronglyMeasurable, _⟩
  rw [snorm_eq_snorm' hp0 hp_top, f.snorm'_eq]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p✝ p : ℝ≥0∞
f : α →ₛ E
hf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
hp0 : ¬p = 0
hp_top : ¬p = ⊤
⊢ (∑ y in SimpleFunc.range f, ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y})) ^ (1 / ENNReal.toReal p) < ⊤

Next tactic:
refine' ENNReal.rpow_lt_top_of_nonneg (by simp) (ENNReal.sum_lt_top_iff.mpr fun y _ => _).ne
theorem memℒp_of_finite_measure_preimage (p : ℝ≥0∞) {f : α →ₛ E}
    (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) : Memℒp f p μ := by
  by_cases hp0 : p = 0
  · rw [hp0, memℒp_zero_iff_aestronglyMeasurable]; exact f.aestronglyMeasurable
  by_cases hp_top : p = ∞
  · rw [hp_top]; exact memℒp_top f μ
  refine' ⟨f.aestronglyMeasurable, _⟩
  rw [snorm_eq_snorm' hp0 hp_top, f.snorm'_eq]
  refine' ENNReal.rpow_lt_top_of_nonneg (by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p✝ p : ℝ≥0∞
f : α →ₛ E
hf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
hp0 : ¬p = 0
hp_top : ¬p = ⊤
⊢ 0 ≤ 1 / ENNReal.toReal p

Next tactic:
simp
theorem memℒp_of_finite_measure_preimage (p : ℝ≥0∞) {f : α →ₛ E}
    (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) : Memℒp f p μ := by
  by_cases hp0 : p = 0
  · rw [hp0, memℒp_zero_iff_aestronglyMeasurable]; exact f.aestronglyMeasurable
  by_cases hp_top : p = ∞
  · rw [hp_top]; exact memℒp_top f μ
  refine' ⟨f.aestronglyMeasurable, _⟩
  rw [snorm_eq_snorm' hp0 hp_top, f.snorm'_eq]
  refine' ENNReal.rpow_lt_top_of_nonneg (by simp) (ENNReal.sum_lt_top_iff.mpr fun y _ => _).ne
  

Proof state:
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p✝ p : ℝ≥0∞
f : α →ₛ E
hf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
hp0 : ¬p = 0
hp_top : ¬p = ⊤
y : E
x✝ : y ∈ SimpleFunc.range f
⊢ ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤

Next tactic:
by_cases hy0 : y = 0
theorem memℒp_of_finite_measure_preimage (p : ℝ≥0∞) {f : α →ₛ E}
    (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) : Memℒp f p μ := by
  by_cases hp0 : p = 0
  · rw [hp0, memℒp_zero_iff_aestronglyMeasurable]; exact f.aestronglyMeasurable
  by_cases hp_top : p = ∞
  · rw [hp_top]; exact memℒp_top f μ
  refine' ⟨f.aestronglyMeasurable, _⟩
  rw [snorm_eq_snorm' hp0 hp_top, f.snorm'_eq]
  refine' ENNReal.rpow_lt_top_of_nonneg (by simp) (ENNReal.sum_lt_top_iff.mpr fun y _ => _).ne
  by_cases hy0 : y = 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p✝ p : ℝ≥0∞
f : α →ₛ E
hf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
hp0 : ¬p = 0
hp_top : ¬p = ⊤
y : E
x✝ : y ∈ SimpleFunc.range f
hy0 : y = 0
⊢ ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤

Next tactic:
simp [hy0, ENNReal.toReal_pos hp0 hp_top]
theorem memℒp_of_finite_measure_preimage (p : ℝ≥0∞) {f : α →ₛ E}
    (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) : Memℒp f p μ := by
  by_cases hp0 : p = 0
  · rw [hp0, memℒp_zero_iff_aestronglyMeasurable]; exact f.aestronglyMeasurable
  by_cases hp_top : p = ∞
  · rw [hp_top]; exact memℒp_top f μ
  refine' ⟨f.aestronglyMeasurable, _⟩
  rw [snorm_eq_snorm' hp0 hp_top, f.snorm'_eq]
  refine' ENNReal.rpow_lt_top_of_nonneg (by simp) (ENNReal.sum_lt_top_iff.mpr fun y _ => _).ne
  by_cases hy0 : y = 0
  · simp [hy0, ENNReal.toReal_pos hp0 hp_top]
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p✝ p : ℝ≥0∞
f : α →ₛ E
hf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
hp0 : ¬p = 0
hp_top : ¬p = ⊤
y : E
x✝ : y ∈ SimpleFunc.range f
hy0 : ¬y = 0
⊢ ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤

Next tactic:
refine' ENNReal.mul_lt_top _ (hf y hy0).ne
theorem memℒp_of_finite_measure_preimage (p : ℝ≥0∞) {f : α →ₛ E}
    (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) : Memℒp f p μ := by
  by_cases hp0 : p = 0
  · rw [hp0, memℒp_zero_iff_aestronglyMeasurable]; exact f.aestronglyMeasurable
  by_cases hp_top : p = ∞
  · rw [hp_top]; exact memℒp_top f μ
  refine' ⟨f.aestronglyMeasurable, _⟩
  rw [snorm_eq_snorm' hp0 hp_top, f.snorm'_eq]
  refine' ENNReal.rpow_lt_top_of_nonneg (by simp) (ENNReal.sum_lt_top_iff.mpr fun y _ => _).ne
  by_cases hy0 : y = 0
  · simp [hy0, ENNReal.toReal_pos hp0 hp_top]
  · refine' ENNReal.mul_lt_top _ (hf y hy0).ne
    

Proof state:
case neg
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p✝ p : ℝ≥0∞
f : α →ₛ E
hf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
hp0 : ¬p = 0
hp_top : ¬p = ⊤
y : E
x✝ : y ∈ SimpleFunc.range f
hy0 : ¬y = 0
⊢ ↑‖y‖₊ ^ ENNReal.toReal p ≠ ⊤

Next tactic:
exact (ENNReal.rpow_lt_top_of_nonneg ENNReal.toReal_nonneg ENNReal.coe_ne_top).ne
theorem integrable_pair {f : α →ₛ E} {g : α →ₛ F} :
    Integrable f μ → Integrable g μ → Integrable (pair f g) μ := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p : ℝ≥0∞
f : α →ₛ E
g : α →ₛ F
⊢ Integrable ↑f → Integrable ↑g → Integrable ↑(pair f g)

Next tactic:
simpa only [integrable_iff_finMeasSupp] using FinMeasSupp.pair
theorem measure_support_lt_top [Zero β] (f : α →ₛ β) (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) :
    μ (support f) < ∞ := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
μ : Measure α
p : ℝ≥0∞
inst✝ : Zero β
f : α →ₛ β
hf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
⊢ ↑↑μ (support ↑f) < ⊤

Next tactic:
rw [support_eq]
theorem measure_support_lt_top [Zero β] (f : α →ₛ β) (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) :
    μ (support f) < ∞ := by
  rw [support_eq]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
μ : Measure α
p : ℝ≥0∞
inst✝ : Zero β
f : α →ₛ β
hf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
⊢ ↑↑μ (⋃ y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f), ↑f ⁻¹' {y}) < ⊤

Next tactic:
refine' (measure_biUnion_finset_le _ _).trans_lt (ENNReal.sum_lt_top_iff.mpr fun y hy => _)
theorem measure_support_lt_top [Zero β] (f : α →ₛ β) (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) :
    μ (support f) < ∞ := by
  rw [support_eq]
  refine' (measure_biUnion_finset_le _ _).trans_lt (ENNReal.sum_lt_top_iff.mpr fun y hy => _)
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
μ : Measure α
p : ℝ≥0∞
inst✝ : Zero β
f : α →ₛ β
hf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
y : β
hy : y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f)
⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤

Next tactic:
rw [Finset.mem_filter] at hy
theorem measure_support_lt_top [Zero β] (f : α →ₛ β) (hf : ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞) :
    μ (support f) < ∞ := by
  rw [support_eq]
  refine' (measure_biUnion_finset_le _ _).trans_lt (ENNReal.sum_lt_top_iff.mpr fun y hy => _)
  rw [Finset.mem_filter] at hy
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
μ : Measure α
p : ℝ≥0∞
inst✝ : Zero β
f : α →ₛ β
hf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
y : β
hy : y ∈ SimpleFunc.range f ∧ y ≠ 0
⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤

Next tactic:
exact hf y hy.2
theorem measure_lt_top_of_memℒp_indicator (hp_pos : p ≠ 0) (hp_ne_top : p ≠ ∞) {c : E} (hc : c ≠ 0)
    {s : Set α} (hs : MeasurableSet s) (hcs : Memℒp ((const α c).piecewise s hs (const α 0)) p μ) :
    μ s < ⊤ := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p : ℝ≥0∞
hp_pos : p ≠ 0
hp_ne_top : p ≠ ⊤
c : E
hc : c ≠ 0
s : Set α
hs : MeasurableSet s
hcs : Memℒp (↑(piecewise s hs (const α c) (const α 0))) p
⊢ ↑↑μ s < ⊤

Next tactic:
have : Function.support (const α c) = Set.univ := Function.support_const hc
theorem measure_lt_top_of_memℒp_indicator (hp_pos : p ≠ 0) (hp_ne_top : p ≠ ∞) {c : E} (hc : c ≠ 0)
    {s : Set α} (hs : MeasurableSet s) (hcs : Memℒp ((const α c).piecewise s hs (const α 0)) p μ) :
    μ s < ⊤ := by
  have : Function.support (const α c) = Set.univ := Function.support_const hc
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
μ : Measure α
p : ℝ≥0∞
hp_pos : p ≠ 0
hp_ne_top : p ≠ ⊤
c : E
hc : c ≠ 0
s : Set α
hs : MeasurableSet s
hcs : Memℒp (↑(piecewise s hs (const α c) (const α 0))) p
this : support ↑(const α c) = Set.univ
⊢ ↑↑μ s < ⊤

Next tactic:
simpa only [memℒp_iff_finMeasSupp hp_pos hp_ne_top, finMeasSupp_iff_support,
    support_indicator, Set.inter_univ, this] using hcs
/-- `Lp.simpleFunc` is a subspace of Lp consisting of equivalence classes of an integrable simple
    function. -/
def simpleFunc : AddSubgroup (Lp E p μ) where
  carrier := { f : Lp E p μ | ∃ s : α →ₛ E, (AEEqFun.mk s s.aestronglyMeasurable : α →ₘ[μ] E) = f }
  zero_mem' := ⟨0, rfl⟩
  add_mem' := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
⊢ ∀ {a b : ↥(Lp E p)},
    a ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
      b ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
        a + b ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}

Next tactic:
rintro f g ⟨s, hs⟩ ⟨t, ht⟩
/-- `Lp.simpleFunc` is a subspace of Lp consisting of equivalence classes of an integrable simple
    function. -/
def simpleFunc : AddSubgroup (Lp E p μ) where
  carrier := { f : Lp E p μ | ∃ s : α →ₛ E, (AEEqFun.mk s s.aestronglyMeasurable : α →ₘ[μ] E) = f }
  zero_mem' := ⟨0, rfl⟩
  add_mem' := by
    rintro f g ⟨s, hs⟩ ⟨t, ht⟩
    

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
t : α →ₛ E
ht : AEEqFun.mk ↑t (_ : AEStronglyMeasurable (↑t) μ) = ↑g
⊢ f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}

Next tactic:
use s + t
/-- `Lp.simpleFunc` is a subspace of Lp consisting of equivalence classes of an integrable simple
    function. -/
def simpleFunc : AddSubgroup (Lp E p μ) where
  carrier := { f : Lp E p μ | ∃ s : α →ₛ E, (AEEqFun.mk s s.aestronglyMeasurable : α →ₘ[μ] E) = f }
  zero_mem' := ⟨0, rfl⟩
  add_mem' := by
    rintro f g ⟨s, hs⟩ ⟨t, ht⟩
    use s + t
    

Proof state:
case h
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f g : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
t : α →ₛ E
ht : AEEqFun.mk ↑t (_ : AEStronglyMeasurable (↑t) μ) = ↑g
⊢ AEEqFun.mk ↑(s + t) (_ : AEStronglyMeasurable (↑(s + t)) μ) = ↑(f + g)

Next tactic:
simp only [← hs, ← ht, AEEqFun.mk_add_mk, AddSubgroup.coe_add, AEEqFun.mk_eq_mk,
      SimpleFunc.coe_add]
/-- `Lp.simpleFunc` is a subspace of Lp consisting of equivalence classes of an integrable simple
    function. -/
def simpleFunc : AddSubgroup (Lp E p μ) where
  carrier := { f : Lp E p μ | ∃ s : α →ₛ E, (AEEqFun.mk s s.aestronglyMeasurable : α →ₘ[μ] E) = f }
  zero_mem' := ⟨0, rfl⟩
  add_mem' := by
    rintro f g ⟨s, hs⟩ ⟨t, ht⟩
    use s + t
    simp only [← hs, ← ht, AEEqFun.mk_add_mk, AddSubgroup.coe_add, AEEqFun.mk_eq_mk,
      SimpleFunc.coe_add]
  neg_mem' := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
⊢ ∀ {x : ↥(Lp E p)},
    x ∈
        {
              toAddSubsemigroup :=
                { carrier := {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f},
                  add_mem' :=
                    (_ :
                      ∀ {f g : ↥(Lp E p)},
                        f ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
                          g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
                            f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}) },
              zero_mem' := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑0) }.toAddSubsemigroup.carrier →
      -x ∈
        {
              toAddSubsemigroup :=
                { carrier := {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f},
                  add_mem' :=
                    (_ :
                      ∀ {f g : ↥(Lp E p)},
                        f ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
                          g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
                            f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}) },
              zero_mem' := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑0) }.toAddSubsemigroup.carrier

Next tactic:
rintro f ⟨s, hs⟩
/-- `Lp.simpleFunc` is a subspace of Lp consisting of equivalence classes of an integrable simple
    function. -/
def simpleFunc : AddSubgroup (Lp E p μ) where
  carrier := { f : Lp E p μ | ∃ s : α →ₛ E, (AEEqFun.mk s s.aestronglyMeasurable : α →ₘ[μ] E) = f }
  zero_mem' := ⟨0, rfl⟩
  add_mem' := by
    rintro f g ⟨s, hs⟩ ⟨t, ht⟩
    use s + t
    simp only [← hs, ← ht, AEEqFun.mk_add_mk, AddSubgroup.coe_add, AEEqFun.mk_eq_mk,
      SimpleFunc.coe_add]
  neg_mem' := by
    rintro f ⟨s, hs⟩
    

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
⊢ -f ∈
    {
          toAddSubsemigroup :=
            { carrier := {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f},
              add_mem' :=
                (_ :
                  ∀ {f g : ↥(Lp E p)},
                    f ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
                      g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →
                        f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}) },
          zero_mem' := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑0) }.toAddSubsemigroup.carrier

Next tactic:
use -s
/-- `Lp.simpleFunc` is a subspace of Lp consisting of equivalence classes of an integrable simple
    function. -/
def simpleFunc : AddSubgroup (Lp E p μ) where
  carrier := { f : Lp E p μ | ∃ s : α →ₛ E, (AEEqFun.mk s s.aestronglyMeasurable : α →ₘ[μ] E) = f }
  zero_mem' := ⟨0, rfl⟩
  add_mem' := by
    rintro f g ⟨s, hs⟩ ⟨t, ht⟩
    use s + t
    simp only [← hs, ← ht, AEEqFun.mk_add_mk, AddSubgroup.coe_add, AEEqFun.mk_eq_mk,
      SimpleFunc.coe_add]
  neg_mem' := by
    rintro f ⟨s, hs⟩
    use -s
    

Proof state:
case h
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
⊢ AEEqFun.mk ↑(-s) (_ : AEStronglyMeasurable (↑(-s)) μ) = ↑(-f)

Next tactic:
simp only [← hs, AEEqFun.neg_mk, SimpleFunc.coe_neg, AEEqFun.mk_eq_mk, AddSubgroup.coe_neg]
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a `SMul`. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def smul : SMul 𝕜 (Lp.simpleFunc E p μ) :=
  ⟨fun k f =>
    ⟨k • (f : Lp E p μ), by
      

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
k : 𝕜
f : ↥(simpleFunc E p μ)
⊢ k • ↑f ∈ simpleFunc E p μ

Next tactic:
rcases f with ⟨f, ⟨s, hs⟩⟩
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a `SMul`. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def smul : SMul 𝕜 (Lp.simpleFunc E p μ) :=
  ⟨fun k f =>
    ⟨k • (f : Lp E p μ), by
      rcases f with ⟨f, ⟨s, hs⟩⟩
      

Proof state:
case mk.intro
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
k : 𝕜
f : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
⊢ k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) } ∈ simpleFunc E p μ

Next tactic:
use k • s
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a `SMul`. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def smul : SMul 𝕜 (Lp.simpleFunc E p μ) :=
  ⟨fun k f =>
    ⟨k • (f : Lp E p μ), by
      rcases f with ⟨f, ⟨s, hs⟩⟩
      use k • s
      

Proof state:
case h
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
k : 𝕜
f : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
⊢ AEEqFun.mk ↑(k • s) (_ : AEStronglyMeasurable (↑(k • s)) μ) =
    ↑(k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) })

Next tactic:
apply Eq.trans (AEEqFun.smul_mk k s s.aestronglyMeasurable).symm _
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a `SMul`. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def smul : SMul 𝕜 (Lp.simpleFunc E p μ) :=
  ⟨fun k f =>
    ⟨k • (f : Lp E p μ), by
      rcases f with ⟨f, ⟨s, hs⟩⟩
      use k • s
      apply Eq.trans (AEEqFun.smul_mk k s s.aestronglyMeasurable).symm _
      

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
k : 𝕜
f : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
⊢ k • AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) =
    ↑(k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) })

Next tactic:
rw [hs]
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a `SMul`. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def smul : SMul 𝕜 (Lp.simpleFunc E p μ) :=
  ⟨fun k f =>
    ⟨k • (f : Lp E p μ), by
      rcases f with ⟨f, ⟨s, hs⟩⟩
      use k • s
      apply Eq.trans (AEEqFun.smul_mk k s s.aestronglyMeasurable).symm _
      rw [hs]
      

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
k : 𝕜
f : ↥(Lp E p)
s : α →ₛ E
hs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f
⊢ k • ↑f = ↑(k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) })

Next tactic:
rfl
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a module. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def module : Module 𝕜 (Lp.simpleFunc E p μ) where
  one_smul f := by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
f : ↥(simpleFunc E p μ)
⊢ 1 • f = f

Next tactic:
ext1
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a module. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def module : Module 𝕜 (Lp.simpleFunc E p μ) where
  one_smul f := by ext1; 

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
f : ↥(simpleFunc E p μ)
⊢ ↑(1 • f) = ↑f

Next tactic:
exact one_smul _ _
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a module. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def module : Module 𝕜 (Lp.simpleFunc E p μ) where
  one_smul f := by ext1; exact one_smul _ _
  mul_smul x y f := by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
x y : 𝕜
f : ↥(simpleFunc E p μ)
⊢ (x * y) • f = x • y • f

Next tactic:
ext1
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a module. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def module : Module 𝕜 (Lp.simpleFunc E p μ) where
  one_smul f := by ext1; exact one_smul _ _
  mul_smul x y f := by ext1; 

Proof state:
case a
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
x y : 𝕜
f : ↥(simpleFunc E p μ)
⊢ ↑((x * y) • f) = ↑(x • y • f)

Next tactic:
exact mul_smul _ _ _
/-- If `E` is a normed space, `Lp.simpleFunc E p μ` is a module. Not declared as an
instance as it is (as of writing) used only in the construction of the Bochner integral. -/
protected def module : Module 𝕜 (Lp.simpleFunc E p μ) where
  one_smul f := by ext1; exact one_smul _ _
  mul_smul x y f := by ext1; exact mul_smul _ _ _
  smul_add x f g := by ext1; exact smul_add _ _ _
  smul_zero x := by 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
inst✝² : NormedRing 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : BoundedSMul 𝕜 E
x : 𝕜
⊢ x • 0 = 0

Next tactic:
ext1