[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
⊢ HasIntegral I l (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
    (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y)
[PROOFSTEP]
refine' HasIntegral.of_mul ‖y‖ fun ε ε0 => _
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ
ε0 : 0 < ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ε
[PROOFSTEP]
lift ε to ℝ≥0 using ε0.le
[GOAL]
case intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
rw [NNReal.coe_pos] at ε0 
[GOAL]
case intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
have A : μ (s ∩ Box.Icc I) ≠ ∞ := ((measure_mono <| Set.inter_subset_right _ _).trans_lt (I.measure_Icc_lt_top μ)).ne
[GOAL]
case intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
have B : μ (s ∩ I) ≠ ∞ := ((measure_mono <| Set.inter_subset_right _ _).trans_lt (I.measure_coe_lt_top μ)).ne
[GOAL]
case intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
obtain ⟨F, hFs, hFc, hμF⟩ : ∃ F, F ⊆ s ∩ Box.Icc I ∧ IsClosed F ∧ μ ((s ∩ Box.Icc I) \ F) < ε :=
  (hs.inter I.measurableSet_Icc).exists_isClosed_diff_lt A (ENNReal.coe_pos.2 ε0).ne'
[GOAL]
case intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
obtain ⟨U, hsU, hUo, hUt, hμU⟩ : ∃ U, s ∩ Box.Icc I ⊆ U ∧ IsOpen U ∧ μ U < ∞ ∧ μ (U \ (s ∩ Box.Icc I)) < ε :=
  (hs.inter I.measurableSet_Icc).exists_isOpen_diff_lt A (ENNReal.coe_pos.2 ε0).ne'
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
have : ∀ x ∈ s ∩ Box.Icc I, ∃ r : Ioi (0 : ℝ), closedBall x r ⊆ U := fun x hx =>
  by
  rcases nhds_basis_closedBall.mem_iff.1 (hUo.mem_nhds <| hsU hx) with ⟨r, hr₀, hr⟩
  exact ⟨⟨r, hr₀⟩, hr⟩
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
x : ι → ℝ
hx : x ∈ s ∩ ↑Box.Icc I
⊢ ∃ r, closedBall x ↑r ⊆ U
[PROOFSTEP]
rcases nhds_basis_closedBall.mem_iff.1 (hUo.mem_nhds <| hsU hx) with ⟨r, hr₀, hr⟩
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
x : ι → ℝ
hx : x ∈ s ∩ ↑Box.Icc I
r : ℝ
hr₀ : 0 < r
hr : closedBall x r ⊆ U
⊢ ∃ r, closedBall x ↑r ⊆ U
[PROOFSTEP]
exact ⟨⟨r, hr₀⟩, hr⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
this : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → ∃ r, closedBall x ↑r ⊆ U
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
choose! rs hrsU using this
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
have : ∀ x ∈ Box.Icc I \ s, ∃ r : Ioi (0 : ℝ), closedBall x r ⊆ Fᶜ := fun x hx =>
  by
  obtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 (hFc.isOpen_compl.mem_nhds fun hx' => hx.2 (hFs hx').1)
  exact ⟨⟨r, hr₀⟩, hr⟩
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
x : ι → ℝ
hx : x ∈ ↑Box.Icc I \ s
⊢ ∃ r, closedBall x ↑r ⊆ Fᶜ
[PROOFSTEP]
obtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 (hFc.isOpen_compl.mem_nhds fun hx' => hx.2 (hFs hx').1)
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
x : ι → ℝ
hx : x ∈ ↑Box.Icc I \ s
r : ℝ
hr₀ : 0 < r
hr : closedBall x r ⊆ Fᶜ
⊢ ∃ r, closedBall x ↑r ⊆ Fᶜ
[PROOFSTEP]
exact ⟨⟨r, hr₀⟩, hr⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
this : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → ∃ r, closedBall x ↑r ⊆ Fᶜ
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
choose! rs' hrs'F using this
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
set r : (ι → ℝ) → Ioi (0 : ℝ) := s.piecewise rs rs'
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
                (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
              ‖y‖ * ↑ε
[PROOFSTEP]
refine' ⟨fun _ => r, fun c => l.rCond_of_bRiemann_eq_false hl, fun c π hπ hπp => _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
      (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
    ‖y‖ * ↑ε
[PROOFSTEP]
rw [mul_comm]
  /- Then the union of boxes `J ∈ π` such that `π.tag ∈ s` includes `F` and is included by `U`,
      hence its measure is `ε`-close to the measure of `s`. -/
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (integralSum (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
      (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
    ↑ε * ‖y‖
[PROOFSTEP]
dsimp [integralSum]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • indicator s (fun x => y) (TaggedPrepartition.tag π J))
      (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y) ≤
    ↑ε * ‖y‖
[PROOFSTEP]
simp only [mem_closedBall, dist_eq_norm, ← indicator_const_smul_apply, sum_indicator_eq_sum_filter, ← sum_smul, ←
  sub_smul, norm_smul, Real.norm_eq_abs, ← Prepartition.filter_boxes, ← Prepartition.measure_iUnion_toReal]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
⊢ |ENNReal.toReal
            (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -
          ENNReal.toReal (↑↑μ (s ∩ ↑I))| *
      ‖y‖ ≤
    ↑ε * ‖y‖
[PROOFSTEP]
refine' mul_le_mul_of_nonneg_right _ (norm_nonneg y)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
⊢ |ENNReal.toReal
          (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -
        ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤
    ↑ε
[PROOFSTEP]
set t := (π.filter (π.tag · ∈ s)).iUnion
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
⊢ |ENNReal.toReal
          (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -
        ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤
    ↑ε
[PROOFSTEP]
change abs ((μ t).toReal - (μ (s ∩ I)).toReal) ≤ ε
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
⊢ |ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤ ↑ε
[PROOFSTEP]
have htU : t ⊆ U ∩ I :=
  by
  simp only [TaggedPrepartition.iUnion_def, iUnion_subset_iff, TaggedPrepartition.mem_filter, and_imp]
  refine' fun J hJ hJs x hx => ⟨hrsU _ ⟨hJs, π.tag_mem_Icc J⟩ _, π.le_of_mem' J hJ hx⟩
  simpa only [s.piecewise_eq_of_mem _ _ hJs] using hπ.1 J hJ (Box.coe_subset_Icc hx)
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
⊢ t ⊆ U ∩ ↑I
[PROOFSTEP]
simp only [TaggedPrepartition.iUnion_def, iUnion_subset_iff, TaggedPrepartition.mem_filter, and_imp]
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
⊢ ∀ (i : Box ι), i ∈ π → TaggedPrepartition.tag π i ∈ s → ↑i ⊆ U ∩ ↑I
[PROOFSTEP]
refine' fun J hJ hJs x hx => ⟨hrsU _ ⟨hJs, π.tag_mem_Icc J⟩ _, π.le_of_mem' J hJ hx⟩
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
J : Box ι
hJ : J ∈ π
hJs : TaggedPrepartition.tag π J ∈ s
x : ι → ℝ
hx : x ∈ ↑J
⊢ x ∈ closedBall (TaggedPrepartition.tag π J) ↑(rs (TaggedPrepartition.tag π J))
[PROOFSTEP]
simpa only [s.piecewise_eq_of_mem _ _ hJs] using hπ.1 J hJ (Box.coe_subset_Icc hx)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
⊢ |ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I))| ≤ ↑ε
[PROOFSTEP]
refine' abs_sub_le_iff.2 ⟨_, _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
⊢ ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I)) ≤ ↑ε
[PROOFSTEP]
refine' (ENNReal.le_toReal_sub B).trans (ENNReal.toReal_le_coe_of_le_coe _)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
⊢ ↑↑μ t - ↑↑μ (s ∩ ↑I) ≤ ↑ε
[PROOFSTEP]
refine' (tsub_le_tsub (measure_mono htU) le_rfl).trans (le_measure_diff.trans _)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
⊢ ↑↑μ ((U ∩ ↑I) \ (s ∩ ↑I)) ≤ ↑ε
[PROOFSTEP]
refine' (measure_mono fun x hx => _).trans hμU.le
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
x : ι → ℝ
hx : x ∈ (U ∩ ↑I) \ (s ∩ ↑I)
⊢ x ∈ U \ (s ∩ ↑Box.Icc I)
[PROOFSTEP]
exact ⟨hx.1.1, fun hx' => hx.2 ⟨hx'.1, hx.1.2⟩⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
⊢ ENNReal.toReal (↑↑μ (s ∩ ↑I)) - ENNReal.toReal (↑↑μ t) ≤ ↑ε
[PROOFSTEP]
have hμt : μ t ≠ ∞ := ((measure_mono (htU.trans (inter_subset_left _ _))).trans_lt hUt).ne
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
⊢ ENNReal.toReal (↑↑μ (s ∩ ↑I)) - ENNReal.toReal (↑↑μ t) ≤ ↑ε
[PROOFSTEP]
refine' (ENNReal.le_toReal_sub hμt).trans (ENNReal.toReal_le_coe_of_le_coe _)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
⊢ ↑↑μ (s ∩ ↑I) - ↑↑μ t ≤ ↑ε
[PROOFSTEP]
refine' le_measure_diff.trans ((measure_mono _).trans hμF.le)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
⊢ (s ∩ ↑I) \ t ⊆ (s ∩ ↑Box.Icc I) \ F
[PROOFSTEP]
rintro x ⟨⟨hxs, hxI⟩, hxt⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
x : ι → ℝ
hxt : ¬x ∈ t
hxs : x ∈ s
hxI : x ∈ ↑I
⊢ x ∈ (s ∩ ↑Box.Icc I) \ F
[PROOFSTEP]
refine' ⟨⟨hxs, Box.coe_subset_Icc hxI⟩, fun hxF => hxt _⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
x : ι → ℝ
hxt : ¬x ∈ t
hxs : x ∈ s
hxI : x ∈ ↑I
hxF : x ∈ F
⊢ x ∈ t
[PROOFSTEP]
simp only [TaggedPrepartition.iUnion_def, TaggedPrepartition.mem_filter, Set.mem_iUnion, exists_prop]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
x : ι → ℝ
hxt : ¬x ∈ t
hxs : x ∈ s
hxI : x ∈ ↑I
hxF : x ∈ F
⊢ ∃ i, (i ∈ π ∧ TaggedPrepartition.tag π i ∈ s) ∧ x ∈ ↑i
[PROOFSTEP]
rcases hπp x hxI with ⟨J, hJπ, hxJ⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
x : ι → ℝ
hxt : ¬x ∈ t
hxs : x ∈ s
hxI : x ∈ ↑I
hxF : x ∈ F
J : Box ι
hJπ : J ∈ π.toPrepartition
hxJ : x ∈ J
⊢ ∃ i, (i ∈ π ∧ TaggedPrepartition.tag π i ∈ s) ∧ x ∈ ↑i
[PROOFSTEP]
refine' ⟨J, ⟨hJπ, _⟩, hxJ⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
x : ι → ℝ
hxt : ¬x ∈ t
hxs : x ∈ s
hxI : x ∈ ↑I
hxF : x ∈ F
J : Box ι
hJπ : J ∈ π.toPrepartition
hxJ : x ∈ J
⊢ TaggedPrepartition.tag π J ∈ s
[PROOFSTEP]
contrapose hxF
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
x : ι → ℝ
hxt : ¬x ∈ t
hxs : x ∈ s
hxI : x ∈ ↑I
J : Box ι
hJπ : J ∈ π.toPrepartition
hxJ : x ∈ J
hxF : ¬TaggedPrepartition.tag π J ∈ s
⊢ ¬x ∈ F
[PROOFSTEP]
refine' hrs'F _ ⟨π.tag_mem_Icc J, hxF⟩ _
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
hl : l.bRiemann = false
s : Set (ι → ℝ)
hs : MeasurableSet s
I : Box ι
y : E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
ε : ℝ≥0
ε0 : 0 < ε
A : ↑↑μ (s ∩ ↑Box.Icc I) ≠ ⊤
B : ↑↑μ (s ∩ ↑I) ≠ ⊤
F : Set (ι → ℝ)
hFs : F ⊆ s ∩ ↑Box.Icc I
hFc : IsClosed F
hμF : ↑↑μ ((s ∩ ↑Box.Icc I) \ F) < ↑ε
U : Set (ι → ℝ)
hsU : s ∩ ↑Box.Icc I ⊆ U
hUo : IsOpen U
hUt : ↑↑μ U < ⊤
hμU : ↑↑μ (U \ (s ∩ ↑Box.Icc I)) < ↑ε
rs : (ι → ℝ) → ↑(Set.Ioi 0)
hrsU : ∀ (x : ι → ℝ), x ∈ s ∩ ↑Box.Icc I → closedBall x ↑(rs x) ⊆ U
rs' : (ι → ℝ) → ↑(Set.Ioi 0)
hrs'F : ∀ (x : ι → ℝ), x ∈ ↑Box.Icc I \ s → closedBall x ↑(rs' x) ⊆ Fᶜ
r : (ι → ℝ) → ↑(Set.Ioi 0) := Set.piecewise s rs rs'
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
hπp : TaggedPrepartition.IsPartition π
t : Set (ι → ℝ) := TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun x => TaggedPrepartition.tag π x ∈ s)
htU : t ⊆ U ∩ ↑I
hμt : ↑↑μ t ≠ ⊤
x : ι → ℝ
hxt : ¬x ∈ t
hxs : x ∈ s
hxI : x ∈ ↑I
J : Box ι
hJπ : J ∈ π.toPrepartition
hxJ : x ∈ J
hxF : ¬TaggedPrepartition.tag π J ∈ s
⊢ x ∈ closedBall (TaggedPrepartition.tag π J) ↑(rs' (TaggedPrepartition.tag π J))
[PROOFSTEP]
simpa only [s.piecewise_eq_of_not_mem _ _ hxF] using hπ.1 J hJπ (Box.coe_subset_Icc hxJ)
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : f =ᵐ[Measure.restrict μ ↑I] 0
hl : l.bRiemann = false
⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) 0
[PROOFSTEP]
refine' hasIntegral_iff.2 fun ε ε0 => _
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : f =ᵐ[Measure.restrict μ ↑I] 0
hl : l.bRiemann = false
ε : ℝ
ε0 : ε > 0
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ε
[PROOFSTEP]
lift ε to ℝ≥0 using ε0.lt.le
[GOAL]
case intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : f =ᵐ[Measure.restrict μ ↑I] 0
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : ↑ε > 0
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
rw [gt_iff_lt, NNReal.coe_pos] at ε0 
[GOAL]
case intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : f =ᵐ[Measure.restrict μ ↑I] 0
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
rcases NNReal.exists_pos_sum_of_countable ε0.ne' ℕ with ⟨δ, δ0, c, hδc, hcε⟩
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : f =ᵐ[Measure.restrict μ ↑I] 0
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
haveI := Fact.mk (I.measure_coe_lt_top μ)
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : f =ᵐ[Measure.restrict μ ↑I] 0
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
change μ.restrict I {x | f x ≠ 0} = 0 at hf 
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
set N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
have N0 : ∀ {x}, N x = 0 ↔ f x = 0 := by simp
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
⊢ ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
[PROOFSTEP]
simp
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
have : ∀ n, ∃ U, N ⁻¹' { n } ⊆ U ∧ IsOpen U ∧ μ.restrict I U < δ n / n :=
  by
  refine' fun n => (N ⁻¹' { n }).exists_isOpen_lt_of_lt _ _
  cases' n with n
  · simpa [ENNReal.div_zero (ENNReal.coe_pos.2 (δ0 _)).ne'] using measure_lt_top (μ.restrict I) _
  · refine' (measure_mono_null _ hf).le.trans_lt _
    · exact fun x hxN hxf => n.succ_ne_zero ((Eq.symm hxN).trans <| N0.2 hxf)
    · simp [(δ0 _).ne']
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
⊢ ∀ (n : ℕ), ∃ U, N ⁻¹' {n} ⊆ U ∧ IsOpen U ∧ ↑↑(Measure.restrict μ ↑I) U < ↑(δ n) / ↑n
[PROOFSTEP]
refine' fun n => (N ⁻¹' { n }).exists_isOpen_lt_of_lt _ _
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
n : ℕ
⊢ ↑↑(Measure.restrict μ ↑I) (N ⁻¹' {n}) < ↑(δ n) / ↑n
[PROOFSTEP]
cases' n with n
[GOAL]
case zero
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
⊢ ↑↑(Measure.restrict μ ↑I) (N ⁻¹' {Nat.zero}) < ↑(δ Nat.zero) / ↑Nat.zero
[PROOFSTEP]
simpa [ENNReal.div_zero (ENNReal.coe_pos.2 (δ0 _)).ne'] using measure_lt_top (μ.restrict I) _
[GOAL]
case succ
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
n : ℕ
⊢ ↑↑(Measure.restrict μ ↑I) (N ⁻¹' {Nat.succ n}) < ↑(δ (Nat.succ n)) / ↑(Nat.succ n)
[PROOFSTEP]
refine' (measure_mono_null _ hf).le.trans_lt _
[GOAL]
case succ.refine'_1
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
n : ℕ
⊢ N ⁻¹' {Nat.succ n} ⊆ {x | f x ≠ 0}
[PROOFSTEP]
exact fun x hxN hxf => n.succ_ne_zero ((Eq.symm hxN).trans <| N0.2 hxf)
[GOAL]
case succ.refine'_2
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
n : ℕ
⊢ 0 < ↑(δ (Nat.succ n)) / ↑(Nat.succ n)
[PROOFSTEP]
simp [(δ0 _).ne']
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this✝ : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
this : ∀ (n : ℕ), ∃ U, N ⁻¹' {n} ⊆ U ∧ IsOpen U ∧ ↑↑(Measure.restrict μ ↑I) U < ↑(δ n) / ↑n
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
choose U hNU hUo hμU using this
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
have : ∀ x, ∃ r : Ioi (0 : ℝ), closedBall x r ⊆ U (N x) := fun x =>
  by
  obtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 ((hUo _).mem_nhds (hNU _ rfl))
  exact ⟨⟨r, hr₀⟩, hr⟩
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
x : ι → ℝ
⊢ ∃ r, closedBall x ↑r ⊆ U (N x)
[PROOFSTEP]
obtain ⟨r, hr₀, hr⟩ := nhds_basis_closedBall.mem_iff.1 ((hUo _).mem_nhds (hNU _ rfl))
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
x : ι → ℝ
r : ℝ
hr₀ : 0 < r
hr : closedBall ?m.310267 r ⊆ U (N ?m.310267)
⊢ ∃ r, closedBall x ↑r ⊆ U (N x)
[PROOFSTEP]
exact ⟨⟨r, hr₀⟩, hr⟩
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this✝ : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
this : ∀ (x : ι → ℝ), ∃ r, closedBall x ↑r ⊆ U (N x)
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
choose r hrU using this
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
refine' ⟨fun _ => r, fun c => l.rCond_of_bRiemann_eq_false hl, fun c π hπ _ => _⟩
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
⊢ dist (integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) 0 ≤ ↑ε
[PROOFSTEP]
rw [dist_eq_norm, sub_zero, ← integralSum_fiberwise fun J => N (π.tag J)]
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
⊢ ‖∑ y in Finset.image (fun J => N (TaggedPrepartition.tag π J)) π.boxes,
        integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
          (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = y)‖ ≤
    ↑ε
[PROOFSTEP]
refine' le_trans _ (NNReal.coe_lt_coe.2 hcε).le
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
⊢ ‖∑ y in Finset.image (fun J => N (TaggedPrepartition.tag π J)) π.boxes,
        integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
          (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = y)‖ ≤
    ↑c✝
[PROOFSTEP]
refine' (norm_sum_le_of_le _ _).trans (sum_le_hasSum _ (fun n _ => (δ n).2) (NNReal.hasSum_coe.2 hδc))
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
⊢ ∀ (b : ℕ),
    b ∈ Finset.image (fun J => N (TaggedPrepartition.tag π J)) π.boxes →
      ‖integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
            (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = b)‖ ≤
        ↑(δ b)
[PROOFSTEP]
rintro n -
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
⊢ ‖integralSum f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
        (TaggedPrepartition.filter π fun x => N (TaggedPrepartition.tag π x) = n)‖ ≤
    ↑(δ n)
[PROOFSTEP]
dsimp [integralSum]
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
⊢ ‖∑ J in (TaggedPrepartition.filter π fun x => ⌈‖f (TaggedPrepartition.tag π x)‖⌉₊ = n).toPrepartition.boxes,
        ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤
    ↑(δ n)
[PROOFSTEP]
have : ∀ J ∈ π.filter fun J => N (π.tag J) = n, ‖(μ ↑J).toReal • f (π.tag J)‖ ≤ (μ J).toReal * n := fun J hJ ↦
  by
  rw [TaggedPrepartition.mem_filter] at hJ 
  rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]
  exact mul_le_mul_of_nonneg_left (hJ.2 ▸ Nat.le_ceil _) ENNReal.toReal_nonneg
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
J : Box ι
hJ : J ∈ TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n
⊢ ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n
[PROOFSTEP]
rw [TaggedPrepartition.mem_filter] at hJ 
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
J : Box ι
hJ : J ∈ π ∧ N (TaggedPrepartition.tag π J) = n
⊢ ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n
[PROOFSTEP]
rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
J : Box ι
hJ : J ∈ π ∧ N (TaggedPrepartition.tag π J) = n
⊢ ENNReal.toReal (↑↑μ ↑J) * ‖f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n
[PROOFSTEP]
exact mul_le_mul_of_nonneg_left (hJ.2 ▸ Nat.le_ceil _) ENNReal.toReal_nonneg
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this✝ : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
this :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n) →
      ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n
⊢ ‖∑ J in (TaggedPrepartition.filter π fun x => ⌈‖f (TaggedPrepartition.tag π x)‖⌉₊ = n).toPrepartition.boxes,
        ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤
    ↑(δ n)
[PROOFSTEP]
refine' (norm_sum_le_of_le _ this).trans _
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this✝ : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
this :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n) →
      ‖ENNReal.toReal (↑↑μ ↑J) • f (TaggedPrepartition.tag π J)‖ ≤ ENNReal.toReal (↑↑μ ↑J) * ↑n
⊢ ∑ b in (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n).toPrepartition.boxes,
      ENNReal.toReal (↑↑μ ↑b) * ↑n ≤
    ↑(δ n)
[PROOFSTEP]
clear this
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
⊢ ∑ b in (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n).toPrepartition.boxes,
      ENNReal.toReal (↑↑μ ↑b) * ↑n ≤
    ↑(δ n)
[PROOFSTEP]
rw [← sum_mul, ← Prepartition.measure_iUnion_toReal]
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
⊢ ENNReal.toReal
        (↑↑μ
          (Prepartition.iUnion
            (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n).toPrepartition)) *
      ↑n ≤
    ↑(δ n)
[PROOFSTEP]
generalize hm : μ (π.filter fun J => N (π.tag J) = n).iUnion = m
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0∞
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m
⊢ ENNReal.toReal m * ↑n ≤ ↑(δ n)
[PROOFSTEP]
have : m < δ n / n := by
  simp only [Measure.restrict_apply (hUo _).measurableSet] at hμU 
  refine' hm ▸ (measure_mono _).trans_lt (hμU _)
  simp only [Set.subset_def, TaggedPrepartition.mem_iUnion, TaggedPrepartition.mem_filter]
  rintro x ⟨J, ⟨hJ, rfl⟩, hx⟩
  exact ⟨hrU _ (hπ.1 _ hJ (Box.coe_subset_Icc hx)), π.le_of_mem' J hJ hx⟩
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0∞
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m
⊢ m < ↑(δ n) / ↑n
[PROOFSTEP]
simp only [Measure.restrict_apply (hUo _).measurableSet] at hμU 
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0∞
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m
hμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n
⊢ m < ↑(δ n) / ↑n
[PROOFSTEP]
refine' hm ▸ (measure_mono _).trans_lt (hμU _)
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0∞
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m
hμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n
⊢ TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n) ⊆ U n ∩ ↑I
[PROOFSTEP]
simp only [Set.subset_def, TaggedPrepartition.mem_iUnion, TaggedPrepartition.mem_filter]
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0∞
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m
hμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n
⊢ ∀ (x : ι → ℝ), (∃ J, (J ∈ π ∧ ⌈‖f (TaggedPrepartition.tag π J)‖⌉₊ = n) ∧ x ∈ J) → x ∈ U n ∩ ↑I
[PROOFSTEP]
rintro x ⟨J, ⟨hJ, rfl⟩, hx⟩
[GOAL]
case intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
m : ℝ≥0∞
hμU : ∀ (n : ℕ), ↑↑μ (U n ∩ ↑I) < ↑(δ n) / ↑n
x : ι → ℝ
J : Box ι
hx : x ∈ J
hJ : J ∈ π
hm :
  ↑↑μ
      (TaggedPrepartition.iUnion
        (TaggedPrepartition.filter π fun J_1 =>
          N (TaggedPrepartition.tag π J_1) = ⌈‖f (TaggedPrepartition.tag π J)‖⌉₊)) =
    m
⊢ x ∈ U ⌈‖f (TaggedPrepartition.tag π J)‖⌉₊ ∩ ↑I
[PROOFSTEP]
exact ⟨hrU _ (hπ.1 _ hJ (Box.coe_subset_Icc hx)), π.le_of_mem' J hJ hx⟩
[GOAL]
case intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this✝ : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0∞
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = m
this : m < ↑(δ n) / ↑n
⊢ ENNReal.toReal m * ↑n ≤ ↑(δ n)
[PROOFSTEP]
lift m to ℝ≥0 using ne_top_of_lt this
[GOAL]
case intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this✝ : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = ↑m
this : ↑m < ↑(δ n) / ↑n
⊢ ENNReal.toReal ↑m * ↑n ≤ ↑(δ n)
[PROOFSTEP]
rw [ENNReal.coe_toReal, ← NNReal.coe_nat_cast, ← NNReal.coe_mul, NNReal.coe_le_coe, ← ENNReal.coe_le_coe,
  ENNReal.coe_mul, ENNReal.coe_nat, mul_comm]
[GOAL]
case intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hl : l.bRiemann = false
ε : ℝ≥0
ε0 : 0 < ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
this✝ : Fact (↑↑μ ↑I < ⊤)
hf : ↑↑(Measure.restrict μ ↑I) {x | f x ≠ 0} = 0
N : (ι → ℝ) → ℕ := fun x => ⌈‖f x‖⌉₊
N0 : ∀ {x : ι → ℝ}, N x = 0 ↔ f x = 0
U : ℕ → Set (ι → ℝ)
hNU : ∀ (n : ℕ), N ⁻¹' {n} ⊆ U n
hUo : ∀ (n : ℕ), IsOpen (U n)
hμU : ∀ (n : ℕ), ↑↑(Measure.restrict μ ↑I) (U n) < ↑(δ n) / ↑n
r : (ι → ℝ) → ↑(Set.Ioi 0)
hrU : ∀ (x : ι → ℝ), closedBall x ↑(r x) ⊆ U (N x)
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c ((fun x => r) c) π
x✝ : TaggedPrepartition.IsPartition π
n : ℕ
m : ℝ≥0
hm : ↑↑μ (TaggedPrepartition.iUnion (TaggedPrepartition.filter π fun J => N (TaggedPrepartition.tag π J) = n)) = ↑m
this : ↑m < ↑(δ n) / ↑n
⊢ ↑n * ↑m ≤ ↑(δ n)
[PROOFSTEP]
exact (mul_le_mul_left' this.le _).trans ENNReal.mul_div_le
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
y : E
f g : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y
hfg : f =ᵐ[Measure.restrict μ ↑I] g
hl : l.bRiemann = false
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y
[PROOFSTEP]
have : g - f =ᵐ[μ.restrict I] 0 := hfg.mono fun x hx => sub_eq_zero.2 hx.symm
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
l : IntegrationParams
I : Box ι
y : E
f g : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
hf : HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y
hfg : f =ᵐ[Measure.restrict μ ↑I] g
hl : l.bRiemann = false
this : g - f =ᵐ[Measure.restrict μ ↑I] 0
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) y
[PROOFSTEP]
simpa using hf.add (HasIntegral.of_aeEq_zero this hl)
[GOAL]
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f : SimpleFunc (ι → ℝ) E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
⊢ HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)
[PROOFSTEP]
induction' f using MeasureTheory.SimpleFunc.induction with y s hs f g _ hfi hgi
[GOAL]
case h_ind
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
y : E
s : Set (ι → ℝ)
hs : MeasurableSet s
⊢ HasIntegral I l (↑(piecewise s hs (const (ι → ℝ) y) (const (ι → ℝ) 0)))
    (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
    (integral (Measure.restrict μ ↑I) (piecewise s hs (const (ι → ℝ) y) (const (ι → ℝ) 0)))
[PROOFSTEP]
simpa only [Measure.restrict_apply hs, const_zero, integral_piecewise_zero, integral_const, Measure.restrict_apply,
  MeasurableSet.univ, Set.univ_inter] using BoxIntegral.hasIntegralIndicatorConst l hl hs I y μ
[GOAL]
case h_add
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
f g : SimpleFunc (ι → ℝ) E
a✝ : Disjoint (Function.support ↑f) (Function.support ↑g)
hfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)
hgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)
⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
    (integral (Measure.restrict μ ↑I) (f + g))
[PROOFSTEP]
borelize E
[GOAL]
case h_add
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
f g : SimpleFunc (ι → ℝ) E
a✝ : Disjoint (Function.support ↑f) (Function.support ↑g)
hfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)
hgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
    (integral (Measure.restrict μ ↑I) (f + g))
[PROOFSTEP]
haveI := Fact.mk (I.measure_coe_lt_top μ)
[GOAL]
case h_add
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
f g : SimpleFunc (ι → ℝ) E
a✝ : Disjoint (Function.support ↑f) (Function.support ↑g)
hfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)
hgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : Fact (↑↑μ ↑I < ⊤)
⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
    (integral (Measure.restrict μ ↑I) (f + g))
[PROOFSTEP]
rw [integral_add]
[GOAL]
case h_add
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
f g : SimpleFunc (ι → ℝ) E
a✝ : Disjoint (Function.support ↑f) (Function.support ↑g)
hfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)
hgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : Fact (↑↑μ ↑I < ⊤)
⊢ HasIntegral I l (↑(f + g)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
    (integral (Measure.restrict μ ↑I) f + integral (Measure.restrict μ ↑I) g)
case h_add.hf
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
f g : SimpleFunc (ι → ℝ) E
a✝ : Disjoint (Function.support ↑f) (Function.support ↑g)
hfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)
hgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : Fact (↑↑μ ↑I < ⊤)
⊢ Integrable ↑f
case h_add.hg
ι : Type u
E : Type v
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
f g : SimpleFunc (ι → ℝ) E
a✝ : Disjoint (Function.support ↑f) (Function.support ↑g)
hfi : HasIntegral I l (↑f) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) f)
hgi : HasIntegral I l (↑g) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (integral (Measure.restrict μ ↑I) g)
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
this : Fact (↑↑μ ↑I < ⊤)
⊢ Integrable ↑g
[PROOFSTEP]
exacts [hfi.add hgi, integrable_iff.2 fun _ _ => measure_lt_top _ _, integrable_iff.2 fun _ _ => measure_lt_top _ _]
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
hf : IntegrableOn f ↑I
l : IntegrationParams
hl : l.bRiemann = false
⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)
[PROOFSTEP]
borelize E
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
hf : IntegrableOn f ↑I
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)
[PROOFSTEP]
rcases hf.aestronglyMeasurable with ⟨g, hg, hfg⟩
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
hf : IntegrableOn f ↑I
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
hfg : f =ᵐ[Measure.restrict μ ↑I] g
⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)
[PROOFSTEP]
haveI : SeparableSpace (range g ∪ {0} : Set E) := hg.separableSpace_range_union_singleton
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
hf : IntegrableOn f ↑I
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
hfg : f =ᵐ[Measure.restrict μ ↑I] g
this : SeparableSpace ↑(Set.range g ∪ {0})
⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (x : ι → ℝ) in ↑I, f x ∂μ)
[PROOFSTEP]
rw [integral_congr_ae hfg]
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
hf : IntegrableOn f ↑I
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
hfg : f =ᵐ[Measure.restrict μ ↑I] g
this : SeparableSpace ↑(Set.range g ∪ {0})
⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
have hgi : IntegrableOn g I μ := (integrable_congr hfg).1 hf
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
hf : IntegrableOn f ↑I
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
hfg : f =ᵐ[Measure.restrict μ ↑I] g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
⊢ HasIntegral I l f (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
refine' BoxIntegral.HasIntegral.congr_ae _ hfg.symm hl
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
hf : IntegrableOn f ↑I
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
hfg : f =ᵐ[Measure.restrict μ ↑I] g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
clear! f
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
set f : ℕ → SimpleFunc (ι → ℝ) E := SimpleFunc.approxOn g hg.measurable (range g ∪ {0}) 0 (by simp)
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
⊢ 0 ∈ Set.range g ∪ {0}
[PROOFSTEP]
simp
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
have hfi : ∀ n, IntegrableOn (f n) I μ := SimpleFunc.integrable_approxOn_range hg.measurable hgi
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
have hfi' := fun n => ((f n).hasBoxIntegral μ I l hl).integrable
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
have hfg_mono : ∀ (x) {m n}, m ≤ n → ‖f n x - g x‖ ≤ ‖f m x - g x‖ :=
  by
  intro x m n hmn
  rw [← dist_eq_norm, ← dist_eq_norm, dist_nndist, dist_nndist, NNReal.coe_le_coe, ← ENNReal.coe_le_coe, ← edist_nndist,
    ← edist_nndist]
  exact SimpleFunc.edist_approxOn_mono hg.measurable _ x hmn
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
⊢ ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
[PROOFSTEP]
intro x m n hmn
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
x : ι → ℝ
m n : ℕ
hmn : m ≤ n
⊢ ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
[PROOFSTEP]
rw [← dist_eq_norm, ← dist_eq_norm, dist_nndist, dist_nndist, NNReal.coe_le_coe, ← ENNReal.coe_le_coe, ← edist_nndist, ←
  edist_nndist]
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
x : ι → ℝ
m n : ℕ
hmn : m ≤ n
⊢ edist (↑(f n) x) (g x) ≤ edist (↑(f m) x) (g x)
[PROOFSTEP]
exact SimpleFunc.edist_approxOn_mono hg.measurable _ x hmn
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
⊢ HasIntegral I l g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) (∫ (a : ι → ℝ) in ↑I, g a ∂μ)
[PROOFSTEP]
refine' HasIntegral.of_mul ((μ I).toReal + 1 + 1) fun ε ε0 => _
[GOAL]
case intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ
ε0 : 0 < ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ε
[PROOFSTEP]
lift ε to ℝ≥0 using ε0.le
[GOAL]
case intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
rw [NNReal.coe_pos] at ε0 
[GOAL]
case intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
have ε0' := ENNReal.coe_pos.2 ε0
[GOAL]
case intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
obtain ⟨N₀, hN₀⟩ : ∃ N : ℕ, ∫ x in I, ‖f N x - g x‖ ∂μ ≤ ε :=
  by
  have : Tendsto (fun n => ∫⁻ x in I, ‖f n x - g x‖₊ ∂μ) atTop (𝓝 0) :=
    SimpleFunc.tendsto_approxOn_range_L1_nnnorm hg.measurable hgi
  refine' (this.eventually (ge_mem_nhds ε0')).exists.imp fun N hN => _
  exact integral_coe_le_of_lintegral_coe_le hN
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
⊢ ∃ N, ∫ (x : ι → ℝ) in ↑I, ‖↑(f N) x - g x‖ ∂μ ≤ ↑ε
[PROOFSTEP]
have : Tendsto (fun n => ∫⁻ x in I, ‖f n x - g x‖₊ ∂μ) atTop (𝓝 0) :=
  SimpleFunc.tendsto_approxOn_range_L1_nnnorm hg.measurable hgi
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
this : Tendsto (fun n => ∫⁻ (x : ι → ℝ) in ↑I, ↑‖↑(f n) x - g x‖₊ ∂μ) atTop (𝓝 0)
⊢ ∃ N, ∫ (x : ι → ℝ) in ↑I, ‖↑(f N) x - g x‖ ∂μ ≤ ↑ε
[PROOFSTEP]
refine' (this.eventually (ge_mem_nhds ε0')).exists.imp fun N hN => _
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
this : Tendsto (fun n => ∫⁻ (x : ι → ℝ) in ↑I, ↑‖↑(f n) x - g x‖₊ ∂μ) atTop (𝓝 0)
N : ℕ
hN : ∫⁻ (x : ι → ℝ) in ↑I, ↑‖↑(f N) x - g x‖₊ ∂μ ≤ ↑ε
⊢ ∫ (x : ι → ℝ) in ↑I, ‖↑(f N) x - g x‖ ∂μ ≤ ↑ε
[PROOFSTEP]
exact integral_coe_le_of_lintegral_coe_le hN
[GOAL]
case intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
have : ∀ x, ∃ N₁, N₀ ≤ N₁ ∧ dist (f N₁ x) (g x) ≤ ε := fun x ↦
  by
  have : Tendsto (f · x) atTop (𝓝 <| g x) := SimpleFunc.tendsto_approxOn hg.measurable _ (subset_closure (by simp))
  exact ((eventually_ge_atTop N₀).and <| this <| closedBall_mem_nhds _ ε0).exists
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
x : ι → ℝ
⊢ ∃ N₁, N₀ ≤ N₁ ∧ dist (↑(f N₁) x) (g x) ≤ ↑ε
[PROOFSTEP]
have : Tendsto (f · x) atTop (𝓝 <| g x) := SimpleFunc.tendsto_approxOn hg.measurable _ (subset_closure (by simp))
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
x : ι → ℝ
⊢ g x ∈ Set.range g ∪ {0}
[PROOFSTEP]
simp
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
x : ι → ℝ
this : Tendsto (fun x_1 => ↑(f x_1) x) atTop (𝓝 (g x))
⊢ ∃ N₁, N₀ ≤ N₁ ∧ dist (↑(f N₁) x) (g x) ≤ ↑ε
[PROOFSTEP]
exact ((eventually_ge_atTop N₀).and <| this <| closedBall_mem_nhds _ ε0).exists
[GOAL]
case intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
this : ∀ (x : ι → ℝ), ∃ N₁, N₀ ≤ N₁ ∧ dist (↑(f N₁) x) (g x) ≤ ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
choose Nx hNx hNxε using this
[GOAL]
case intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
rcases NNReal.exists_pos_sum_of_countable ε0.ne' ℕ with
  ⟨δ, δ0, c, hδc, hcε⟩
    /- Since each simple function `fᵢ` is integrable, there exists `rᵢ : ℝⁿ → (0, ∞)` such that
        the integral sum of `f` over any tagged prepartition is `δᵢ`-close to the sum of integrals
        of `fᵢ` over the boxes of this prepartition. For each `x`, we choose `r (Nx x)` as the radius
        at `x`. -/
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
set r : ℝ≥0 → (ι → ℝ) → Ioi (0 : ℝ) := fun c x => (hfi' <| Nx x).convergenceR (δ <| Nx x) c x
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c : ℝ≥0
hδc : HasSum δ c
hcε : c < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
⊢ ∃ r,
    (∀ (c : ℝ≥0), IntegrationParams.RCond l (r c)) ∧
      ∀ (c : ℝ≥0) (π : TaggedPrepartition I),
        IntegrationParams.MemBaseSet l I c (r c) π →
          TaggedPrepartition.IsPartition π →
            dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
              (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
refine'
  ⟨r, fun c => l.rCond_of_bRiemann_eq_false hl, fun c π hπ hπp => _⟩
    /- Now we prove the estimate in 3 "jumps": first we replace `g x` in the formula for the
        integral sum by `f (Nx x)`; then we replace each `μ J • f (Nx (π.tag J)) (π.tag J)`
        by the Bochner integral of `f (Nx (π.tag J)) x` over `J`, then we jump to the Bochner
        integral of `g`. -/
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π) (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
refine'
  (dist_triangle4 _ (∑ J in π.boxes, (μ J).toReal • f (Nx <| π.tag J) (π.tag J))
        (∑ J in π.boxes, ∫ x in J, f (Nx <| π.tag J) x ∂μ) _).trans
    _
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
          (∑ J in π.boxes,
            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) +
        dist
          (∑ J in π.boxes,
            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
          (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) +
      dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
        (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    (ENNReal.toReal (↑↑μ ↑I) + 1 + 1) * ↑ε
[PROOFSTEP]
rw [add_mul, add_mul, one_mul]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
          (∑ J in π.boxes,
            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) +
        dist
          (∑ J in π.boxes,
            ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
          (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) +
      dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
        (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    ENNReal.toReal (↑↑μ ↑I) * ↑ε + ↑ε + ↑ε
[PROOFSTEP]
refine' add_le_add_three _ _ _
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (integralSum g (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) π)
      (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) ≤
    ENNReal.toReal (↑↑μ ↑I) * ↑ε
[PROOFSTEP]
rw [← hπp.iUnion_eq, π.measure_iUnion_toReal, sum_mul, integralSum]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (∑ J in π.boxes, ↑(↑(BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) J) (g (TaggedPrepartition.tag π J)))
      (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) ≤
    ∑ x in π.boxes, ENNReal.toReal (↑↑μ ↑x) * ↑ε
[PROOFSTEP]
refine' dist_sum_sum_le_of_le _ fun J _ => _
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
J : Box ι
x✝ : J ∈ π.boxes
⊢ dist (↑(↑(BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) J) (g (TaggedPrepartition.tag π J)))
      (ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J)) ≤
    ENNReal.toReal (↑↑μ ↑J) * ↑ε
[PROOFSTEP]
dsimp
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
J : Box ι
x✝ : J ∈ π.boxes
⊢ dist (ENNReal.toReal (↑↑μ ↑J) • g (TaggedPrepartition.tag π J))
      (ENNReal.toReal (↑↑μ ↑J) •
        ↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
              (Nx (TaggedPrepartition.tag π J)))
          (TaggedPrepartition.tag π J)) ≤
    ENNReal.toReal (↑↑μ ↑J) * ↑ε
[PROOFSTEP]
rw [dist_eq_norm, ← smul_sub, norm_smul, Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
J : Box ι
x✝ : J ∈ π.boxes
⊢ ENNReal.toReal (↑↑μ ↑J) *
      ‖g (TaggedPrepartition.tag π J) -
          ↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
                (Nx (TaggedPrepartition.tag π J)))
            (TaggedPrepartition.tag π J)‖ ≤
    ENNReal.toReal (↑↑μ ↑J) * ↑ε
[PROOFSTEP]
refine' mul_le_mul_of_nonneg_left _ ENNReal.toReal_nonneg
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
J : Box ι
x✝ : J ∈ π.boxes
⊢ ‖g (TaggedPrepartition.tag π J) -
        ↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
              (Nx (TaggedPrepartition.tag π J)))
          (TaggedPrepartition.tag π J)‖ ≤
    ↑ε
[PROOFSTEP]
rw [← dist_eq_norm']
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
J : Box ι
x✝ : J ∈ π.boxes
⊢ dist
      (↑(SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
            (Nx (TaggedPrepartition.tag π J)))
        (TaggedPrepartition.tag π J))
      (g (TaggedPrepartition.tag π J)) ≤
    ↑ε
[PROOFSTEP]
exact hNxε _
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (∑ J in π.boxes, ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
      (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤
    ↑ε
[PROOFSTEP]
rw [← π.sum_fiberwise fun J => Nx (π.tag J), ← π.sum_fiberwise fun J => Nx (π.tag J)]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist
      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,
        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,
          ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,
        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,
          ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤
    ↑ε
[PROOFSTEP]
refine' le_trans _ (NNReal.coe_lt_coe.2 hcε).le
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist
      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,
        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,
          ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
      (∑ y in Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes,
        ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = y).boxes,
          ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤
    ↑c✝
[PROOFSTEP]
refine' (dist_sum_sum_le_of_le _ fun n hn => _).trans (sum_le_hasSum _ (fun n _ => (δ n).2) (NNReal.hasSum_coe.2 hδc))
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
⊢ dist
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤
    ↑(δ n)
[PROOFSTEP]
have hNxn : ∀ J ∈ π.filter fun J => Nx (π.tag J) = n, Nx (π.tag J) = n := fun J hJ => (π.mem_filter.1 hJ).2
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
⊢ dist
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤
    ↑(δ n)
[PROOFSTEP]
have hrn : ∀ J ∈ π.filter fun J => Nx (π.tag J) = n, r c (π.tag J) = (hfi' n).convergenceR (δ n) c (π.tag J) :=
  fun J hJ ↦ by
  obtain rfl := hNxn J hJ
  rfl
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
J : Box ι
hJ : J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n
⊢ r c (TaggedPrepartition.tag π J) =
    Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ n)) c (TaggedPrepartition.tag π J)
[PROOFSTEP]
obtain rfl := hNxn J hJ
[GOAL]
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
J : Box ι
hn : Nx (TaggedPrepartition.tag π J) ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J_1 : Box ι),
    (J_1 ∈ TaggedPrepartition.filter π fun J_2 => Nx (TaggedPrepartition.tag π J_2) = Nx (TaggedPrepartition.tag π J)) →
      Nx (TaggedPrepartition.tag π J_1) = Nx (TaggedPrepartition.tag π J)
hJ : J ∈ TaggedPrepartition.filter π fun J_1 => Nx (TaggedPrepartition.tag π J_1) = Nx (TaggedPrepartition.tag π J)
⊢ r c (TaggedPrepartition.tag π J) =
    Integrable.convergenceR
      (_ :
        BoxIntegral.Integrable I l (↑(f (Nx (TaggedPrepartition.tag π J))))
          (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ (Nx (TaggedPrepartition.tag π J)))) c (TaggedPrepartition.tag π J)
[PROOFSTEP]
rfl
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
hrn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →
      r c (TaggedPrepartition.tag π J) =
        Integrable.convergenceR
          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c
          (TaggedPrepartition.tag π J)
⊢ dist
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤
    ↑(δ n)
[PROOFSTEP]
have : l.MemBaseSet I c ((hfi' n).convergenceR (δ n) c) (π.filter fun J => Nx (π.tag J) = n) :=
  (hπ.filter _).mono' _ le_rfl le_rfl fun J hJ => (hrn J hJ).le
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
hrn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →
      r c (TaggedPrepartition.tag π J) =
        Integrable.convergenceR
          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c
          (TaggedPrepartition.tag π J)
this :
  IntegrationParams.MemBaseSet l I c
    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ n)) c)
    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)
⊢ dist
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J))
      (∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
        ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) ≤
    ↑(δ n)
[PROOFSTEP]
convert (hfi' n).dist_integralSum_sum_integral_le_of_memBaseSet (δ0 _) this using 2
[GOAL]
case h.e'_3.h.e'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
hrn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →
      r c (TaggedPrepartition.tag π J) =
        Integrable.convergenceR
          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c
          (TaggedPrepartition.tag π J)
this :
  IntegrationParams.MemBaseSet l I c
    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ n)) c)
    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)
⊢ ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
      ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J) =
    integralSum (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
      (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)
[PROOFSTEP]
refine' sum_congr rfl fun J hJ => _
[GOAL]
case h.e'_3.h.e'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
hrn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →
      r c (TaggedPrepartition.tag π J) =
        Integrable.convergenceR
          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c
          (TaggedPrepartition.tag π J)
this :
  IntegrationParams.MemBaseSet l I c
    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ n)) c)
    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)
J : Box ι
hJ : J ∈ (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes
⊢ ENNReal.toReal (↑↑μ ↑J) • ↑(f (Nx (TaggedPrepartition.tag π J))) (TaggedPrepartition.tag π J) =
    ↑(↑(BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)) J)
      (↑(f n) (TaggedPrepartition.tag (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) J))
[PROOFSTEP]
simp [hNxn J hJ]
[GOAL]
case h.e'_3.h.e'_4
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
hrn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →
      r c (TaggedPrepartition.tag π J) =
        Integrable.convergenceR
          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c
          (TaggedPrepartition.tag π J)
this :
  IntegrationParams.MemBaseSet l I c
    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ n)) c)
    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)
⊢ ∑ J in (Prepartition.filter π.toPrepartition fun J => Nx (TaggedPrepartition.tag π J) = n).boxes,
      ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ =
    ∑ J in (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes,
      BoxIntegral.integral J l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
[PROOFSTEP]
refine' sum_congr rfl fun J hJ => _
[GOAL]
case h.e'_3.h.e'_4
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
hrn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →
      r c (TaggedPrepartition.tag π J) =
        Integrable.convergenceR
          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c
          (TaggedPrepartition.tag π J)
this :
  IntegrationParams.MemBaseSet l I c
    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ n)) c)
    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)
J : Box ι
hJ : J ∈ (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes
⊢ ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ =
    BoxIntegral.integral J l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
[PROOFSTEP]
rw [← SimpleFunc.integral_eq_integral, SimpleFunc.box_integral_eq_integral _ _ _ _ hl, hNxn J hJ]
[GOAL]
case h.e'_3.h.e'_4.hfi
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝² : MeasurableSpace E := borel E
this✝¹ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this✝ : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
n : ℕ
hn : n ∈ Finset.image (fun J => Nx (TaggedPrepartition.tag π J)) π.boxes
hNxn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) → Nx (TaggedPrepartition.tag π J) = n
hrn :
  ∀ (J : Box ι),
    (J ∈ TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n) →
      r c (TaggedPrepartition.tag π J) =
        Integrable.convergenceR
          (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ n)) c
          (TaggedPrepartition.tag π J)
this :
  IntegrationParams.MemBaseSet l I c
    (Integrable.convergenceR (_ : BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ)))
      (↑(δ n)) c)
    (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n)
J : Box ι
hJ : J ∈ (TaggedPrepartition.filter π fun J => Nx (TaggedPrepartition.tag π J) = n).toPrepartition.boxes
⊢ Integrable ↑(f (Nx (TaggedPrepartition.tag π J)))
[PROOFSTEP]
exact (hfi _).mono_set (Prepartition.le_of_mem _ hJ)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    ↑ε
[PROOFSTEP]
refine' le_trans _ hN₀
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ
[PROOFSTEP]
have hfi : ∀ (n), ∀ J ∈ π, IntegrableOn (f n) (↑J) μ := fun n J hJ => (hfi n).mono_set (π.le_of_mem' J hJ)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
hfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J
⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ
[PROOFSTEP]
have hgi : ∀ J ∈ π, IntegrableOn g (↑J) μ := fun J hJ => hgi.mono_set (π.le_of_mem' J hJ)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi✝ : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
hfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J
hgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J
⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ
[PROOFSTEP]
have hfgi : ∀ (n), ∀ J ∈ π, IntegrableOn (fun x => ‖f n x - g x‖) J μ := fun n J hJ =>
  ((hfi n J hJ).sub (hgi J hJ)).norm
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi✝ : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
hfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J
hgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J
hfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J
⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
      (∫ (a : ι → ℝ) in ↑I, g a ∂μ) ≤
    ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ
[PROOFSTEP]
rw [← hπp.iUnion_eq, Prepartition.iUnion_def',
  integral_finset_biUnion π.boxes (fun J _ => J.measurableSet_coe) π.pairwiseDisjoint hgi,
  integral_finset_biUnion π.boxes (fun J _ => J.measurableSet_coe) π.pairwiseDisjoint (hfgi _)]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi✝ : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
hfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J
hgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J
hfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J
⊢ dist (∑ J in π.boxes, ∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ)
      (∑ i in π.boxes, ∫ (x : ι → ℝ) in ↑i, g x ∂μ) ≤
    ∑ i in π.boxes, ∫ (x : ι → ℝ) in ↑i, ‖↑(f N₀) x - g x‖ ∂μ
[PROOFSTEP]
refine' dist_sum_sum_le_of_le _ fun J hJ => _
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi✝ : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
hfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J
hgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J
hfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J
J : Box ι
hJ : J ∈ π.boxes
⊢ dist (∫ (x : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) x ∂μ) (∫ (x : ι → ℝ) in ↑J, g x ∂μ) ≤
    ∫ (x : ι → ℝ) in ↑J, ‖↑(f N₀) x - g x‖ ∂μ
[PROOFSTEP]
rw [dist_eq_norm, ← integral_sub (hfi _ J hJ) (hgi J hJ)]
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi✝ : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
hfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J
hgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J
hfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J
J : Box ι
hJ : J ∈ π.boxes
⊢ ‖∫ (a : ι → ℝ) in ↑J, ↑(f (Nx (TaggedPrepartition.tag π J))) a - g a ∂μ‖ ≤ ∫ (x : ι → ℝ) in ↑J, ‖↑(f N₀) x - g x‖ ∂μ
[PROOFSTEP]
refine' norm_integral_le_of_norm_le (hfgi _ J hJ) (eventually_of_forall fun x => _)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.refine'_3
ι : Type u
E : Type v
inst✝⁴ : Fintype ι
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : CompleteSpace E
μ : Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
I : Box ι
l : IntegrationParams
hl : l.bRiemann = false
this✝¹ : MeasurableSpace E := borel E
this✝ : BorelSpace E
g : (ι → ℝ) → E
hg : StronglyMeasurable g
this : SeparableSpace ↑(Set.range g ∪ {0})
hgi✝ : IntegrableOn g ↑I
f : ℕ → SimpleFunc (ι → ℝ) E :=
  SimpleFunc.approxOn g (_ : Measurable g) (Set.range g ∪ {0}) 0 (_ : 0 ∈ Set.range g ∪ {0})
hfi✝ : ∀ (n : ℕ), IntegrableOn ↑(f n) ↑I
hfi' : ∀ (n : ℕ), BoxIntegral.Integrable I l (↑(f n)) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
hfg_mono : ∀ (x : ι → ℝ) {m n : ℕ}, m ≤ n → ‖↑(f n) x - g x‖ ≤ ‖↑(f m) x - g x‖
ε : ℝ≥0
ε0 : 0 < ε
ε0' : 0 < ↑ε
N₀ : ℕ
hN₀ : ∫ (x : ι → ℝ) in ↑I, ‖↑(f N₀) x - g x‖ ∂μ ≤ ↑ε
Nx : (ι → ℝ) → ℕ
hNx : ∀ (x : ι → ℝ), N₀ ≤ Nx x
hNxε : ∀ (x : ι → ℝ), dist (↑(f (Nx x)) x) (g x) ≤ ↑ε
δ : ℕ → ℝ≥0
δ0 : ∀ (i : ℕ), 0 < δ i
c✝ : ℝ≥0
hδc : HasSum δ c✝
hcε : c✝ < ε
r : ℝ≥0 → (ι → ℝ) → ↑(Set.Ioi 0) :=
  fun c x =>
    Integrable.convergenceR
      (_ : BoxIntegral.Integrable I l (↑(f (Nx x))) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))) (↑(δ (Nx x))) c x
c : ℝ≥0
π : TaggedPrepartition I
hπ : IntegrationParams.MemBaseSet l I c (r c) π
hπp : TaggedPrepartition.IsPartition π
hfi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn ↑(f n) ↑J
hgi : ∀ (J : Box ι), J ∈ π → IntegrableOn g ↑J
hfgi : ∀ (n : ℕ) (J : Box ι), J ∈ π → IntegrableOn (fun x => ‖↑(f n) x - g x‖) ↑J
J : Box ι
hJ : J ∈ π.boxes
x : ι → ℝ
⊢ ‖↑(f (Nx (TaggedPrepartition.tag π J))) x - g x‖ ≤ ‖↑(f N₀) x - g x‖
[PROOFSTEP]
exact hfg_mono x (hNx (π.tag J))
