Theorem: BoxIntegral.Prepartition.exists_tagged_le_isHenstock_isSubordinate_iUnion_eq
File: Mathlib/Analysis/BoxIntegral/Partition/SubboxInduction.lean

tactic: have := fun J => Box.exists_taggedPartition_isHenstock_isSubordinate_homothetic J r
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Set.Ioi 0)
π : Prepartition I
⊢ ∃ π',
    π'.toPrepartition ≤ π ∧
      IsHenstock π' ∧
        IsSubordinate π' r ∧
          TaggedPrepartition.distortion π' = distortion π ∧ TaggedPrepartition.iUnion π' = Prepartition.iUnion π

tactic: choose! πi πip πiH πir _ πid using this
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Set.Ioi 0)
π : Prepartition I
this :
  ∀ (J : Box ι),
    ∃ π,
      TaggedPrepartition.IsPartition π ∧
        IsHenstock π ∧
          IsSubordinate π r ∧
            (∀ (J_1 : Box ι),
                J_1 ∈ π → ∃ m, ∀ (i : ι), Box.upper J_1 i - Box.lower J_1 i = (Box.upper J i - Box.lower J i) / 2 ^ m) ∧
              TaggedPrepartition.distortion π = Box.distortion J
⊢ ∃ π',
    π'.toPrepartition ≤ π ∧
      IsHenstock π' ∧
        IsSubordinate π' r ∧
          TaggedPrepartition.distortion π' = distortion π ∧ TaggedPrepartition.iUnion π' = Prepartition.iUnion π

tactic: refine' ⟨π.biUnionTagged πi, biUnion_le _ _, isHenstock_biUnionTagged.2 fun J _ => πiH J,
  isSubordinate_biUnionTagged.2 fun J _ => πir J, _, π.iUnion_biUnion_partition fun J _ => πip J⟩
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Set.Ioi 0)
π : Prepartition I
πi : (J : Box ι) → TaggedPrepartition J
πip : ∀ (J : Box ι), TaggedPrepartition.IsPartition (πi J)
πiH : ∀ (J : Box ι), IsHenstock (πi J)
πir : ∀ (J : Box ι), IsSubordinate (πi J) r
h✝ :
  ∀ (J J_1 : Box ι),
    J_1 ∈ πi J → ∃ m, ∀ (i : ι), Box.upper J_1 i - Box.lower J_1 i = (Box.upper J i - Box.lower J i) / 2 ^ m
πid : ∀ (J : Box ι), TaggedPrepartition.distortion (πi J) = Box.distortion J
⊢ ∃ π',
    π'.toPrepartition ≤ π ∧
      IsHenstock π' ∧
        IsSubordinate π' r ∧
          TaggedPrepartition.distortion π' = distortion π ∧ TaggedPrepartition.iUnion π' = Prepartition.iUnion π

tactic: rw [distortion_biUnionTagged]
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Set.Ioi 0)
π : Prepartition I
πi : (J : Box ι) → TaggedPrepartition J
πip : ∀ (J : Box ι), TaggedPrepartition.IsPartition (πi J)
πiH : ∀ (J : Box ι), IsHenstock (πi J)
πir : ∀ (J : Box ι), IsSubordinate (πi J) r
h✝ :
  ∀ (J J_1 : Box ι),
    J_1 ∈ πi J → ∃ m, ∀ (i : ι), Box.upper J_1 i - Box.lower J_1 i = (Box.upper J i - Box.lower J i) / 2 ^ m
πid : ∀ (J : Box ι), TaggedPrepartition.distortion (πi J) = Box.distortion J
⊢ TaggedPrepartition.distortion (biUnionTagged π πi) = distortion π

tactic: exact sup_congr rfl fun J _ => πid J
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J I : Box ι
r : (ι → ℝ) → ↑(Set.Ioi 0)
π : Prepartition I
πi : (J : Box ι) → TaggedPrepartition J
πip : ∀ (J : Box ι), TaggedPrepartition.IsPartition (πi J)
πiH : ∀ (J : Box ι), IsHenstock (πi J)
πir : ∀ (J : Box ι), IsSubordinate (πi J) r
h✝ :
  ∀ (J J_1 : Box ι),
    J_1 ∈ πi J → ∃ m, ∀ (i : ι), Box.upper J_1 i - Box.lower J_1 i = (Box.upper J i - Box.lower J i) / 2 ^ m
πid : ∀ (J : Box ι), TaggedPrepartition.distortion (πi J) = Box.distortion J
⊢ (sup π.boxes fun J => TaggedPrepartition.distortion (πi J)) = distortion π