-- Lean 4 proof step from Mathlib.Analysis.BoxIntegral.Basic (goal)
Goal:
ι : Type u
E : Type v
inst : NormedAddCommGroup E
inst_1 : NormedSpace ℝ E
inst_2 : Fintype ι
l : IntegrationParams
inst_3 : CompleteSpace E
I : Box ι
f : (ι → ℝ) → E
μ : Measure (ι → ℝ)
inst_4 : IsLocallyFiniteMeasure μ
hc :
  ∀ᵐ (x : ι → ℝ) ∂μ.restrict ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I),
    ContinuousWithinAt f ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I) x
ε : ℝ
ε0 : ε > 0
ε₁ : ℝ
ε₁0 : 0 < ε₁
hε₁ : HMul.hMul (α := ℝ) (β := ℝ) (2 : ℝ) ((μ.toBoxAdditive : (a : Box ι) → ℝ) I : ℝ) * ε₁ < ε
C : ℝ
hC :
  ∀ (x : ι → ℝ), Membership.mem (γ := Set (ι → ℝ)) ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I : Set (ι → ℝ)) x → ‖f x‖ ≤ C
C0 : 0 ≤ C
ε₂ : ℝ
ε₂0 : 0 < ε₂
hε₂ : 4 * C * ε₂ < ε
ε₂0' : ENNReal.ofReal ε₂ ≠ 0
D : Set (ι → ℝ) :=
  {x : ι → ℝ |
    Membership.mem (γ := Set (ι → ℝ)) ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I : Set (ι → ℝ)) x ∧
      ¬ContinuousWithinAt f ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I) x}
μ' : Measure (ι → ℝ) := μ.restrict ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I)
μ'D : Eq (α := ℝ≥0∞) ((μ' : (a : Set (ι → ℝ)) → ℝ≥0∞) D : ℝ≥0∞) (0 : ℝ≥0∞)
U : Set (ι → ℝ)
UD : U ⊇ D
Uopen : IsOpen U
hU : (μ' : (a : Set (ι → ℝ)) → ℝ≥0∞) U < ENNReal.ofReal ε₂
comp : IsCompact.{u} (X := ι → ℝ) ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I \ U)
this_1 :
  ∀ (x : ι → ℝ),
    Membership.mem (γ := Set (ι → ℝ)) ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I \ U : Set (ι → ℝ)) x →
      oscillationWithin f ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I) x < ENNReal.ofReal ε₁
r : ℝ
r0 : r > 0
hr :
  ∀ (x : ι → ℝ),
    Membership.mem (γ := Set (ι → ℝ)) ((Box.Icc : (a : Box ι) → Set (ι → ℝ)) I \ U : Set (ι → ℝ)) x →
      ediam (f '' (eball x (ENNReal.ofReal r) ∩ (Box.Icc : (a : Box ι) → Set (ι → ℝ)) I)) ≤ ENNReal.ofReal ε₁
c₁ c₂ : ℝ≥0
π₁ π₂ : TaggedPrepartition I
h₁ :
  l.MemBaseSet I c₁
    ((fun (x : ℝ≥0) (x_1 : ι → ℝ) ↦ Subtype.mk (p := fun (x : ℝ) ↦ Membership.mem (γ := Set ℝ) (Set.Ioi 0) x) (r / 2) ⋯)
      c₁)
    π₁
h₁p : π₁.IsPartition
h₂ :
  l.MemBaseSet I c₂
    ((fun (x : ℝ≥0) (x_1 : ι → ℝ) ↦ Subtype.mk (p := fun (x : ℝ) ↦ Membership.mem (γ := Set ℝ) (Set.Ioi 0) x) (r / 2) ⋯)
      c₂)
    π₂
h₂p : π₂.IsPartition
μI : LT.lt (α := ℝ≥0∞) ((μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑I : Set (ι → ℝ)) : ℝ≥0∞) (∞ : ℝ≥0∞)
t₁ : (J : Box ι) → ι → ℝ := fun (J : Box ι) ↦ (π₁.infPrepartition π₂.toPrepartition).tag J
t₂ : (J : Box ι) → ι → ℝ := fun (J : Box ι) ↦ (π₂.infPrepartition π₁.toPrepartition).tag J
B : Finset (Box ι) := (π₁.toPrepartition ⊓ π₂.toPrepartition).boxes
B' : Finset (Box ι) := {J ∈ B | (↑J : Set (ι → ℝ)) ⊆ U}
hB' : B' ⊆ B
μJ_ne_top : ∀ J ∈ B, Ne (α := ℝ≥0∞) ((μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑J : Set (ι → ℝ)) : ℝ≥0∞) (∞ : ℝ≥0∞)
un : ∀ S ⊆ B, ⋃ J ∈ S, (↑J : Set (ι → ℝ)) ⊆ (↑I : Set (ι → ℝ))
this_2 :
  ∀ J ∈ B',
    ‖HSMul.hSMul (α := ℝ) ((μ.toBoxAdditive : (a : Box ι) → ℝ) J : ℝ) (f (t₁ J) - f (t₂ J))‖ ≤
      HMul.hMul (α := ℝ) ((μ.toBoxAdditive : (a : Box ι) → ℝ) J : ℝ) (2 * C)
this : ENNReal.toReal (∑ J ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑J : Set (ι → ℝ))) ≤ ε₂
linarith : ε / 2 < ENNReal.toReal (∑ a ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑a : Set (ι → ℝ))) * (2 * C) → 2 / 2 = 1
linarith₁ linarith₂ linarith₃ :
  ε / 2 < ENNReal.toReal (∑ a ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑a : Set (ι → ℝ))) * (2 * C) →
    HMul.hMul (α := ℝ) 1 2 = 2
linarith₄ :
  ε / 2 < ENNReal.toReal (∑ a ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑a : Set (ι → ℝ))) * (2 * C) → GT.gt (α := ℝ) 2 0
⊢ ENNReal.toReal (∑ a ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑a : Set (ι → ℝ))) * (2 * C) ≤ ε / 2
have linarith₅ : ε / 2 < ENNReal.toReal (∑ a ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑a : Set (ι → ℝ))) * (2 * C) →
  4 * C * ε₂ - ε +
        (1 * ε -
          1 * ENNReal.toReal (∑ a ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑a : Set (ι → ℝ))) *
            (HMul.hMul (α := ℝ) 1 2 * (2 * C))) +
      2 * (ENNReal.toReal (∑ J ∈ B', (μ : (a : Set (ι → ℝ)) → ℝ≥0∞) (↑J : Set (ι → ℝ))) * (2 * C) - ε₂ * (2 * C)) =
    0
Tactic: linarith [mul_le_mul_of_nonneg_right this <| (mul_nonneg_iff_of_pos_left two_pos).2 C0]