Theorem: BoxIntegral.hasIntegralIndicatorConst
File: Mathlib/Analysis/BoxIntegral/Integrability.lean

tactic: refine' HasIntegral.of_mul ‖y‖ fun ε ε0 => _
state_before: ι : 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
μ : MeasureTheory.Measure (ι → ℝ)
inst✝ : IsLocallyFiniteMeasure μ
⊢ HasIntegral I l (indicator s fun x => y) (BoxAdditiveMap.toSMul (Measure.toBoxAdditive μ))
    (ENNReal.toReal (↑↑μ (s ∩ ↑I)) • y)

tactic: lift ε to ℝ≥0 using ε0.le
state_before: ι : 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
μ : MeasureTheory.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‖ * ε

tactic: rw [NNReal.coe_pos] at ε0
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: have A : μ (s ∩ Box.Icc I) ≠ ∞ :=
  ((measure_mono <| Set.inter_subset_right _ _).trans_lt (I.measure_Icc_lt_top μ)).ne
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: have B : μ (s ∩ I) ≠ ∞ :=
  ((measure_mono <| Set.inter_subset_right _ _).trans_lt (I.measure_coe_lt_top μ)).ne
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: 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'
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: 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'
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: 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⟩
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: choose! rs hrsU using this
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: 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⟩
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: choose! rs' hrs'F using this
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: set r : (ι → ℝ) → Ioi (0 : ℝ) := s.piecewise rs rs'
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: refine' ⟨fun _ => r, fun c => l.rCond_of_bRiemann_eq_false hl, fun c π hπ hπp => _⟩
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: rw [mul_comm]
state_before: 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
μ : MeasureTheory.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‖ * ↑ε

tactic: dsimp [integralSum]
state_before: 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
μ : MeasureTheory.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‖

tactic: 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]
state_before: 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
μ : MeasureTheory.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‖

tactic: refine' mul_le_mul_of_nonneg_right _ (norm_nonneg y)
state_before: 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
μ : MeasureTheory.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 π
⊢ abs
        (ENNReal.toReal
            (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -
          ENNReal.toReal (↑↑μ (s ∩ ↑I))) *
      ‖y‖ ≤
    ↑ε * ‖y‖

tactic: change abs ((μ t).toReal - (μ (s ∩ I)).toReal) ≤ ε
state_before: 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
μ : MeasureTheory.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)
⊢ abs
      (ENNReal.toReal
          (↑↑μ (Prepartition.iUnion (Prepartition.filter π.toPrepartition fun i => TaggedPrepartition.tag π i ∈ s))) -
        ENNReal.toReal (↑↑μ (s ∩ ↑I))) ≤
    ↑ε

tactic: 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)
state_before: 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
μ : MeasureTheory.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)
⊢ abs (ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I))) ≤ ↑ε

tactic: refine' abs_sub_le_iff.2 ⟨_, _⟩
state_before: 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
μ : MeasureTheory.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
⊢ abs (ENNReal.toReal (↑↑μ t) - ENNReal.toReal (↑↑μ (s ∩ ↑I))) ≤ ↑ε

tactic: rcases nhds_basis_closedBall.mem_iff.1 (hUo.mem_nhds <| hsU hx) with ⟨r, hr₀, hr⟩
state_before: ι : 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
μ : MeasureTheory.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

tactic: exact ⟨⟨r, hr₀⟩, hr⟩
state_before: 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
μ : MeasureTheory.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

tactic: obtain ⟨r, hr₀, hr⟩ :=
  nhds_basis_closedBall.mem_iff.1 (hFc.isOpen_compl.mem_nhds fun hx' => hx.2 (hFs hx').1)
state_before: ι : 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
μ : MeasureTheory.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ᶜ

tactic: exact ⟨⟨r, hr₀⟩, hr⟩
state_before: 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
μ : MeasureTheory.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ᶜ

tactic: simp only [TaggedPrepartition.iUnion_def, iUnion_subset_iff, TaggedPrepartition.mem_filter,
  and_imp]
state_before: ι : 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
μ : MeasureTheory.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

tactic: refine' fun J hJ hJs x hx => ⟨hrsU _ ⟨hJs, π.tag_mem_Icc J⟩ _, π.le_of_mem' J hJ hx⟩
state_before: ι : 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
μ : MeasureTheory.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

tactic: simpa only [s.piecewise_eq_of_mem _ _ hJs] using hπ.1 J hJ (Box.coe_subset_Icc hx)
state_before: ι : 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
μ : MeasureTheory.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))

tactic: refine' (ENNReal.le_toReal_sub B).trans (ENNReal.toReal_le_coe_of_le_coe _)
state_before: 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
μ : MeasureTheory.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)) ≤ ↑ε

tactic: refine' (tsub_le_tsub (measure_mono htU) le_rfl).trans (le_measure_diff.trans _)
state_before: 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
μ : MeasureTheory.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) ≤ ↑ε

tactic: refine' (measure_mono fun x hx => _).trans hμU.le
state_before: 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
μ : MeasureTheory.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)) ≤ ↑ε

tactic: exact ⟨hx.1.1, fun hx' => hx.2 ⟨hx'.1, hx.1.2⟩⟩
state_before: 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
μ : MeasureTheory.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)

tactic: have hμt : μ t ≠ ∞ := ((measure_mono (htU.trans (inter_subset_left _ _))).trans_lt hUt).ne
state_before: 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
μ : MeasureTheory.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) ≤ ↑ε

tactic: refine' (ENNReal.le_toReal_sub hμt).trans (ENNReal.toReal_le_coe_of_le_coe _)
state_before: 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
μ : MeasureTheory.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) ≤ ↑ε

tactic: refine' le_measure_diff.trans ((measure_mono _).trans hμF.le)
state_before: 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
μ : MeasureTheory.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 ≤ ↑ε

tactic: rintro x ⟨⟨hxs, hxI⟩, hxt⟩
state_before: 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
μ : MeasureTheory.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

tactic: refine' ⟨⟨hxs, Box.coe_subset_Icc hxI⟩, fun hxF => hxt _⟩
state_before: 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
μ : MeasureTheory.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

tactic: simp only [TaggedPrepartition.iUnion_def, TaggedPrepartition.mem_filter, Set.mem_iUnion,
  exists_prop]
state_before: 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
μ : MeasureTheory.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

tactic: rcases hπp x hxI with ⟨J, hJπ, hxJ⟩
state_before: 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
μ : MeasureTheory.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

tactic: refine' ⟨J, ⟨hJπ, _⟩, hxJ⟩
state_before: 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
μ : MeasureTheory.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

tactic: contrapose hxF
state_before: 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
μ : MeasureTheory.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

tactic: refine' hrs'F _ ⟨π.tag_mem_Icc J, hxF⟩ _
state_before: 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
μ : MeasureTheory.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

tactic: simpa only [s.piecewise_eq_of_not_mem _ _ hxF] using hπ.1 J hJπ (Box.coe_subset_Icc hxJ)
state_before: 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
μ : MeasureTheory.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))