Theorem: BoxIntegral.Box.exists_taggedPartition_isHenstock_isSubordinate_homothetic
File: Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean

tactic: refine' subbox_induction_on I (fun J _ hJ => _) fun z _ => _
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J : Box ι), J ∈ π → ∃ m, ∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion I

tactic: choose! πi hP hHen hr Hn _ using hJ
state_before: case refine'_1
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
hJ :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∃ π,
        TaggedPrepartition.IsPartition π ∧
          IsHenstock π ∧
            IsSubordinate π r ∧
              (∀ (J : Box ι), J ∈ π → ∃ m, ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ m) ∧
                TaggedPrepartition.distortion π = distortion J'
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J_1 : Box ι), J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion J

tactic: choose! n hn using Hn
state_before: case refine'_1
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
Hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∃ m, ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ m
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J_1 : Box ι), J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion J

tactic: have hP : ((splitCenter J).biUnionTagged πi).IsPartition :=
  (isPartition_splitCenter _).biUnionTagged hP
state_before: case refine'_1
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J_1 : Box ι), J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion J

tactic: have hsub : ∀ J' ∈ (splitCenter J).biUnionTagged πi, ∃ n : ℕ, ∀ i,
    (J' : _).upper i - J'.lower i = (J.upper i - J.lower i) / 2 ^ n := by
  intro J' hJ'
  rcases (splitCenter J).mem_biUnionTagged.1 hJ' with ⟨J₁, h₁, h₂⟩
  refine' ⟨n J₁ J' + 1, fun i => _⟩
  simp only [hn J₁ h₁ J' h₂, upper_sub_lower_of_mem_splitCenter h₁, pow_succ, div_div]
state_before: case refine'_1
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J_1 : Box ι), J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion J

tactic: refine' ⟨_, hP, isHenstock_biUnionTagged.2 hHen, isSubordinate_biUnionTagged.2 hr, hsub, _⟩
state_before: case refine'_1
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
hsub :
  ∀ (J' : Box ι),
    J' ∈ biUnionTagged (splitCenter J) πi → ∃ n, ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J_1 : Box ι), J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion J

tactic: refine' TaggedPrepartition.distortion_of_const _ hP.nonempty_boxes fun J' h' => _
state_before: case refine'_1
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
hsub :
  ∀ (J' : Box ι),
    J' ∈ biUnionTagged (splitCenter J) πi → ∃ n, ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n
⊢ TaggedPrepartition.distortion (biUnionTagged (splitCenter J) πi) = distortion J

tactic: rcases hsub J' h' with ⟨n, hn⟩
state_before: case refine'_1
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
hsub :
  ∀ (J' : Box ι),
    J' ∈ biUnionTagged (splitCenter J) πi → ∃ n, ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n
J' : Box ι
h' : J' ∈ biUnionTagged (splitCenter J) πi
⊢ distortion J' = distortion J

tactic: exact Box.distortion_eq_of_sub_eq_div hn
state_before: case refine'_1.intro
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n✝ : Box ι → Box ι → ℕ
hn✝ :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n✝ J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
hsub :
  ∀ (J' : Box ι),
    J' ∈ biUnionTagged (splitCenter J) πi → ∃ n, ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n
J' : Box ι
h' : J' ∈ biUnionTagged (splitCenter J) πi
n : ℕ
hn : ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n
⊢ distortion J' = distortion J

tactic: intro J' hJ'
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
⊢ ∀ (J' : Box ι),
    J' ∈ biUnionTagged (splitCenter J) πi → ∃ n, ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n

tactic: rcases (splitCenter J).mem_biUnionTagged.1 hJ' with ⟨J₁, h₁, h₂⟩
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
J' : Box ι
hJ' : J' ∈ biUnionTagged (splitCenter J) πi
⊢ ∃ n, ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n

tactic: refine' ⟨n J₁ J' + 1, fun i => _⟩
state_before: case intro.intro
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
J' : Box ι
hJ' : J' ∈ biUnionTagged (splitCenter J) πi
J₁ : Box ι
h₁ : J₁ ∈ splitCenter J
h₂ : J' ∈ πi J₁
⊢ ∃ n, ∀ (i : ι), upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ n

tactic: simp only [hn J₁ h₁ J' h₂, upper_sub_lower_of_mem_splitCenter h₁, pow_succ, div_div]
state_before: case intro.intro
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
J : Box ι
x✝ : J ≤ I
πi : (J' : Box ι) → TaggedPrepartition J'
hP✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.IsPartition (πi J')
hHen : ∀ (J' : Box ι), J' ∈ splitCenter J → IsHenstock (πi J')
hr : ∀ (J' : Box ι), J' ∈ splitCenter J → IsSubordinate (πi J') r
✝ : ∀ (J' : Box ι), J' ∈ splitCenter J → TaggedPrepartition.distortion (πi J') = distortion J'
n : Box ι → Box ι → ℕ
hn :
  ∀ (J' : Box ι),
    J' ∈ splitCenter J →
      ∀ (J : Box ι), J ∈ πi J' → ∀ (i : ι), upper J i - lower J i = (upper J' i - lower J' i) / 2 ^ n J' J
hP : TaggedPrepartition.IsPartition (biUnionTagged (splitCenter J) πi)
J' : Box ι
hJ' : J' ∈ biUnionTagged (splitCenter J) πi
J₁ : Box ι
h₁ : J₁ ∈ splitCenter J
h₂ : J' ∈ πi J₁
i : ι
⊢ upper J' i - lower J' i = (upper J i - lower J i) / 2 ^ (n J₁ J' + 1)

tactic: refine' ⟨Box.Icc I ∩ closedBall z (r z),
  inter_mem_nhdsWithin _ (closedBall_mem_nhds _ (r z).coe_prop), _⟩
state_before: case refine'_2
ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
z : ι → ℝ
x✝ : z ∈ ↑Box.Icc I
⊢ ∃ U,
    U ∈ 𝓝[↑Box.Icc I] z ∧
      ∀ (J : Box ι),
        J ≤ I →
          ∀ (m : ℕ),
            z ∈ ↑Box.Icc J →
              ↑Box.Icc J ⊆ U →
                (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) →
                  ∃ π,
                    TaggedPrepartition.IsPartition π ∧
                      IsHenstock π ∧
                        IsSubordinate π r ∧
                          (∀ (J_1 : Box ι),
                              J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
                            TaggedPrepartition.distortion π = distortion J

tactic: intro J _ n Hmem HIcc Hsub
state_before: case refine'_2
ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
z : ι → ℝ
x✝ : z ∈ ↑Box.Icc I
⊢ ∀ (J : Box ι),
    J ≤ I →
      ∀ (m : ℕ),
        z ∈ ↑Box.Icc J →
          ↑Box.Icc J ⊆ ↑Box.Icc I ∩ closedBall z ↑(r z) →
            (∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ m) →
              ∃ π,
                TaggedPrepartition.IsPartition π ∧
                  IsHenstock π ∧
                    IsSubordinate π r ∧
                      (∀ (J_1 : Box ι),
                          J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
                        TaggedPrepartition.distortion π = distortion J

tactic: rw [Set.subset_inter_iff] at HIcc
state_before: case refine'_2
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
z : ι → ℝ
x✝ : z ∈ ↑Box.Icc I
J : Box ι
a✝ : J ≤ I
n : ℕ
Hmem : z ∈ ↑Box.Icc J
HIcc : ↑Box.Icc J ⊆ ↑Box.Icc I ∩ closedBall z ↑(r z)
Hsub : ∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ n
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J_1 : Box ι), J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion J

tactic: refine' ⟨single _ _ le_rfl _ Hmem, isPartition_single _, isHenstock_single _,
  (isSubordinate_single _ _).2 HIcc.2, _, distortion_single _ _⟩
state_before: case refine'_2
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
z : ι → ℝ
x✝ : z ∈ ↑Box.Icc I
J : Box ι
a✝ : J ≤ I
n : ℕ
Hmem : z ∈ ↑Box.Icc J
HIcc : ↑Box.Icc J ⊆ ↑Box.Icc I ∧ ↑Box.Icc J ⊆ closedBall z ↑(r z)
Hsub : ∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ n
⊢ ∃ π,
    TaggedPrepartition.IsPartition π ∧
      IsHenstock π ∧
        IsSubordinate π r ∧
          (∀ (J_1 : Box ι), J_1 ∈ π → ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m) ∧
            TaggedPrepartition.distortion π = distortion J

tactic: simp only [TaggedPrepartition.mem_single, forall_eq]
state_before: case refine'_2
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
z : ι → ℝ
x✝ : z ∈ ↑Box.Icc I
J : Box ι
a✝ : J ≤ I
n : ℕ
Hmem : z ∈ ↑Box.Icc J
HIcc : ↑Box.Icc J ⊆ ↑Box.Icc I ∧ ↑Box.Icc J ⊆ closedBall z ↑(r z)
Hsub : ∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ n
⊢ ∀ (J_1 : Box ι),
    J_1 ∈ TaggedPrepartition.single J J (_ : J ≤ J) z Hmem →
      ∃ m, ∀ (i : ι), upper J_1 i - lower J_1 i = (upper J i - lower J i) / 2 ^ m

tactic: refine' ⟨0, fun i => _⟩
state_before: case refine'_2
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
z : ι → ℝ
x✝ : z ∈ ↑Box.Icc I
J : Box ι
a✝ : J ≤ I
n : ℕ
Hmem : z ∈ ↑Box.Icc J
HIcc : ↑Box.Icc J ⊆ ↑Box.Icc I ∧ ↑Box.Icc J ⊆ closedBall z ↑(r z)
Hsub : ∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ n
⊢ ∃ m, ∀ (i : ι), upper J i - lower J i = (upper J i - lower J i) / 2 ^ m

tactic: simp
state_before: case refine'_2
ι : Type u_1
inst✝ : Fintype ι
I✝ J✝ I : Box ι
r : (ι → ℝ) → ↑(Ioi 0)
z : ι → ℝ
x✝ : z ∈ ↑Box.Icc I
J : Box ι
a✝ : J ≤ I
n : ℕ
Hmem : z ∈ ↑Box.Icc J
HIcc : ↑Box.Icc J ⊆ ↑Box.Icc I ∧ ↑Box.Icc J ⊆ closedBall z ↑(r z)
Hsub : ∀ (i : ι), upper J i - lower J i = (upper I i - lower I i) / 2 ^ n
i : ι
⊢ upper J i - lower J i = (upper J i - lower J i) / 2 ^ 0