-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1S_nonneg (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0)
    (h_add : FinMeasAdditive μ T)
    (hT_nonneg : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, 0 ≤ x → 0 ≤ T s x) {f : α →₁ₛ[μ] G''}
    (hf : 0 ≤ f) : 0 ≤ setToL1S T f

Proof state:
case intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
f'' : α →ₛ G''
hf'' : 0 ≤ f''
hff'' : ↑↑↑f =ᶠ[ae μ] ⇑f''
⊢ ∃ f', 0 ≤ f' ∧ ⇑(toSimpleFunc f) =ᶠ[ae μ] ⇑f'

Tactic:
exact ⟨f'', hf'', (Lp.simpleFunc.toSimpleFunc_eq_toFun f).trans hff''⟩

Result:
no goals

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
⊢ ∃ f', 0 ≤ f' ∧ ⇑(toSimpleFunc f) =ᶠ[ae μ] ⇑f'

Tactic:
obtain ⟨f'', hf'', hff''⟩ := exists_simpleFunc_nonneg_ae_eq hf

Result:
case intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
f'' : α →ₛ G''
hf'' : 0 ≤ f''
hff'' : ↑↑↑f =ᶠ[ae μ] ⇑f''
⊢ ∃ f', 0 ≤ f' ∧ ⇑(toSimpleFunc f) =ᶠ[ae μ] ⇑f'

Proof state:
case intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
f' : α →ₛ G''
hf' : 0 ≤ f'
hff' : ⇑(toSimpleFunc f) =ᶠ[ae μ] ⇑f'
⊢ 0 ≤ SimpleFunc.setToSimpleFunc T (toSimpleFunc f)

Tactic:
rw [SimpleFunc.setToSimpleFunc_congr _ h_zero h_add (SimpleFunc.integrable _) hff']

Result:
case intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
f' : α →ₛ G''
hf' : 0 ≤ f'
hff' : ⇑(toSimpleFunc f) =ᶠ[ae μ] ⇑f'
⊢ 0 ≤ SimpleFunc.setToSimpleFunc T f'

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
⊢ 0 ≤ SimpleFunc.setToSimpleFunc T (toSimpleFunc f)

Tactic:
obtain ⟨f', hf', hff'⟩ : ∃ f' : α →ₛ G'', 0 ≤ f' ∧ simpleFunc.toSimpleFunc f =ᵐ[μ] f' := by
  obtain ⟨f'', hf'', hff''⟩ := exists_simpleFunc_nonneg_ae_eq hf
  exact ⟨f'', hf'', (Lp.simpleFunc.toSimpleFunc_eq_toFun f).trans hff''⟩

Result:
case intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
f' : α →ₛ G''
hf' : 0 ≤ f'
hff' : ⇑(toSimpleFunc f) =ᶠ[ae μ] ⇑f'
⊢ 0 ≤ SimpleFunc.setToSimpleFunc T (toSimpleFunc f)

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
⊢ 0 ≤ setToL1S T f

Tactic:
simp_rw [setToL1S]

Result:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
⊢ 0 ≤ SimpleFunc.setToSimpleFunc T (toSimpleFunc f)

Proof state:
case intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
G'' : Type u_7
G' : Type u_8
inst✝³ : NormedLatticeAddCommGroup G'
inst✝² : NormedSpace ℝ G'
inst✝¹ : NormedLatticeAddCommGroup G''
inst✝ : NormedSpace ℝ G''
T : Set α → G'' →L[ℝ] G'
h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0
h_add : FinMeasAdditive μ T
hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G''), 0 ≤ x → 0 ≤ (T s) x
f : ↥(simpleFunc G'' 1 μ)
hf : 0 ≤ f
f' : α →ₛ G''
hf' : 0 ≤ f'
hff' : ⇑(toSimpleFunc f) =ᶠ[ae μ] ⇑f'
⊢ 0 ≤ SimpleFunc.setToSimpleFunc T f'

Tactic:
exact
  SimpleFunc.setToSimpleFunc_nonneg' T hT_nonneg _ hf' ((SimpleFunc.integrable f).congr hff')

Result:
no goals